[Mplayer-cvslog] CVS: main/libmpcodecs vd_realvid.c,1.27,1.28
Nicolas Plourde CVS
syncmail at mplayerhq.hu
Wed Nov 3 03:50:04 CET 2004
CVS change done by Nicolas Plourde CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv15975/libmpcodecs
Modified Files:
vd_realvid.c
Log Message:
remove mac shlb support to use new helix codec for realvideo support on osx
Index: vd_realvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_realvid.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- vd_realvid.c 24 Jun 2004 09:16:50 -0000 1.27
+++ vd_realvid.c 3 Nov 2004 02:50:01 -0000 1.28
@@ -14,10 +14,6 @@
#include "vd_internal.h"
#include "wine/windef.h"
-#ifdef USE_MACSHLB
-#include <CoreServices/CoreServices.h>
-#endif
-
static vd_info_t info = {
"RealVideo decoder",
"realvid",
@@ -129,6 +125,22 @@
rv_handle = handle;
return 1;
}
+
+ rvyuv_custom_message = dlsym(handle, "RV40toYUV420CustomMessage");
+ rvyuv_free = dlsym(handle, "RV40toYUV420Free");
+ rvyuv_hive_message = dlsym(handle, "RV40toYUV420HiveMessage");
+ rvyuv_init = dlsym(handle, "RV40toYUV420Init");
+ rvyuv_transform = dlsym(handle, "RV40toYUV420Transform");
+
+ if(rvyuv_custom_message &&
+ rvyuv_free &&
+ rvyuv_hive_message &&
+ rvyuv_init &&
+ rvyuv_transform)
+ {
+ rv_handle = handle;
+ return 1;
+ }
mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error resolving symbols! (version incompatibility?)\n");
dlclose(handle);
@@ -181,64 +193,6 @@
}
#endif
-#ifdef USE_MACSHLB
-void *load_one_sym_mac(char *symbolName, CFragConnectionID *connID);
-
-static int load_syms_mac(char *path) {
- Ptr mainAddr;
- OSStatus status;
- FSRef fsref;
- FSSpec fsspec;
- OSErr err;
- Str255 errMessage;
- CFragConnectionID *connID;
-
- mp_msg(MSGT_DECVIDEO,MSGL_INFO, "opening mac shlb '%s'\n", path);
-
- if ( (connID = (CFragConnectionID *)NewPtr( sizeof( CFragConnectionID ))) == nil ) {
- mp_msg(MSGT_DECVIDEO,MSGL_WARN,"NewPtr() failed.\n" );
- return 0;
- }
-
- if ( (status = FSPathMakeRef( path, &fsref, NULL )) != noErr ) {
- mp_msg(MSGT_DECVIDEO,MSGL_WARN,"FSPathMakeRef() failed with error %d.\n", status );
- return 0;
- }
-
- if ( (status = FSGetCatalogInfo( &fsref, kFSCatInfoNone, NULL, NULL, &fsspec, NULL )) != noErr ) {
- mp_msg(MSGT_DECVIDEO,MSGL_WARN,"FSGetCatalogInfo() failed with error %d.\n", status );
- return 0;
- }
-
- if ( (err = GetDiskFragment( &fsspec, 0, kCFragGoesToEOF, NULL, kPrivateCFragCopy, connID, &mainAddr, errMessage )) != noErr ) {
- p2cstrcpy( errMessage, errMessage );
- mp_msg(MSGT_DECVIDEO,MSGL_WARN,"GetDiskFragment() failed with error %d: %s\n", err, errMessage );
- return 0;
- }
-
- rvyuv_custom_message = load_one_sym_mac("RV20toYUV420CustomMessage", connID);
- rvyuv_free = load_one_sym_mac("RV20toYUV420Free", connID);
- rvyuv_hive_message = load_one_sym_mac("RV20toYUV420HiveMessage", connID);
- rvyuv_init = load_one_sym_mac("RV20toYUV420Init", connID);
- rvyuv_transform = load_one_sym_mac("RV20toYUV420Transform", connID);
-
- if(rvyuv_custom_message &&
- rvyuv_free &&
- rvyuv_hive_message &&
- rvyuv_init &&
- rvyuv_transform)
- {
- rv_handle = connID;
- return 1;
- }
-
- mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error resolving symbols! (version incompatibility?)\n");
- (void)CloseConnection(connID);
- return 0; // error
-}
-#endif
-
-
/* we need exact positions */
struct rv_init_t {
short unk1;
@@ -270,9 +224,6 @@
/* first try to load linux dlls, if failed and we're supporting win32 dlls,
then try to load the windows ones */
-#ifdef USE_MACSHLB
- if (strstr(sh->codec->dll, ".shlb") && !load_syms_mac(path))
-#endif
#ifdef HAVE_LIBDL
if(strstr(sh->codec->dll,".dll") || !load_syms_linux(path))
#endif
@@ -335,17 +286,6 @@
#ifdef HAVE_LIBDL
if(rv_handle) dlclose(rv_handle);
#endif
-#ifdef USE_MACSHLB
- if (rv_handle){
- (void)CloseConnection(rv_handle);
- DisposePtr((Ptr)rv_handle);
- }
- if (rvyuv_custom_message) DisposePtr((Ptr)rvyuv_custom_message);
- if (rvyuv_free) DisposePtr((Ptr)rvyuv_free);
- if (rvyuv_hive_message) DisposePtr((Ptr)rvyuv_hive_message);
- if (rvyuv_init) DisposePtr((Ptr)rvyuv_init);
- if (rvyuv_transform) DisposePtr((Ptr)rvyuv_transform);
-#endif
rv_handle=NULL;
}
More information about the MPlayer-cvslog
mailing list