Added conversion/resampling functionality.
Added using of libav audio fifo buffer.
Works with latest git master of libav.
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Included --enable-android on configure script.
Build with that sample script:
#!/bin/sh
# Make sure you have TOOLCHAIN defined in .bashrc or .bash_profile and have linux/dvb headers in include dir.
SRC_DIR="`pwd`/tvheadend"
INCLUDE_DIR="`pwd`/out/include"
cd $SRC_DIR
export SYS_ROOT="$TOOLCHAIN/sysroot"
export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT -I$INCLUDE_DIR"
export CXX="arm-linux-androideabi-g++ --sysroot=$SYS_ROOT -I$INCLUDE_DIR"
export CPP="arm-linux-androideabi-cpp"
export LD="arm-linux-androideabi-ld"
export AR="arm-linux-androideabi-ar"
export RANLIB="arm-linux-androideabi-ranlib"
export STRIP="arm-linux-androideabi-strip"
export CROSSCOMPILE="arm-linux-androideabi-"
export CFLAGS="--sysroot=$SYS_ROOT -I$INCLUDE_DIR"
export CXXFLAGS="--sysroot=$SYS_ROOT -I$INCLUDE_DIR"
export LIBS="-lc -lgcc"
./configure --prefix=$SYS_ROOT/usr --arch=armv7 --platform=linux --disable-avahi --enable-bundle --python=/usr/bin/python --enable-android
make
TODO: change shm code to ashmem on tvhtime.c
source: http://pastebin.com/fGLBsdqb
Many thanks / all credit to @kvaster
[12:15] < kvaster> I've made a patch for newer libav locally. Will be able to submit today a bit later.
[12:17] < kvaster> http://pastebin.com/fGLBsdqb
[12:23] < kvaster> it was just small api changes inside libav, I'm worried only about audio stream buffer sizes.
[12:24] < kvaster> Anyway this is working for me at least.
- check the private u64 value rather than fd (gdb problems)
- move the run call outside the connect routine (locking issues)
- try to fix more leaks (PR_Cleanup)
Rather than check for specific glibc version on PLATFORM_LINUX, check
the existance of qsort_r.
This fixes the following compile error with musl libc:
CC src/main.o
In file included from src/main.c:39:0:
src/tvheadend.h:608:20: error: missing binary operator before token "("
#if !__GLIBC_PREREQ(2,8)
^
this is conditional based on a test run from the configure script, as this
type of test is certainly not 100% cross platform compatible.
However its very useful to have a true check of lock ownership rather than
the rather arbitary check that "someone" holds the lock.