changeset 15344:6a7adf41e4fe

Support for new vssh dll, patch by adland Use new dll only for new files, it can't decode old files (patch by me)
author rtognimp
date Wed, 04 May 2005 20:35:21 +0000
parents 652a50b47214
children e00453f77625
files etc/codecs.conf libmpcodecs/vd_dshow.c libmpcodecs/vd_vfw.c
diffstat 3 files changed, 25 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/etc/codecs.conf	Wed May 04 19:49:32 2005 +0000
+++ b/etc/codecs.conf	Wed May 04 20:35:21 2005 +0000
@@ -1607,7 +1607,16 @@
   out BGR24 flip
 
 videocodec vssh264
-  info "VSS H.264"
+  info "VSS H.264 New"
+  status working
+  fourcc VSSH
+  driver dshow
+  dll "vsshdsd.dll"
+  guid 0x6931C7e7, 0x75b7, 0x4729, 0xa1, 0x53, 0xa8, 0xad, 0x99, 0xbd, 0xf7, 0x0b
+  out YV12
+
+videocodec vssh264old
+  info "VSS H.264 Old"
   status working
   fourcc VSSH
   driver vfw
--- a/libmpcodecs/vd_dshow.c	Wed May 04 19:49:32 2005 +0000
+++ b/libmpcodecs/vd_dshow.c	Wed May 04 20:35:21 2005 +0000
@@ -50,6 +50,14 @@
 // init driver
 static int init(sh_video_t *sh){
     unsigned int out_fmt;
+
+    /* Hack for VSSH codec: new dll can't decode old files
+     * In my samples old files have no extradata, so use that info
+     * to decide what dll should be used (here and in vd_vfw).
+     */
+    if (!strcmp(sh->codec->dll, "vsshdsd.dll") && (sh->bih->biSize == 40))
+      return 0;
+
     if(!(sh->context=DS_VideoDecoder_Open(sh->codec->dll,&sh->codec->guid, sh->bih, 0, 0))){
         mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll);
         mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_DownloadCodecPackage);
--- a/libmpcodecs/vd_vfw.c	Wed May 04 19:49:32 2005 +0000
+++ b/libmpcodecs/vd_vfw.c	Wed May 04 20:35:21 2005 +0000
@@ -147,6 +147,13 @@
     int i, o_bih_len;
     vd_vfw_ctx *priv;
   
+    /* Hack for VSSH codec: new dll can't decode old files
+     * In my samples old files have no extradata, so use that info
+     * to decide what dll should be used (here and in vd_dshow).
+     */
+    if (!strcmp(sh->codec->dll, "vssh264.dll") && (sh->bih->biSize > 40))
+      return 0;
+
     priv = malloc(sizeof(vd_vfw_ctx));
     if (!priv)
 	return 0;