changeset 13745:3db10035d297

Windows media video advanced profile (wmva) support via binary codec
author rtognimp
date Sun, 24 Oct 2004 00:29:57 +0000
parents d66e3d5865b8
children 03b6c4539b3c
files etc/codecs.conf loader/module.c
diffstat 2 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/etc/codecs.conf	Sat Oct 23 22:43:19 2004 +0000
+++ b/etc/codecs.conf	Sun Oct 24 00:29:57 2004 +0000
@@ -632,6 +632,17 @@
   out YUY2,UYVY
   out BGR32,BGR24,BGR16 ;,BGR15
 
+videocodec wmvadmo
+  info "Windows Media Video Adv DMO"
+  status working
+  fourcc WMVA
+  driver dmo
+  dll "wmvadvd.dll"
+  guid 0x03be3ac4, 0x84b7, 0x4e0e, 0xa7, 0x8d, 0xd3, 0x52, 0x4e, 0x60, 0x39, 0x5a
+  out YV12 ;,I420,IYUV
+  out YUY2,UYVY
+  out BGR32,BGR24,BGR16 ;,BGR15
+
 videocodec ubmp4
   info "UB Video MPEG 4"
   comment "black&white"
--- a/loader/module.c	Sat Oct 23 22:43:19 2004 +0000
+++ b/loader/module.c	Sun Oct 24 00:29:57 2004 +0000
@@ -471,6 +471,20 @@
           }
         }
 
+        // Windows Media Video 9 Advanced
+        if (strstr(libname,"wmvadvd.dll") && wm)
+        {
+          // The codec calls IsRectEmpty with coords 0,0,0,0 => result is 0
+          // but it really wants the rectangle to be not empty
+          if (PE_FindExportedFunction(wm, "CreateInstance", TRUE)==(void*)0x08c4b812) {
+            // Dll version is 10.0.0.3645
+            *((char*)0x08c48b0f)=0xeb; // Jump always, ignoring IsRectEmpty result
+          } else {
+            fprintf(stderr, "Unsupported WMVA version\n");
+            return 0;
+          }
+        }
+
 	if (strstr(libname,"QuickTime.qts") && wm)
 	{
 	    void** ptr;