Mercurial > mplayer.hg
changeset 6404:83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
Better real codec dir detection and NetBSD real support.
Fix Nilmonis code, so it's working like expected.
Move a debug printf to mp_msg and some fixes in demux_real.c.
Some cosmetics :) -> RealPlayer 8 to RealPlayer, as RealOne (aka RealPlayer 9 works, too)
author | atmos4 |
---|---|
date | Thu, 13 Jun 2002 00:14:28 +0000 |
parents | c0f189e49ee4 |
children | d0f408a8b150 |
files | configure libmpcodecs/ad_real.c libmpcodecs/vd_real.c libmpdemux/demux_real.c |
diffstat | 4 files changed, 50 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Wed Jun 12 23:53:28 2002 +0000 +++ b/configure Thu Jun 13 00:14:28 2002 +0000 @@ -140,7 +140,7 @@ --disable-win32 disable Win32 DLL support [autodetect] --disable-dshow disable DirectShow support [autodetect] --disable-xanim disable XAnim DLL support [autodetect] - --disable-real disable RealPlayer8 DLL support [autodetect] + --disable-real disable RealPlayer DLL support [autodetect] --disable-xvid disable XviD codec [autodetect] --disable-divx4linux disable DivX4linux codec [autodetect] --enable-opendivx enable _old_ OpenDivx codec [disable] @@ -235,6 +235,7 @@ --with-libdvdnav=DIR libdvdnav in DIR --with-win32libdir=DIR W*ndows DLL files in DIR --with-xanimlibdir=DIR XAnim DLL files in DIR + --with-reallibdir=DIR RealPlayer DLL files in DIR --with-xvidcore=PATH path to XviD libcore.a (e.g: /opt/lib/libcore.a) --with-sdl-config=PATH path to sdl*-config (e.g.: /opt/bin/sdl-config) --with-gtk-config=PATH path to gtk*-config (e.g.: /opt/bin/gtk-config) @@ -1084,6 +1085,10 @@ _xanimlibdir=`echo $ac_option | cut -d '=' -f 2` _xanim=yes ;; + --with-reallibdir=*) + _reallibdir=`echo $ac_option | cut -d '=' -f 2` + _real=yes + ;; --with-csslibdir=*) _csslibdir=`echo $ac_option | cut -d '=' -f 2` _css=yes @@ -3252,18 +3257,34 @@ _nocodecmodules="xanim $_nocodecmodules" fi -echocheck "RealPlayer8 DLL" +echocheck "RealPlayer DLL" if test "$_real" = auto ; then _real=no if test "$_dl" = yes ; then if linux ; then _real=yes - echores "yes" elif freebsd ; then _real=yes - echores "yes" + elif netbsd ; then + _real=yes else - echores "no (tested only on Linux and FreeBSD arch)" + echores "no (tested only on Linux/FreeBSD/NetBSD)" + fi + if test "$_real" = yes ; then + if test -z "$_reallibdir" ; then + for I in /usr/lib/real /usr/lib/RealPlayer*/Codecs ; do + if test -d "$I" ; then + _reallibdir="$I" + break; + fi; + done + fi + fi + test "$_reallibdir" || _real=no + if test "$_real" = yes ; then + echores "yes (using $_reallibdir)" + else + echores "no (no suitable directory found - see DOCS/codecs.html)" fi else echores "no (dynamic loader support needed)" @@ -3273,9 +3294,11 @@ fi if test "$_real" = yes ; then _def_real='#define USE_REALCODECS 1' + _def_real_path="#define REALCODEC_PATH \"$_reallibdir\"" _codecmodules="real $_codecmodules" else _def_real='#undef USE_REALCODECS' + _def_real_path="#undef REALCODEC_PATH" _nocodecmodules="real $_nocodecmodules" fi @@ -4218,6 +4241,8 @@ /* RealPlayer DLL support */ $_def_real +/* Default search path */ +$_def_real_path /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/ $_def_fastmemcpy
--- a/libmpcodecs/ad_real.c Wed Jun 12 23:53:28 2002 +0000 +++ b/libmpcodecs/ad_real.c Thu Jun 13 00:14:28 2002 +0000 @@ -31,8 +31,8 @@ return malloc(size); } -#ifdef __FreeBSD__ -void* __ctype_b=NULL; +#if defined(__FreeBSD__) || defined(__NetBSD__) +void *__ctype_b=NULL; #endif static ulong (*raCloseCodec)(ulong); @@ -64,7 +64,7 @@ int len; void* prop; char path[4096]; - sprintf(path, LIBDIR "/real/%s", sh->codec->dll); + sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll); handle = dlopen (path, RTLD_LAZY); if(!handle){ mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Cannot open dll: %s\n",dlerror());
--- a/libmpcodecs/vd_real.c Wed Jun 12 23:53:28 2002 +0000 +++ b/libmpcodecs/vd_real.c Thu Jun 13 00:14:28 2002 +0000 @@ -14,7 +14,7 @@ #include "vd_internal.h" static vd_info_t info = { - "RealPlayer 8 video codecs", + "RealVideo decoder", "real", VFM_REAL, "Florian Schneider", @@ -48,11 +48,11 @@ // exit(1); } -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) void ___brk_addr(void) {exit(0);} -char** __environ={NULL}; +char **__environ={NULL}; #undef stderr -FILE* stderr=NULL; +FILE *stderr=NULL; #endif // to set/get/query special features/parameters @@ -147,11 +147,11 @@ mp_msg(MSGT_DECVIDEO,MSGL_V,"realvideo codec id: 0x%08X sub-id: 0x%08X\n",extrahdr[1],extrahdr[0]); - sprintf(path, LIBDIR "/real/%s", sh->codec->dll); + sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll); if(!load_syms(path)){ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll); - mp_msg(MSGT_DECVIDEO,MSGL_HINT,"You need to copy the contents of the codecs directory from RealPlayer8\n"); - mp_msg(MSGT_DECVIDEO,MSGL_HINT,"into " LIBDIR "/real/ !\n"); + mp_msg(MSGT_DECVIDEO,MSGL_HINT,"You need to copy the contents from the RealPlayer codecs directory\n"); + mp_msg(MSGT_DECVIDEO,MSGL_HINT,"into " REALCODEC_PATH "/ !\n"); return 0; } // only I420 supported
--- a/libmpdemux/demux_real.c Wed Jun 12 23:53:28 2002 +0000 +++ b/libmpdemux/demux_real.c Thu Jun 13 00:14:28 2002 +0000 @@ -8,6 +8,13 @@ TODO: fix the whole syncing mechanism $Log$ + Revision 1.16 2002/06/13 00:14:28 atmos4 + Implement Nilmoni's and Bernd Ernesti's patches for: + Better real codec dir detection and NetBSD real support. + Fix Nilmonis code, so it's working like expected. + Move a debug printf to mp_msg and some fixes in demux_real.c. + Some cosmetics :) -> RealPlayer 8 to RealPlayer, as RealOne (aka RealPlayer 9 works, too) + Revision 1.15 2002/06/10 13:55:56 arpi export subpacket-size and matrix w*h to the codec (cook) @@ -446,7 +453,7 @@ if (sh_audio != NULL) { dp = new_demux_packet(len); stream_read(demuxer->stream, dp->buffer, len); - fprintf(stderr,"audio block len=%d\n",len); + mp_dbg(MSGT_DEMUX,MSGL_DBG2,"audio block len=%d\n",len); if (sh_audio->format == 0x2000) { char *ptr = dp->buffer; @@ -1073,7 +1080,7 @@ sh_video_t *sh_video = d_video->sh; int video_chunk_pos = d_video->pos; int vid = d_video->id, aid = d_audio->id; - int next_offset; + int next_offset = 0; int rel_seek_frames = 0; int streams = 0; @@ -1144,5 +1151,5 @@ // printf("seek: pos: %d, current packets: a: %d, v: %d\n", // next_offset, priv->current_apacket, priv->current_vpacket); - stream_seek(demuxer->stream, next_offset); + return stream_seek(demuxer->stream, next_offset); }