summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-24 00:29:57 +0000
committerrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-24 00:29:57 +0000
commitafb80e95a7b33dfd5b17788bfff4f5fbf5aca423 (patch)
tree77d7fb9958aa3f04b72944e441c58f9141d44eed
parent241d339efdebb923e9e5c86341eb8eba673b0274 (diff)
downloadmpv-afb80e95a7b33dfd5b17788bfff4f5fbf5aca423.tar.bz2
mpv-afb80e95a7b33dfd5b17788bfff4f5fbf5aca423.tar.xz
Windows media video advanced profile (wmva) support via binary codec
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13746 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--etc/codecs.conf11
-rw-r--r--loader/module.c14
2 files changed, 25 insertions, 0 deletions
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 87b9c60d1f..82fb076dfc 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -632,6 +632,17 @@ videocodec wmvdmo
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"
diff --git a/loader/module.c b/loader/module.c
index 9e7bc1c3c5..5669d7b245 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -471,6 +471,20 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
}
}
+ // 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;