summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-24 21:43:17 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-24 21:43:17 +0000
commitdc18e7dcbeadc8bdcdd31baba609def678aaa60e (patch)
tree51d6d69bc5b9b3410861392571cd81707d5393b1 /loader
parent57f77bb41a9f68f491d9bf54faa0d949fc7ef8c9 (diff)
downloadmpv-dc18e7dcbeadc8bdcdd31baba609def678aaa60e.tar.bz2
mpv-dc18e7dcbeadc8bdcdd31baba609def678aaa60e.tar.xz
some new experiments
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8269 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rwxr-xr-xloader/qtx/c.sh2
-rw-r--r--loader/qtx/qtxload.c45
2 files changed, 36 insertions, 11 deletions
diff --git a/loader/qtx/c.sh b/loader/qtx/c.sh
index 5a42dec6af..f8d36f62ab 100755
--- a/loader/qtx/c.sh
+++ b/loader/qtx/c.sh
@@ -1,2 +1,2 @@
-gcc qtxload.c ../libloader.a ../../cpudetect.o -ldl -lm -lpthread -g
+gcc qtxload.c ../libloader.a ../../cpudetect.o ../../mp_msg-mencoder.o -ldl -lm -lpthread -g
diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c
index beed851992..a57342896f 100644
--- a/loader/qtx/qtxload.c
+++ b/loader/qtx/qtxload.c
@@ -33,8 +33,14 @@ void* GetProcAddress(void* handle,char* func);
unsigned int* x_table[0x00001837];
+static OSErr (*InitializeQTML)(long flags);
+
int main(int argc, char *argv[]){
void *handler;
+ void *handler2;
+ void* theqtdp=NULL;
+ void* compcall=NULL;
+ void* compcallws=NULL;
ComponentResult (*
dispatcher)(ComponentParameters *params, Globals glob);
ComponentResult ret;
@@ -44,14 +50,35 @@ dispatcher)(ComponentParameters *params, Globals glob);
unsigned int esp=0;
int i;
+ mp_msg_init();
+ mp_msg_set_level(10);
+
Setup_LDT_Keeper();
- handler = LoadLibraryA("/usr/lib/win32/QuickTime.qts");
- dispatcher = GetProcAddress(handler, "SorensonYUV9Dispatcher");
+ printf("loading qts\n");
+// handler = LoadLibraryA("/root/.wine/fake_windows/Windows/System/QuickTime.qts");
+ handler = LoadLibraryA("QuickTime.qts");
+ theqtdp = GetProcAddress(handler, "theQuickTimeDispatcher");
+ compcall = GetProcAddress(handler, "_CallComponent");
+ compcallws = GetProcAddress(handler, "_CallComponentFunctionWithStorage");
+
+ InitializeQTML = 0x6299e590;//GetProcAddress(handler, "InitializeQTML");
+ InitializeQTML(6+16);
+
+ printf("loading svq3\n");
+ handler2= LoadLibraryA("/root/.wine/fake_windows/Windows/System/QuickTime/QuickTimeEssentials.qtx");
+ printf("done\n");
+ dispatcher = GetProcAddress(handler2, "SMD_ComponentDispatch");
// handler = expLoadLibraryA("/usr/lib/win32/On2_VP3.qtx");
// dispatcher = GetProcAddress(handler, "CDComponentDispatcher");
- printf("handler: %p, dispatcher: %p\n", handler, dispatcher);
+ printf("handler: %p, dispatcher: %p theqtdp: %p\n", handler, dispatcher, theqtdp);
+
+// printf("theQuickTimeDispatcher = %p\n",GetProcAddress(handler, "theQuickTimeDispatcher"));
- printf("theQuickTimeDispatcher = %p\n",GetProcAddress(handler, "theQuickTimeDispatcher"));
+ // patch svq3 dll:
+ *((void**)0x63214c98) = NULL;
+ *((void**)0x63214c9c) = theqtdp; // theQt...
+ *((void**)0x63214ca0) = compcall; //0xdeadbeef; //dispatcher; // CallCOmponent_ptr
+ *((void**)0x63214ca4) = compcallws; //0xdeadbef2; //dispatcher; // CallComponentWithStorage_ptr
desc.componentType=0;
desc.componentSubType=0;
@@ -62,21 +89,19 @@ dispatcher)(ComponentParameters *params, Globals glob);
params = malloc(sizeof(ComponentParameters)+2048);
params->flags = 0;
- params->paramSize = 0;
- params->what = kComponentRegisterSelect;
+ params->paramSize = 4;
+ params->what = kComponentOpenSelect;
+ params->params[0] = 0x830000; //0x820000|i; //(i<<16)|0x24; //0x820024;
ret = dispatcher(params, &globals);
printf("!!! CDComponentDispatch() => 0x%X glob=%p\n",ret,globals);
// memset(x_table,12,4*0x00001837);
//for(i=0;i<=255;i++){
- params->flags = 0;
- params->paramSize = 4; //sizeof(params->params[0]);
- params->params[0] = 0x820000; //0x820000|i; //(i<<16)|0x24; //0x820024;
// params->what = kComponentVersionSelect;
// params->what = kComponentRegisterSelect;
- params->what = kComponentOpenSelect;
+ // params->what = kComponentOpenSelect;
// params->what = kComponentCanDoSelect;
printf("params: flags: %d, paramSize: %d, what: %d, params[0] = %x\n",