[Openchrome-users] MPlayer patch not fully successful

Craig Schubert darth
Sat Jan 21 19:58:28 PST 2006


I downloaded the MPlayer CVS source (and FFmpeg source) on Jan 22 2006 ... although I used "co main" and I now see the instructions were "co -P main".
When I applied the mplayer-uni-20060101.diff patch I saw 2 "FAILED" messages -

root at vector:# patch -Np0 < mplayer-uni-20060101.diff 
patching file Makefile
patching file codec-cfg.c
patching file configure
Hunk #1 succeeded at 390 (offset 2 lines).
Hunk #2 FAILED at 1451.
Hunk #3 FAILED at 3722.
Hunk #4 succeeded at 7994 (offset 39 lines).
2 out of 4 hunks FAILED -- saving rejects to file configure.rej
patching file xvmc_render.h
patching file etc/codecs.conf
Hunk #1 succeeded at 94 with fuzz 1 (offset 4 lines).
patching file libmpcodecs/img_format.c
patching file libmpcodecs/img_format.h
patching file libmpcodecs/vd_ffmpeg.c
patching file libvo/vo_xvmc.c
patching file libavcodec/allcodecs.c
Hunk #1 succeeded at 308 (offset 5 lines).
patching file libavcodec/avcodec.h
Hunk #1 succeeded at 255 (offset 2 lines).
Hunk #2 succeeded at 2122 (offset 8 lines).
patching file libavcodec/mpeg12.c
patching file libavcodec/xvmcvideo.c


The contents of the configure.rej file are then -

***************
*** 1450,1456 ****
cc_check -pipe && _pipe="-pipe" && echores "yes" || echores "no"

_prefix="/usr/local"
- _xvmclib="XvMCNVIDIA"

# GOTCHA: the variables below defines the default behavior for autodetection
# and have - unless stated otherwise - at least 2 states : yes no
--- 1451,1457 ----
cc_check -pipe && _pipe="-pipe" && echores "yes" || echores "no"

_prefix="/usr/local"
+ _xvmclib=""

# GOTCHA: the variables below defines the default behavior for autodetection
# and have - unless stated otherwise - at least 2 states : yes no
***************
*** 3721,3751 ****
echores "$_xv"


- echocheck "XvMC"
- if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no ; then
- _xvmc=no
- cat > $TMPC <<EOF
- #include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
- #include <X11/extensions/XvMClib.h>
int main(void) { 
(void) XvMCQueryExtension(0,0,0);
(void) XvMCCreateContext(0,0,0,0,0,0,0);
- return 0; }
- EOF
- cc_check $_inc_x11 -lXvMC -l$_xvmclib $_ld_xv $_ld_x11 && _xvmc=yes
- fi
- if test "$_xvmc" = yes ; then
- _def_xvmc='#define HAVE_XVMC 1'
- _ld_xvmc="-lXvMC -l$_xvmclib"
- _vosrc="$_vosrc vo_xvmc.c"
- _vomodules="xvmc $_vomodules"
- else
- _def_xvmc='#undef HAVE_XVMC'
- _novomodules="xvmc $_novomodules"
- fi
- echores "$_xvmc"


echocheck "Xinerama"
if test "$_x11" = yes && test "$_xinerama" != no ; then
--- 3722,3809 ----
echores "$_xv"


+ xvmc_check()
+ {
+ if test "$_xvmcvld" = yes; then
+ _xvmcinc="vldXvMC.h"
+ else
+ _xvmcinc="XvMClib.h"
+ fi
+ 
+ echo "#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
+ #include <X11/extensions/$_xvmcinc>
int main(void) { 
(void) XvMCQueryExtension(0,0,0);
(void) XvMCCreateContext(0,0,0,0,0,0,0);
+ return 0; }" > $TMPC
+ 
+ _success=0
+ cc_check $_inc_x11 -lXvMC -l$_xvmclib $_ld_xv $_ld_x11 && _success=1
+ return $_ok
+ }

+ # Note: here we try to determine what xvmc capability is available
+ # if the xvmc wrapper is available then we link to that, also we
+ # check whether we can include the vld (slice) level xvmc include file
+ if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no ; then
+ _xvmc=no
+ 
+ # No explicit xvmc lib specified so try and find one
+ if test "$_xvmclib" = ""; then
+ # Try with the xvmc wrapper+vld first
+ echocheck "XvMC (Wrapper+vld)"
+ _xvmclib="XvMCW"
+ _xvmcvld=yes
+ xvmc_check && _xvmc=yes
+ echores $_xvmc
+ 
+ # Try with the xvmc wrapper
+ if test "$_xvmc" = no ; then
+ echocheck "XvMC (Wrapper)"
+ _xvmcvld=no
+ xvmc_check && _xvmc=yes
+ echores $_xvmc
+ fi
+ 
+ # Try with the nvidia lib
+ if test "$_xvmc" = no ; then
+ echocheck "XvMC (NVIDIA)"
+ _xvmclib="XvMCNVIDIA"
+ xvmc_check && _xvmc=yes
+ echores $_xvmc
+ fi
+ else
+ # check for specified xvmc lib
+ echocheck "XvMC vld+("$_xvmclib")"
+ _xvmcvld=yes
+ xvmc_check && _xvmc=yes
+ echores $_xvmc
+ 
+ if test "$_xvmc" = no ; then
+ echocheck "XvMC ("$_xvmclib")"
+ _xvmcvld=no
+ xvmc_check && _xvmc=yes
+ echores $_xvmc
+ fi
+ fi
+ 
+ if test "$_xvmc" = yes ; then
+ _def_xvmc='#define HAVE_XVMC 1'
+ _ld_xvmc="-lXvMC -l$_xvmclib"
+ _vosrc="$_vosrc vo_xvmc.c"
+ _vomodules="xvmc $_vomodules"
+ else
+ _novomodules="xvmc $_novomodules"
+ _def_xvmc='#undef HAVE_XVMC'
+ fi
+ 
+ if test "$_xvmcvld" = yes; then
+ _def_xvmc_vld='#define HAVE_XVMC_VLD 1'
+ else
+ _def_xvmc_vld='#undef HAVE_XVMC_VLD'
+ fi
+ fi

echocheck "Xinerama"
if test "$_x11" = yes && test "$_xinerama" != no ; then


So I went ahead and configured the MPlayer source with ... --enable-xvmc --with-xvmclib=viaXvMC
If I don't include the "--with-xvmclib=viaXvMC" I see a message something like "xmvc enabled as i910" with is obviously wrong.
Then "make" gets as far as this -

-DHAVE_AV_CONFIG_H -I.. -I../libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o xvmcvideo.o xvmcvideo.c
xvmcvideo.c: In function `XVMC_init_block':
xvmcvideo.c:53: warning: assignment from incompatible pointer type
xvmcvideo.c: In function `XVMC_field_start':
xvmcvideo.c:165: error: structure has no member named `pict_type'
xvmcvideo.c: In function `XVMC_decode_mb':
xvmcvideo.c:337: warning: `return' with a value, in function returning void
make[1]: *** [xvmcvideo.o] Error 1
make[1]: Leaving directory `/usr/src/mplayer-cvs2/main/libavcodec'
make: *** [libavcodec/libavcodec.a] Error 2

Does this information help determine a revised patch?
Or is there some other possible solution?
Just for the record, I compiled my libviaXvMC.so files into /usr/X11R6/lib, not /usr/local/lib.
Any information appreciated. Thanks,
Craig S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wiki.openchrome.org/pipermail/openchrome-users/attachments/20060122/00ddaebe/attachment.html



More information about the Openchrome-users mailing list