export swscale=
export codecs=true
export filters=true
- export vdpau=
+ pkg-config x11 > /dev/null 2>&1
+ export x11=$?
for i in "$@"
do
echo "LOCAL_FFMPEG=1" >> config.mak
echo "LDFLAGS+=-Wl,-Bsymbolic" >> config.mak
extra_libs="$extra_libs -lm -lz -lbz2"
+
echo -e "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | gcc -I"`pwd`/ffmpeg" $CFLAGS -c -x c - >/dev/null 2>&1
- [ "$?" = "0" ] && echo "VDPAU=1" >> config.mak
+ [ "$x11" = "0" -a "$?" = "0" ] && echo "VDPAU=1" >> config.mak
elif [ "$static_ffmpeg" != "" ]
then
if [ -d "$static_ffmpeg" ]
fi
echo "LDFLAGS+=-Wl,-Bsymbolic" >> config.mak
extra_libs="$extra_libs -lm -lz -lbz2"
+
echo -e "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | gcc -I"$static_ffmpeg" $CFLAGS -c -x c - >/dev/null 2>&1
- [ "$?" = "0" ] && echo "VDPAU=1" >> config.mak
+ [ "$x11" = "0" -a "$?" = "0" ] && echo "VDPAU=1" >> config.mak
else
echo "avformat: Invalid path specified: $static_ffmpeg"
touch ../disable-avformat
echo "CFLAGS+=-I$shared_ffmpeg/include/libswscale" >> config.mak
echo "SWSCALE=1" >> config.mak
fi
+
echo -e "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | gcc -I"$(pkg-config --cflags libavformat)" -I"$shared_ffmpeg/include" $CFLAGS -c -x c - >/dev/null 2>&1
- [ "$?" = "0" ] && echo "VDPAU=1" >> config.mak
+ [ "$x11" = "0" -a "$?" = "0" ] && echo "VDPAU=1" >> config.mak
else
echo "avformat: No build environment found. "
echo " Try configuring mlt with --avformat-svn."
*/
#include <vdpau.h>
+#include <X11/Xlib.h>
extern pthread_mutex_t mlt_sdl_mutex;
mlt_log_debug( MLT_PRODUCER_SERVICE(this->parent), "vdpau_init\n" );
int success = 0;
mlt_properties properties = MLT_PRODUCER_PROPERTIES( this->parent );
+ Display *display = XOpenDisplay( NULL );
- if ( !mlt_environment( "x11_display" ) || mlt_properties_get_int( properties, "novdpau" ) )
+ if ( !display || mlt_properties_get_int( properties, "novdpau" ) )
return success;
if ( !g_vdpau )
{
int screen = mlt_properties_get_int( properties, "x11_screen" );
VdpDevice device;
- Display *display = (Display*) strtol( mlt_environment( "x11_display" ), NULL, 16 );
mlt_log_debug( MLT_PRODUCER_SERVICE(this->parent), "X11 Display = %p\n", display );
if ( VDP_STATUS_OK == create_device( display, screen, &device, &vdp_get_proc_address ) )