summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd_realvid.c
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-03 02:50:01 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-03 02:50:01 +0000
commitd0aadc8497aafd7663d597db7a53240ea10c8bc5 (patch)
tree86c461a2193e12722e45f62229328f41b081ff3a /libmpcodecs/vd_realvid.c
parent6206f25690436785a50c178b7b095e07967ea4d7 (diff)
downloadmpv-d0aadc8497aafd7663d597db7a53240ea10c8bc5.tar.bz2
mpv-d0aadc8497aafd7663d597db7a53240ea10c8bc5.tar.xz
remove mac shlb support to use new helix codec for realvideo support on osx
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13861 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_realvid.c')
-rw-r--r--libmpcodecs/vd_realvid.c92
1 files changed, 16 insertions, 76 deletions
diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c
index 585a0015da..be9a877644 100644
--- a/libmpcodecs/vd_realvid.c
+++ b/libmpcodecs/vd_realvid.c
@@ -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 @@ static int load_syms_linux(char *path) {
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 @@ static int load_syms_windows(char *path) {
}
#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 @@ static int init(sh_video_t *sh){
/* 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 @@ static void uninit(sh_video_t *sh){
#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;
}