# HG changeset patch # User arpi # Date 1023646827 0 # Node ID 1acda8182b14c8360f51f51924b5ebbd6c0607ab # Parent 25258fe789e866d7f39415398141071669c9cd1e win32 dll support (non-working) diff -r 25258fe789e8 -r 1acda8182b14 libmpcodecs/vd_real.c --- a/libmpcodecs/vd_real.c Sun Jun 09 17:52:30 2002 +0000 +++ b/libmpcodecs/vd_real.c Sun Jun 09 18:20:27 2002 +0000 @@ -1,3 +1,5 @@ +//#define USE_WIN32_REAL_CODECS + #include #include @@ -59,6 +61,8 @@ return CONTROL_UNKNOWN; } +#ifndef USE_WIN32_REAL_CODECS + /* exits program when failure */ int load_syms(char *path) { void *handle; @@ -100,6 +104,30 @@ return 1; } +#else + +int load_syms(char *path) { + void *handle; + Setup_LDT_Keeper(); + rv_handle = handle = LoadLibraryA(path); + printf("win32 real codec handle=%p \n",handle); + + rvyuv_custom_message = GetProcAddress(handle, "RV20toYUV420CustomMessage"); + rvyuv_free = GetProcAddress(handle, "RV20toYUV420Free"); + rvyuv_hive_message = GetProcAddress(handle, "RV20toYUV420HiveMessage"); + rvyuv_init = GetProcAddress(handle, "RV20toYUV420Init"); + rvyuv_transform = GetProcAddress(handle, "RV20toYUV420Transform"); + + if(rvyuv_custom_message && + rvyuv_free && + rvyuv_hive_message && + rvyuv_init && + rvyuv_transform) return 1; + return 0; // error +} + +#endif + /* we need exact positions */ struct rv_init_t { short unk1;