mirror of https://github.com/mpv-player/mpv
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) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6405 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
fd0c3b7c62
commit
d32c4241da
|
@ -140,7 +140,7 @@ Optional features:
|
|||
--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 @@ Use these options if autodetection fails:
|
|||
--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 @@ for ac_option do
|
|||
_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 @@ else
|
|||
_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 @@ else
|
|||
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 @@ $_def_xanim_path
|
|||
|
||||
/* 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
|
||||
|
|
|
@ -31,8 +31,8 @@ void *__builtin_new(unsigned long size) {
|
|||
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 @@ static int preinit(sh_audio_t *sh){
|
|||
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());
|
||||
|
|
|
@ -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 @@ void __pure_virtual(void) {
|
|||
// 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 @@ static int init(sh_video_t *sh){
|
|||
|
||||
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
|
||||
|
|
|
@ -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 @@ loop:
|
|||
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 @@ int demux_seek_real(demuxer_t *demuxer, float rel_seek_secs, int flags)
|
|||
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 @@ int demux_seek_real(demuxer_t *demuxer, float rel_seek_secs, int flags)
|
|||
|
||||
// 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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue