Thanks to hints from Volodymyr M. Lisivka.
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so is required to get some
formats to work.
elif [ "$shared_ffmpeg" != "" ]
then
echo "PREFIX=$shared_ffmpeg" >> config.mak
- echo "CFLAGS+=$(pkg-config --cflags libavformat) $TMP_CFLAGS" >> config.mak
- echo "LDFLAGS+=$(pkg-config --libs libavformat)" >> config.mak
+ echo "CFLAGS+=$(pkg-config --cflags libavformat libavdevice) $TMP_CFLAGS" >> config.mak
+ echo "LDFLAGS+=$(pkg-config --libs-only-L libavformat libavdevice)" >> config.mak
[ -d "$shared_ffmpeg/include/ffmpeg/libavformat" ] &&
- echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg/libavformat -I$shared_ffmpeg/include/ffmpeg/libavcodec" >> config.mak
+ echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg/libavformat -I$shared_ffmpeg/include/ffmpeg/libavcodec -I$shared_ffmpeg/include/ffmpeg/libavdevice" >> config.mak
[ -d "$shared_ffmpeg/include/libavformat" ] &&
- echo "CFLAGS+=-I$shared_ffmpeg/include/libavformat -I$shared_ffmpeg/include/libavcodec" >> config.mak
+ echo "CFLAGS+=-I$shared_ffmpeg/include/libavformat -I$shared_ffmpeg/include/libavcodec -I$shared_ffmpeg/include/libavdevice" >> config.mak
avcodec_version=$(pkg-config --modversion libavcodec)
if [ "$swscale" != "" ] || ( [ $(echo $avcodec_version | cut -d. -f1) -ge 52 ] && [ $(echo $avcodec_version | cut -d. -f2) -ge 21 ] )
then
// ffmpeg Header files
#include <avformat.h>
+#include <avdevice.h>
// A static flag used to determine if avformat has been initialised
static int avformat_initialised = 0;
avformat_initialised = 1;
pthread_mutex_init( &avformat_mutex, NULL );
av_register_all( );
+ avdevice_register_all();
mlt_factory_register_for_clean_up( NULL, avformat_destroy );
av_log_set_level( mlt_log_get_level() );
}
params->sample_rate = 48000;
}
- // XXX: this does not work anymore since avdevice
- // TODO: make producer_avddevice?
// Parse out params
mrl = strchr( file, '?' );
while ( mrl )
// Check if we're seekable (something funny about mpeg here :-/)
if ( strncmp( file, "pipe:", 5 ) &&
+ strncmp( file, "/dev/", 5 ) &&
strncmp( file, "http:", 5 ) &&
strncmp( file, "udp:", 4 ) &&
strncmp( file, "tcp:", 4 ) &&