- new generation of PAT and PMT decoders that can receive non-consecutive

    section numbers;
  - moved tables codecs into "src/tables";
  - moved PSI decoder in public files to allow external decoders.
parent 11c556c8
...@@ -2297,6 +2297,7 @@ os2*) ...@@ -2297,6 +2297,7 @@ os2*)
osf3* | osf4* | osf5*) osf3* | osf4* | osf5*)
version_type=osf version_type=osf
need_version=no need_version=no
need_lib_prefix=no
soname_spec='${libname}${release}.so' soname_spec='${libname}${release}.so'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
shlibpath_var=LD_LIBRARY_PATH shlibpath_var=LD_LIBRARY_PATH
...@@ -3420,13 +3421,7 @@ irix5* | irix6* | nonstopux*) ...@@ -3420,13 +3421,7 @@ irix5* | irix6* | nonstopux*)
# This must be Linux ELF. # This must be Linux ELF.
linux-gnu*) linux-gnu*)
case $host_cpu in lt_cv_deplibs_check_method=pass_all
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;; ;;
......
...@@ -1814,13 +1814,7 @@ irix5* | irix6* | nonstopux*) ...@@ -1814,13 +1814,7 @@ irix5* | irix6* | nonstopux*)
# This must be Linux ELF. # This must be Linux ELF.
linux-gnu*) linux-gnu*)
case $host_cpu in lt_cv_deplibs_check_method=pass_all
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;; ;;
...@@ -1897,13 +1891,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd ...@@ -1897,13 +1891,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
echo "configure:1901: checking for object suffix" >&5 echo "configure:1895: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
rm -f conftest* rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext echo 'int i = 1;' > conftest.$ac_ext
if { (eval echo configure:1907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do for ac_file in conftest.*; do
case $ac_file in case $ac_file in
*.c) ;; *.c) ;;
...@@ -1923,7 +1917,7 @@ ac_objext=$ac_cv_objext ...@@ -1923,7 +1917,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:1927: checking for executable suffix" >&5 echo "configure:1921: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1933,7 +1927,7 @@ else ...@@ -1933,7 +1927,7 @@ else
rm -f conftest* rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext= ac_cv_exeext=
if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do for file in conftest.*; do
case $file in case $file in
*.c | *.o | *.obj) ;; *.c | *.o | *.obj) ;;
...@@ -1964,7 +1958,7 @@ fi ...@@ -1964,7 +1958,7 @@ fi
# Check for command to grab the raw symbol name followed by C symbol from nm. # Check for command to grab the raw symbol name followed by C symbol from nm.
echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
echo "configure:1968: checking command to parse $NM output" >&5 echo "configure:1962: checking command to parse $NM output" >&5
if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2044,10 +2038,10 @@ void nm_test_func(){} ...@@ -2044,10 +2038,10 @@ void nm_test_func(){}
int main(){nm_test_var='a';nm_test_func();return(0);} int main(){nm_test_var='a';nm_test_func();return(0);}
EOF EOF
if { (eval echo configure:2048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
# Now try to grab the symbols. # Now try to grab the symbols.
nlist=conftest.nm nlist=conftest.nm
if { (eval echo configure:2051: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then if { (eval echo configure:2045: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
# Try sorting and uniquifying the output. # Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist" mv -f "$nlist"T "$nlist"
...@@ -2098,7 +2092,7 @@ EOF ...@@ -2098,7 +2092,7 @@ EOF
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
LIBS="conftstm.$ac_objext" LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$no_builtin_flag" CFLAGS="$CFLAGS$no_builtin_flag"
if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes pipe_works=yes
fi fi
LIBS="$save_LIBS" LIBS="$save_LIBS"
...@@ -2147,17 +2141,17 @@ for ac_hdr in dlfcn.h ...@@ -2147,17 +2141,17 @@ for ac_hdr in dlfcn.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2151: checking for $ac_hdr" >&5 echo "configure:2145: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2156 "configure" #line 2150 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2192,7 +2186,7 @@ case $deplibs_check_method in ...@@ -2192,7 +2186,7 @@ case $deplibs_check_method in
file_magic*) file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
echo "configure:2196: checking for ${ac_tool_prefix}file" >&5 echo "configure:2190: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2254,7 +2248,7 @@ fi ...@@ -2254,7 +2248,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6 echo $ac_n "checking for file""... $ac_c" 1>&6
echo "configure:2258: checking for file" >&5 echo "configure:2252: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2325,7 +2319,7 @@ esac ...@@ -2325,7 +2319,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2329: checking for $ac_word" >&5 echo "configure:2323: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2357,7 +2351,7 @@ if test -n "$ac_tool_prefix"; then ...@@ -2357,7 +2351,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2361: checking for $ac_word" >&5 echo "configure:2355: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2392,7 +2386,7 @@ fi ...@@ -2392,7 +2386,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2 set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2396: checking for $ac_word" >&5 echo "configure:2390: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2424,7 +2418,7 @@ if test -n "$ac_tool_prefix"; then ...@@ -2424,7 +2418,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args. # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2 set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2428: checking for $ac_word" >&5 echo "configure:2422: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2473,8 +2467,8 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ...@@ -2473,8 +2467,8 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in case $host in
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo '#line 2477 "configure"' > conftest.$ac_ext echo '#line 2471 "configure"' > conftest.$ac_ext
if { (eval echo configure:2478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in case `/usr/bin/file conftest.$ac_objext` in
*32-bit*) *32-bit*)
LD="${LD-ld} -32" LD="${LD-ld} -32"
...@@ -2495,7 +2489,7 @@ case $host in ...@@ -2495,7 +2489,7 @@ case $host in
SAVE_CFLAGS="$CFLAGS" SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf" CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2499: checking whether the C compiler needs -belf" >&5 echo "configure:2493: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2508,14 +2502,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a ...@@ -2508,14 +2502,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2512 "configure" #line 2506 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
lt_cv_cc_needs_belf=yes lt_cv_cc_needs_belf=yes
else else
...@@ -2635,7 +2629,7 @@ set dummy $CC ...@@ -2635,7 +2629,7 @@ set dummy $CC
compiler="$2" compiler="$2"
echo $ac_n "checking for objdir""... $ac_c" 1>&6 echo $ac_n "checking for objdir""... $ac_c" 1>&6
echo "configure:2639: checking for objdir" >&5 echo "configure:2633: checking for objdir" >&5
rm -f .libs 2>/dev/null rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null mkdir .libs 2>/dev/null
if test -d .libs; then if test -d .libs; then
...@@ -2662,7 +2656,7 @@ test -z "$pic_mode" && pic_mode=default ...@@ -2662,7 +2656,7 @@ test -z "$pic_mode" && pic_mode=default
# in isolation, and that seeing it set (from the cache) indicates that # in isolation, and that seeing it set (from the cache) indicates that
# the associated values are set (in the cache) correctly too. # the associated values are set (in the cache) correctly too.
echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
echo "configure:2666: checking for $compiler option to produce PIC" >&5 echo "configure:2660: checking for $compiler option to produce PIC" >&5
if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2814,21 +2808,21 @@ else ...@@ -2814,21 +2808,21 @@ else
# Check to make sure the pic_flag actually works. # Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
echo "configure:2818: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 echo "configure:2812: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2825 "configure" #line 2819 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
case $host_os in case $host_os in
hpux9* | hpux10* | hpux11*) hpux9* | hpux10* | hpux11*)
...@@ -2880,7 +2874,7 @@ if test -n "$lt_cv_prog_cc_shlib"; then ...@@ -2880,7 +2874,7 @@ if test -n "$lt_cv_prog_cc_shlib"; then
fi fi
echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
echo "configure:2884: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 echo "configure:2878: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2888,14 +2882,14 @@ else ...@@ -2888,14 +2882,14 @@ else
save_LDFLAGS="$LDFLAGS" save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2892 "configure" #line 2886 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
lt_cv_prog_cc_static_works=yes lt_cv_prog_cc_static_works=yes
else else
...@@ -2922,7 +2916,7 @@ can_build_shared="$lt_cv_prog_cc_can_build_shared" ...@@ -2922,7 +2916,7 @@ can_build_shared="$lt_cv_prog_cc_can_build_shared"
# Check to see if options -o and -c are simultaneously supported by compiler # Check to see if options -o and -c are simultaneously supported by compiler
echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
echo "configure:2926: checking if $compiler supports -c -o file.$ac_objext" >&5 echo "configure:2920: checking if $compiler supports -c -o file.$ac_objext" >&5
if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2941,7 +2935,7 @@ chmod -w . ...@@ -2941,7 +2935,7 @@ chmod -w .
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no compiler_c_o=no
if { (eval echo configure:2945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then if { (eval echo configure:2939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
if test -s out/conftest.err; then if test -s out/conftest.err; then
...@@ -2970,7 +2964,7 @@ echo "$ac_t""$compiler_c_o" 1>&6 ...@@ -2970,7 +2964,7 @@ echo "$ac_t""$compiler_c_o" 1>&6
if test x"$compiler_c_o" = x"yes"; then if test x"$compiler_c_o" = x"yes"; then
# Check to see if we can write to a .lo # Check to see if we can write to a .lo
echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
echo "configure:2974: checking if $compiler supports -c -o file.lo" >&5 echo "configure:2968: checking if $compiler supports -c -o file.lo" >&5
if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2981,14 +2975,14 @@ else ...@@ -2981,14 +2975,14 @@ else
save_objext="$ac_objext" save_objext="$ac_objext"
ac_objext=lo ac_objext=lo
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2985 "configure" #line 2979 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
int some_variable = 0; int some_variable = 0;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -3019,7 +3013,7 @@ hard_links="nottested" ...@@ -3019,7 +3013,7 @@ hard_links="nottested"
if test "$compiler_c_o" = no && test "$need_locks" != no; then if test "$compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user # do not overwrite the value of need_locks provided by the user
echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
echo "configure:3023: checking if we can lock with hard links" >&5 echo "configure:3017: checking if we can lock with hard links" >&5
hard_links=yes hard_links=yes
$rm conftest* $rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no
...@@ -3038,20 +3032,20 @@ fi ...@@ -3038,20 +3032,20 @@ fi
if test "$GCC" = yes; then if test "$GCC" = yes; then
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
echo "configure:3042: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo "configure:3036: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
echo "int some_variable = 0;" > conftest.$ac_ext echo "int some_variable = 0;" > conftest.$ac_ext
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
compiler_rtti_exceptions=no compiler_rtti_exceptions=no
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3048 "configure" #line 3042 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
int some_variable = 0; int some_variable = 0;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -3078,7 +3072,7 @@ fi ...@@ -3078,7 +3072,7 @@ fi
# See if the linker supports building shared libraries. # See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
echo "configure:3082: checking whether the linker ($LD) supports shared libraries" >&5 echo "configure:3076: checking whether the linker ($LD) supports shared libraries" >&5
allow_undefined_flag= allow_undefined_flag=
no_undefined_flag= no_undefined_flag=
...@@ -3763,7 +3757,7 @@ test "$ld_shlibs" = no && can_build_shared=no ...@@ -3763,7 +3757,7 @@ test "$ld_shlibs" = no && can_build_shared=no
# Check hardcoding attributes. # Check hardcoding attributes.
echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
echo "configure:3767: checking how to hardcode library paths into programs" >&5 echo "configure:3761: checking how to hardcode library paths into programs" >&5
hardcode_action= hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \ if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var"; then test -n "$runpath_var"; then
...@@ -3791,7 +3785,7 @@ echo "$ac_t""$hardcode_action" 1>&6 ...@@ -3791,7 +3785,7 @@ echo "$ac_t""$hardcode_action" 1>&6
striplib= striplib=
old_striplib= old_striplib=
echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
echo "configure:3795: checking whether stripping libraries is possible" >&5 echo "configure:3789: checking whether stripping libraries is possible" >&5
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded" test -z "$striplib" && striplib="$STRIP --strip-unneeded"
...@@ -3805,7 +3799,7 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown ...@@ -3805,7 +3799,7 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
# PORTME Fill in your ld.so characteristics # PORTME Fill in your ld.so characteristics
echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
echo "configure:3809: checking dynamic linker characteristics" >&5 echo "configure:3803: checking dynamic linker characteristics" >&5
library_names_spec= library_names_spec=
libname_spec='lib$name' libname_spec='lib$name'
soname_spec= soname_spec=
...@@ -4114,6 +4108,7 @@ os2*) ...@@ -4114,6 +4108,7 @@ os2*)
osf3* | osf4* | osf5*) osf3* | osf4* | osf5*)
version_type=osf version_type=osf
need_version=no need_version=no
need_lib_prefix=no
soname_spec='${libname}${release}.so' soname_spec='${libname}${release}.so'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
shlibpath_var=LD_LIBRARY_PATH shlibpath_var=LD_LIBRARY_PATH
...@@ -4205,11 +4200,11 @@ test "$dynamic_linker" = no && can_build_shared=no ...@@ -4205,11 +4200,11 @@ test "$dynamic_linker" = no && can_build_shared=no
# Report the final consequences. # Report the final consequences.
echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
echo "configure:4209: checking if libtool supports shared libraries" >&5 echo "configure:4204: checking if libtool supports shared libraries" >&5
echo "$ac_t""$can_build_shared" 1>&6 echo "$ac_t""$can_build_shared" 1>&6
echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
echo "configure:4213: checking whether to build shared libraries" >&5 echo "configure:4208: checking whether to build shared libraries" >&5
test "$can_build_shared" = "no" && enable_shared=no test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and # On AIX, shared libraries and static libraries use the same namespace, and
...@@ -4232,7 +4227,7 @@ esac ...@@ -4232,7 +4227,7 @@ esac
echo "$ac_t""$enable_shared" 1>&6 echo "$ac_t""$enable_shared" 1>&6
echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
echo "configure:4236: checking whether to build static libraries" >&5 echo "configure:4231: checking whether to build static libraries" >&5
# Make sure either enable_shared or enable_static is yes. # Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes test "$enable_shared" = yes || enable_static=yes
echo "$ac_t""$enable_static" 1>&6 echo "$ac_t""$enable_static" 1>&6
...@@ -4273,12 +4268,12 @@ else ...@@ -4273,12 +4268,12 @@ else
*) *)
echo $ac_n "checking for shl_load""... $ac_c" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
echo "configure:4277: checking for shl_load" >&5 echo "configure:4272: checking for shl_load" >&5
if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4282 "configure" #line 4277 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load(); below. */ which can conflict with char shl_load(); below. */
...@@ -4301,7 +4296,7 @@ shl_load(); ...@@ -4301,7 +4296,7 @@ shl_load();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_shl_load=yes" eval "ac_cv_func_shl_load=yes"
else else
...@@ -4319,7 +4314,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then ...@@ -4319,7 +4314,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
echo "configure:4323: checking for shl_load in -ldld" >&5 echo "configure:4318: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4327,7 +4322,7 @@ else ...@@ -4327,7 +4322,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS" LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4331 "configure" #line 4326 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -4338,7 +4333,7 @@ int main() { ...@@ -4338,7 +4333,7 @@ int main() {
shl_load() shl_load()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4357,12 +4352,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ...@@ -4357,12 +4352,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "configure:4361: checking for dlopen" >&5 echo "configure:4356: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4366 "configure" #line 4361 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */ which can conflict with char dlopen(); below. */
...@@ -4385,7 +4380,7 @@ dlopen(); ...@@ -4385,7 +4380,7 @@ dlopen();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_dlopen=yes" eval "ac_cv_func_dlopen=yes"
else else
...@@ -4403,7 +4398,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then ...@@ -4403,7 +4398,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:4407: checking for dlopen in -ldl" >&5 echo "configure:4402: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4411,7 +4406,7 @@ else ...@@ -4411,7 +4406,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS" LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4415 "configure" #line 4410 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -4422,7 +4417,7 @@ int main() { ...@@ -4422,7 +4417,7 @@ int main() {
dlopen() dlopen()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4441,7 +4436,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ...@@ -4441,7 +4436,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
echo "configure:4445: checking for dlopen in -lsvld" >&5 echo "configure:4440: checking for dlopen in -lsvld" >&5
ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4449,7 +4444,7 @@ else ...@@ -4449,7 +4444,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lsvld $LIBS" LIBS="-lsvld $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4453 "configure" #line 4448 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -4460,7 +4455,7 @@ int main() { ...@@ -4460,7 +4455,7 @@ int main() {
dlopen() dlopen()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4479,7 +4474,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ...@@ -4479,7 +4474,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
echo "configure:4483: checking for dld_link in -ldld" >&5 echo "configure:4478: checking for dld_link in -ldld" >&5
ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4487,7 +4482,7 @@ else ...@@ -4487,7 +4482,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS" LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4491 "configure" #line 4486 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -4498,7 +4493,7 @@ int main() { ...@@ -4498,7 +4493,7 @@ int main() {
dld_link() dld_link()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4554,7 +4549,7 @@ fi ...@@ -4554,7 +4549,7 @@ fi
LIBS="$lt_cv_dlopen_libs $LIBS" LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
echo "configure:4558: checking whether a program can dlopen itself" >&5 echo "configure:4553: checking whether a program can dlopen itself" >&5
if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4564,7 +4559,7 @@ else ...@@ -4564,7 +4559,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4568 "configure" #line 4563 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -4625,7 +4620,7 @@ int main () ...@@ -4625,7 +4620,7 @@ int main ()
exit (status); exit (status);
} }
EOF EOF
if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then if { (eval echo configure:4624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) 2>/dev/null (./conftest; exit; ) 2>/dev/null
lt_status=$? lt_status=$?
case x$lt_status in case x$lt_status in
...@@ -4648,7 +4643,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6 ...@@ -4648,7 +4643,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
if test "x$lt_cv_dlopen_self" = xyes; then if test "x$lt_cv_dlopen_self" = xyes; then
LDFLAGS="$LDFLAGS $link_static_flag" LDFLAGS="$LDFLAGS $link_static_flag"
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
echo "configure:4652: checking whether a statically linked program can dlopen itself" >&5 echo "configure:4647: checking whether a statically linked program can dlopen itself" >&5
if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4658,7 +4653,7 @@ else ...@@ -4658,7 +4653,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4662 "configure" #line 4657 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -4719,7 +4714,7 @@ int main () ...@@ -4719,7 +4714,7 @@ int main ()
exit (status); exit (status);
} }
EOF EOF
if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) 2>/dev/null (./conftest; exit; ) 2>/dev/null
lt_status=$? lt_status=$?
case x$lt_status in case x$lt_status in
...@@ -4768,14 +4763,14 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then ...@@ -4768,14 +4763,14 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then
# systems, -lgcc has to come before -lc. If gcc already passes -lc # systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc. # to ld, don't add -lc before -lgcc.
echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
echo "configure:4772: checking whether -lc should be explicitly linked in" >&5 echo "configure:4767: checking whether -lc should be explicitly linked in" >&5
if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
$rm conftest* $rm conftest*
echo 'static int dummy;' > conftest.$ac_ext echo 'static int dummy;' > conftest.$ac_ext
if { (eval echo configure:4779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
soname=conftest soname=conftest
lib=conftest lib=conftest
libobjs=conftest.$ac_objext libobjs=conftest.$ac_objext
...@@ -4788,7 +4783,7 @@ else ...@@ -4788,7 +4783,7 @@ else
libname=conftest libname=conftest
save_allow_undefined_flag=$allow_undefined_flag save_allow_undefined_flag=$allow_undefined_flag
allow_undefined_flag= allow_undefined_flag=
if { (eval echo configure:4792: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } if { (eval echo configure:4787: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
then then
lt_cv_archive_cmds_need_lc=no lt_cv_archive_cmds_need_lc=no
else else
...@@ -5512,7 +5507,7 @@ done ...@@ -5512,7 +5507,7 @@ done
ac_given_srcdir=$srcdir ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL" ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile src/Makefile examples/Makefile misc/Makefile src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 trap 'rm -fr `echo "Makefile src/Makefile src/tables/Makefile examples/Makefile misc/Makefile src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF EOF
cat >> $CONFIG_STATUS <<EOF cat >> $CONFIG_STATUS <<EOF
...@@ -5615,7 +5610,7 @@ EOF ...@@ -5615,7 +5610,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile examples/Makefile misc/Makefile"} CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile src/tables/Makefile examples/Makefile misc/Makefile"}
EOF EOF
cat >> $CONFIG_STATUS <<\EOF cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
......
...@@ -42,7 +42,7 @@ else ...@@ -42,7 +42,7 @@ else
fi fi
AC_OUTPUT([Makefile src/Makefile examples/Makefile misc/Makefile]) AC_OUTPUT([Makefile src/Makefile src/tables/Makefile examples/Makefile misc/Makefile])
echo " echo "
libdvbpsi configuration libdvbpsi configuration
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* decode_pat.c: PAT decoder example * decode_pat.c: PAT decoder example
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: decode_pat.c,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: decode_pat.c,v 1.2 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#ifdef DVBPSI_DIST #ifdef DVBPSI_DIST
#include "../src/dvbpsi.h" #include "../src/dvbpsi.h"
#include "../src/psi.h" #include "../src/psi.h"
#include "../src/pat.h" #include "../src/tables/pat.h"
#else #else
#include <dvbpsi/dvbpsi.h> #include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h> #include <dvbpsi/psi.h>
...@@ -88,7 +88,6 @@ void DumpPAT(void* p_zero, dvbpsi_pat_t* p_pat) ...@@ -88,7 +88,6 @@ void DumpPAT(void* p_zero, dvbpsi_pat_t* p_pat)
p_program = p_program->p_next; p_program = p_program->p_next;
} }
printf( " active : %d\n", p_pat->b_current_next); printf( " active : %d\n", p_pat->b_current_next);
printf( " complete : %d\n\n", p_pat->b_complete);
dvbpsi_DeletePAT(p_pat); dvbpsi_DeletePAT(p_pat);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* decode_pmt.c: PAT decoder example * decode_pmt.c: PAT decoder example
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: decode_pmt.c,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: decode_pmt.c,v 1.2 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "../src/dvbpsi.h" #include "../src/dvbpsi.h"
#include "../src/psi.h" #include "../src/psi.h"
#include "../src/descriptor.h" #include "../src/descriptor.h"
#include "../src/pmt.h" #include "../src/tables/pmt.h"
#else #else
#include <dvbpsi/dvbpsi.h> #include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h> #include <dvbpsi/psi.h>
...@@ -112,8 +112,6 @@ void DumpPMT(void* p_zero, dvbpsi_pmt_t* p_pmt) ...@@ -112,8 +112,6 @@ void DumpPMT(void* p_zero, dvbpsi_pmt_t* p_pmt)
DumpDescriptors(" | ]", p_es->p_first_descriptor); DumpDescriptors(" | ]", p_es->p_first_descriptor);
p_es = p_es->p_next; p_es = p_es->p_next;
} }
printf( " complete : %d\n\n",
p_pmt->b_complete);
dvbpsi_DeletePMT(p_pmt); dvbpsi_DeletePMT(p_pmt);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gen_pat.c: PAT generator * gen_pat.c: PAT generator
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: gen_pat.c,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: gen_pat.c,v 1.2 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#ifdef DVBPSI_DIST #ifdef DVBPSI_DIST
#include "../src/dvbpsi.h" #include "../src/dvbpsi.h"
#include "../src/psi.h" #include "../src/psi.h"
#include "../src/pat.h" #include "../src/tables/pat.h"
#else #else
#include <dvbpsi/dvbpsi.h> #include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h> #include <dvbpsi/psi.h>
...@@ -142,12 +142,12 @@ int main(int i_argc, char* pa_argv[]) ...@@ -142,12 +142,12 @@ int main(int i_argc, char* pa_argv[])
writePSI(packet, p_section6); writePSI(packet, p_section6);
dvbpsi_DeletePSISection(p_section1); dvbpsi_DeletePSISections(p_section1);
dvbpsi_DeletePSISection(p_section2); dvbpsi_DeletePSISections(p_section2);
dvbpsi_DeletePSISection(p_section3); dvbpsi_DeletePSISections(p_section3);
dvbpsi_DeletePSISection(p_section4); dvbpsi_DeletePSISections(p_section4);
dvbpsi_DeletePSISection(p_section5); dvbpsi_DeletePSISections(p_section5);
dvbpsi_DeletePSISection(p_section6); dvbpsi_DeletePSISections(p_section6);
dvbpsi_EmptyPAT(&pat); dvbpsi_EmptyPAT(&pat);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gen_pmt.c: PMT generator * gen_pmt.c: PMT generator
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: gen_pmt.c,v 1.1 2002/01/09 11:22:26 bozo Exp $ * $Id: gen_pmt.c,v 1.2 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "../src/dvbpsi.h" #include "../src/dvbpsi.h"
#include "../src/psi.h" #include "../src/psi.h"
#include "../src/descriptor.h" #include "../src/descriptor.h"
#include "../src/pmt.h" #include "../src/tables/pmt.h"
#else #else
#include <dvbpsi/dvbpsi.h> #include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h> #include <dvbpsi/psi.h>
...@@ -149,12 +149,12 @@ int main(int i_argc, char* pa_argv[]) ...@@ -149,12 +149,12 @@ int main(int i_argc, char* pa_argv[])
writePSI(packet, p_section6); writePSI(packet, p_section6);
dvbpsi_DeletePSISection(p_section1); dvbpsi_DeletePSISections(p_section1);
dvbpsi_DeletePSISection(p_section2); dvbpsi_DeletePSISections(p_section2);
dvbpsi_DeletePSISection(p_section3); dvbpsi_DeletePSISections(p_section3);
dvbpsi_DeletePSISection(p_section4); dvbpsi_DeletePSISections(p_section4);
dvbpsi_DeletePSISection(p_section5); dvbpsi_DeletePSISections(p_section5);
dvbpsi_DeletePSISection(p_section6); dvbpsi_DeletePSISections(p_section6);
dvbpsi_EmptyPMT(&pmt); dvbpsi_EmptyPMT(&pmt);
......
...@@ -2,11 +2,14 @@ ...@@ -2,11 +2,14 @@
pkgincludedir = $(includedir)/dvbpsi pkgincludedir = $(includedir)/dvbpsi
SUBDIRS = tables
lib_LTLIBRARIES = libdvbpsi.la lib_LTLIBRARIES = libdvbpsi.la
libdvbpsi_la_SOURCES = dvbpsi.c psi.c pat.c descriptor.c pmt.c libdvbpsi_la_SOURCES = dvbpsi.c psi.c descriptor.c
libdvbpsi_la_LIBADD = tables/lib_tables.la
libdvbpsi_la_LDFLAGS = -release @VERSION@ libdvbpsi_la_LDFLAGS = -release @VERSION@
noinst_HEADERS = dvbpsi_private.h psi_private.h pat_private.h pmt_private.h noinst_HEADERS = dvbpsi_private.h
pkginclude_HEADERS = dvbpsi.h psi.h pat.h descriptor.h pmt.h pkginclude_HEADERS = dvbpsi.h psi.h descriptor.h
...@@ -75,13 +75,16 @@ VERSION = @VERSION@ ...@@ -75,13 +75,16 @@ VERSION = @VERSION@
pkgincludedir = $(includedir)/dvbpsi pkgincludedir = $(includedir)/dvbpsi
SUBDIRS = tables
lib_LTLIBRARIES = libdvbpsi.la lib_LTLIBRARIES = libdvbpsi.la
libdvbpsi_la_SOURCES = dvbpsi.c psi.c pat.c descriptor.c pmt.c libdvbpsi_la_SOURCES = dvbpsi.c psi.c descriptor.c
libdvbpsi_la_LIBADD = tables/lib_tables.la
libdvbpsi_la_LDFLAGS = -release @VERSION@ libdvbpsi_la_LDFLAGS = -release @VERSION@
noinst_HEADERS = dvbpsi_private.h psi_private.h pat_private.h pmt_private.h noinst_HEADERS = dvbpsi_private.h
pkginclude_HEADERS = dvbpsi.h psi.h pat.h descriptor.h pmt.h pkginclude_HEADERS = dvbpsi.h psi.h descriptor.h
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
...@@ -92,8 +95,8 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I. ...@@ -92,8 +95,8 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
libdvbpsi_la_LIBADD = libdvbpsi_la_DEPENDENCIES = tables/lib_tables.la
libdvbpsi_la_OBJECTS = dvbpsi.lo psi.lo pat.lo descriptor.lo pmt.lo libdvbpsi_la_OBJECTS = dvbpsi.lo psi.lo descriptor.lo
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
...@@ -108,8 +111,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ...@@ -108,8 +111,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar TAR = tar
GZIP_ENV = --best GZIP_ENV = --best
DEP_FILES = .deps/descriptor.P .deps/dvbpsi.P .deps/pat.P .deps/pmt.P \ DEP_FILES = .deps/descriptor.P .deps/dvbpsi.P .deps/psi.P
.deps/psi.P
SOURCES = $(libdvbpsi_la_SOURCES) SOURCES = $(libdvbpsi_la_SOURCES)
OBJECTS = $(libdvbpsi_la_OBJECTS) OBJECTS = $(libdvbpsi_la_OBJECTS)
...@@ -233,6 +235,61 @@ uninstall-pkgincludeHEADERS: ...@@ -233,6 +235,61 @@ uninstall-pkgincludeHEADERS:
rm -f $(DESTDIR)$(pkgincludedir)/$$p; \ rm -f $(DESTDIR)$(pkgincludedir)/$$p; \
done done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) ID: $(HEADERS) $(SOURCES) $(LISP)
...@@ -243,9 +300,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) ...@@ -243,9 +300,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \ here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP) && mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \ list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \ unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \ awk ' { files[$$0] = 1; } \
...@@ -282,6 +344,16 @@ distdir: $(DISTFILES) ...@@ -282,6 +344,16 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \ || cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \ fi; \
done done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
...@@ -315,32 +387,33 @@ maintainer-clean-depend: ...@@ -315,32 +387,33 @@ maintainer-clean-depend:
>> .deps/$(*F).P; \ >> .deps/$(*F).P; \
rm -f .deps/$(*F).pp rm -f .deps/$(*F).pp
info-am: info-am:
info: info-am info: info-recursive
dvi-am: dvi-am:
dvi: dvi-am dvi: dvi-recursive
check-am: all-am check-am: all-am
check: check-am check: check-recursive
installcheck-am: installcheck-am:
installcheck: installcheck-am installcheck: installcheck-recursive
all-recursive-am: config.h all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am: install-libLTLIBRARIES install-exec-am: install-libLTLIBRARIES
install-exec: install-exec-am install-exec: install-exec-recursive
install-data-am: install-pkgincludeHEADERS install-data-am: install-pkgincludeHEADERS
install-data: install-data-am install-data: install-data-recursive
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am install: install-recursive
uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
uninstall: uninstall-am uninstall: uninstall-recursive
all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
all-redirect: all-am all-redirect: all-recursive-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(pkgincludedir) $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(pkgincludedir)
...@@ -357,19 +430,19 @@ mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \ ...@@ -357,19 +430,19 @@ mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \
mostlyclean-compile mostlyclean-libtool \ mostlyclean-compile mostlyclean-libtool \
mostlyclean-tags mostlyclean-depend mostlyclean-generic mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \ clean-am: clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \
clean-tags clean-depend clean-generic mostlyclean-am clean-tags clean-depend clean-generic mostlyclean-am
clean: clean-am clean: clean-recursive
distclean-am: distclean-hdr distclean-libLTLIBRARIES distclean-compile \ distclean-am: distclean-hdr distclean-libLTLIBRARIES distclean-compile \
distclean-libtool distclean-tags distclean-depend \ distclean-libtool distclean-tags distclean-depend \
distclean-generic clean-am distclean-generic clean-am
-rm -f libtool -rm -f libtool
distclean: distclean-am distclean: distclean-recursive
maintainer-clean-am: maintainer-clean-hdr \ maintainer-clean-am: maintainer-clean-hdr \
maintainer-clean-libLTLIBRARIES \ maintainer-clean-libLTLIBRARIES \
...@@ -379,7 +452,7 @@ maintainer-clean-am: maintainer-clean-hdr \ ...@@ -379,7 +452,7 @@ maintainer-clean-am: maintainer-clean-hdr \
@echo "This command is intended for maintainers to use;" @echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-recursive
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
...@@ -388,13 +461,19 @@ uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ ...@@ -388,13 +461,19 @@ uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \ distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \ mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool uninstall-pkgincludeHEADERS \ maintainer-clean-libtool uninstall-pkgincludeHEADERS \
install-pkgincludeHEADERS tags mostlyclean-tags distclean-tags \ install-pkgincludeHEADERS install-data-recursive \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \ uninstall-data-recursive install-exec-recursive \
distclean-depend clean-depend maintainer-clean-depend info-am info \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ all-recursive check-recursive installcheck-recursive info-recursive \
install-exec-am install-exec install-data-am install-data install-am \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
install uninstall-am uninstall all-redirect all-am all installdirs \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
mostlyclean-generic distclean-generic clean-generic \ distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck all-recursive-am install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean maintainer-clean-generic clean mostlyclean distclean maintainer-clean
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvbpsi.c: conversion from TS packets to PSI sections * dvbpsi.c: conversion from TS packets to PSI sections
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: dvbpsi.c,v 1.2 2002/01/07 18:44:03 bozo Exp $ * $Id: dvbpsi.c,v 1.3 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -31,9 +31,8 @@ ...@@ -31,9 +31,8 @@
#include <stdio.h> #include <stdio.h>
#include "dvbpsi.h" #include "dvbpsi.h"
#include "psi.h"
#include "dvbpsi_private.h" #include "dvbpsi_private.h"
#include "psi_private.h" #include "psi.h"
/***************************************************************************** /*****************************************************************************
...@@ -71,7 +70,7 @@ void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data) ...@@ -71,7 +70,7 @@ void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data)
h_dvbpsi->b_discontinuity = 1; h_dvbpsi->b_discontinuity = 1;
if(h_dvbpsi->p_current_section) if(h_dvbpsi->p_current_section)
{ {
dvbpsi_DeletePSISection(h_dvbpsi->p_current_section); dvbpsi_DeletePSISections(h_dvbpsi->p_current_section);
h_dvbpsi->p_current_section = NULL; h_dvbpsi->p_current_section = NULL;
} }
} }
...@@ -148,7 +147,7 @@ void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data) ...@@ -148,7 +147,7 @@ void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data)
if(h_dvbpsi->i_need > h_dvbpsi->i_section_max_size - 3) if(h_dvbpsi->i_need > h_dvbpsi->i_section_max_size - 3)
{ {
DVBPSI_ERROR("PSI decoder", "PSI section too long"); DVBPSI_ERROR("PSI decoder", "PSI section too long");
dvbpsi_DeletePSISection(p_section); dvbpsi_DeletePSISections(p_section);
h_dvbpsi->p_current_section = NULL; h_dvbpsi->p_current_section = NULL;
/* If there is a new section not being handled then go forward /* If there is a new section not being handled then go forward
in the packet */ in the packet */
...@@ -203,7 +202,7 @@ void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data) ...@@ -203,7 +202,7 @@ void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data)
else else
{ {
/* PSI section isn't valid => trash it */ /* PSI section isn't valid => trash it */
dvbpsi_DeletePSISection(p_section); dvbpsi_DeletePSISections(p_section);
h_dvbpsi->p_current_section = NULL; h_dvbpsi->p_current_section = NULL;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvbpsi.h: main header * dvbpsi.h: main header
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: dvbpsi.h,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: dvbpsi.h,v 1.2 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -47,6 +47,45 @@ typedef struct dvbpsi_decoder_s * dvbpsi_handle; ...@@ -47,6 +47,45 @@ typedef struct dvbpsi_decoder_s * dvbpsi_handle;
void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data); void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data);
/*****************************************************************************
* The following definitions are just here to allow external decoders but
* shouldn't be used for any other purpose.
*****************************************************************************/
typedef struct dvbpsi_psi_section_s dvbpsi_psi_section_t;
/*****************************************************************************
* dvbpsi_callback
*****************************************************************************
* Callback type definition.
*****************************************************************************/
typedef void (* dvbpsi_callback)(dvbpsi_handle p_decoder,
dvbpsi_psi_section_t* p_section);
/*****************************************************************************
* dvbpsi_decoder_t
*****************************************************************************
* PSI decoder.
*****************************************************************************/
typedef struct dvbpsi_decoder_s
{
dvbpsi_callback pf_callback;
void * p_private_decoder;
int i_section_max_size;
uint8_t i_continuity_counter;
int b_discontinuity;
dvbpsi_psi_section_t * p_current_section;
int i_need;
int b_complete_header;
} dvbpsi_decoder_t;
#else #else
#error "Multiple inclusions of dvbpsi.h" #error "Multiple inclusions of dvbpsi.h"
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvbpsi_private.h: main private header * dvbpsi_private.h: main private header
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: dvbpsi_private.h,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: dvbpsi_private.h,v 1.2 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -28,38 +28,6 @@ ...@@ -28,38 +28,6 @@
#define _DVBPSI_DVBPSI_PRIVATE_H_ #define _DVBPSI_DVBPSI_PRIVATE_H_
/*****************************************************************************
* dvbpsi_callback
*****************************************************************************
* Callback type definition.
*****************************************************************************/
typedef void (* dvbpsi_callback)(struct dvbpsi_decoder_s* p_decoder,
dvbpsi_psi_section_t* p_section);
/*****************************************************************************
* dvbpsi_decoder_t
*****************************************************************************
* PSI decoder.
*****************************************************************************/
typedef struct dvbpsi_decoder_s
{
dvbpsi_callback pf_callback;
void * p_private_decoder;
int i_section_max_size;
uint8_t i_continuity_counter;
int b_discontinuity;
dvbpsi_psi_section_t * p_current_section;
int i_need;
int b_complete_header;
} dvbpsi_decoder_t;
/***************************************************************************** /*****************************************************************************
* Error management * Error management
*****************************************************************************/ *****************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* psi.c: common PSI functions * psi.c: common PSI functions
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: psi.c,v 1.2 2002/01/09 11:22:26 bozo Exp $ * $Id: psi.c,v 1.3 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -31,9 +31,8 @@ ...@@ -31,9 +31,8 @@
#include <stdlib.h> #include <stdlib.h>
#include "dvbpsi.h" #include "dvbpsi.h"
#include "psi.h"
#include "dvbpsi_private.h" #include "dvbpsi_private.h"
#include "psi_private.h" #include "psi.h"
/***************************************************************************** /*****************************************************************************
...@@ -166,11 +165,11 @@ dvbpsi_psi_section_t * dvbpsi_NewPSISection(int i_max_size) ...@@ -166,11 +165,11 @@ dvbpsi_psi_section_t * dvbpsi_NewPSISection(int i_max_size)
/***************************************************************************** /*****************************************************************************
* dvbpsi_DeletePSISection * dvbpsi_DeletePSISections
***************************************************************************** *****************************************************************************
* Destruction of a dvbpsi_psi_section_t structure. * Destruction of a dvbpsi_psi_section_t structure.
*****************************************************************************/ *****************************************************************************/
void dvbpsi_DeletePSISection(dvbpsi_psi_section_t * p_section) void dvbpsi_DeletePSISections(dvbpsi_psi_section_t * p_section)
{ {
while(p_section != NULL) while(p_section != NULL)
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* psi.h: common PSI structures * psi.h: common PSI structures
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: psi.h,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: psi.h,v 1.2 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
* This structure is used to store a PSI section. The common information are * This structure is used to store a PSI section. The common information are
* decoded (ISO/IEC 13818-1 section 2.4.4.10). * decoded (ISO/IEC 13818-1 section 2.4.4.10).
*****************************************************************************/ *****************************************************************************/
typedef struct dvbpsi_psi_section_s struct dvbpsi_psi_section_s
{ {
/* non-specific section data */ /* non-specific section data */
uint8_t i_table_id; /* table_id */ uint8_t i_table_id; /* table_id */
...@@ -63,7 +63,7 @@ typedef struct dvbpsi_psi_section_s ...@@ -63,7 +63,7 @@ typedef struct dvbpsi_psi_section_s
/* list handling */ /* list handling */
struct dvbpsi_psi_section_s * p_next; struct dvbpsi_psi_section_s * p_next;
} dvbpsi_psi_section_t; };
/***************************************************************************** /*****************************************************************************
...@@ -75,11 +75,27 @@ dvbpsi_psi_section_t * dvbpsi_NewPSISection(int i_max_size); ...@@ -75,11 +75,27 @@ dvbpsi_psi_section_t * dvbpsi_NewPSISection(int i_max_size);
/***************************************************************************** /*****************************************************************************
* dvbpsi_DeletePSISection * dvbpsi_DeletePSISections
***************************************************************************** *****************************************************************************
* Destruction of a dvbpsi_psi_section_t structure. * Destruction of a dvbpsi_psi_section_t structure.
*****************************************************************************/ *****************************************************************************/
void dvbpsi_DeletePSISection(dvbpsi_psi_section_t * p_section); void dvbpsi_DeletePSISections(dvbpsi_psi_section_t * p_section);
/*****************************************************************************
* dvbpsi_ValidPSISection
*****************************************************************************
* Check the CRC_32 if the section has b_syntax_indicator set.
*****************************************************************************/
int dvbpsi_ValidPSISection(dvbpsi_psi_section_t* p_section);
/*****************************************************************************
* dvbpsi_BuildPSISection
*****************************************************************************
* Build the section based on the information in the structure.
*****************************************************************************/
void dvbpsi_BuildPSISection(dvbpsi_psi_section_t* p_section);
#else #else
......
/*****************************************************************************
* psi_private.h: common private PSI structures
*----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN
* $Id: psi_private.h,v 1.1 2002/01/07 18:30:35 bozo Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*----------------------------------------------------------------------------
*
*****************************************************************************/
#ifndef _DVBPSI_PSI_PRIVATE_H_
#define _DVBPSI_PSI_PRIVATE_H_
/*****************************************************************************
* dvbpsi_ValidPSISection
*****************************************************************************
* Check the CRC_32 if the section has b_syntax_indicator set.
*****************************************************************************/
int dvbpsi_ValidPSISection(dvbpsi_psi_section_t* p_section);
/*****************************************************************************
* dvbpsi_BuildPSISection
*****************************************************************************
* Build the section based on the information in the structure.
*****************************************************************************/
void dvbpsi_BuildPSISection(dvbpsi_psi_section_t* p_section);
#else
#error "Multiple inclusions of psi_private.h"
#endif
## Process this file with automake to produce Makefile.in
pkgincludedir = $(includedir)/dvbpsi
noinst_LTLIBRARIES = lib_tables.la
lib_tables_la_SOURCES = pat.c pmt.c
noinst_HEADERS = pat_private.h pmt_private.h
pkginclude_HEADERS = pat.h pmt.h
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
CC = @CC@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
EXEEXT = @EXEEXT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
STRIP = @STRIP@
VERSION = @VERSION@
pkgincludedir = $(includedir)/dvbpsi
noinst_LTLIBRARIES = lib_tables.la
lib_tables_la_SOURCES = pat.c pmt.c
noinst_HEADERS = pat_private.h pmt_private.h
pkginclude_HEADERS = pat.h pmt.h
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../src/config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I../../src
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
lib_tables_la_LDFLAGS =
lib_tables_la_LIBADD =
lib_tables_la_OBJECTS = pat.lo pmt.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS)
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/pat.P .deps/pmt.P
SOURCES = $(lib_tables_la_SOURCES)
OBJECTS = $(lib_tables_la_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .obj .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tables/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstLTLIBRARIES:
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
distclean-noinstLTLIBRARIES:
maintainer-clean-noinstLTLIBRARIES:
# FIXME: We should only use cygpath when building on Windows,
# and only if it is available.
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
-rm -f *.$(OBJEXT)
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
lib_tables.la: $(lib_tables_la_OBJECTS) $(lib_tables_la_DEPENDENCIES)
$(LINK) $(lib_tables_la_LDFLAGS) $(lib_tables_la_OBJECTS) $(lib_tables_la_LIBADD) $(LIBS)
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p; \
done
uninstall-pkgincludeHEADERS:
@$(NORMAL_UNINSTALL)
list='$(pkginclude_HEADERS)'; for p in $$list; do \
rm -f $(DESTDIR)$(pkgincludedir)/$$p; \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src/tables
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/tables/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-pkgincludeHEADERS
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-pkgincludeHEADERS
uninstall: uninstall-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstLTLIBRARIES clean-compile clean-libtool \
clean-tags clean-depend clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstLTLIBRARIES distclean-compile \
distclean-libtool distclean-tags distclean-depend \
distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-depend \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool uninstall-pkgincludeHEADERS \
install-pkgincludeHEADERS tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pat.c: PAT decoder/generator * pat.c: PAT decoder/generator
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pat.c,v 1.3 2002/01/09 11:22:26 bozo Exp $ * $Id: pat.c,v 1.1 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -31,9 +31,8 @@ ...@@ -31,9 +31,8 @@
#include <stdlib.h> #include <stdlib.h>
#include "dvbpsi.h" #include "dvbpsi.h"
#include "psi.h"
#include "dvbpsi_private.h" #include "dvbpsi_private.h"
#include "psi_private.h" #include "psi.h"
#include "pat.h" #include "pat.h"
#include "pat_private.h" #include "pat_private.h"
...@@ -48,6 +47,7 @@ dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback, ...@@ -48,6 +47,7 @@ dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback,
{ {
dvbpsi_handle h_dvbpsi = (dvbpsi_decoder_t*)malloc(sizeof(dvbpsi_decoder_t)); dvbpsi_handle h_dvbpsi = (dvbpsi_decoder_t*)malloc(sizeof(dvbpsi_decoder_t));
dvbpsi_pat_decoder_t* p_pat_decoder; dvbpsi_pat_decoder_t* p_pat_decoder;
unsigned int i;
if(h_dvbpsi == NULL) if(h_dvbpsi == NULL)
return NULL; return NULL;
...@@ -61,7 +61,7 @@ dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback, ...@@ -61,7 +61,7 @@ dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback,
} }
/* PSI decoder configuration */ /* PSI decoder configuration */
h_dvbpsi->pf_callback = &dvbpsi_DecodePATSection; h_dvbpsi->pf_callback = &dvbpsi_GatherPATSections;
h_dvbpsi->p_private_decoder = p_pat_decoder; h_dvbpsi->p_private_decoder = p_pat_decoder;
h_dvbpsi->i_section_max_size = 1024; h_dvbpsi->i_section_max_size = 1024;
/* PSI decoder initial state */ /* PSI decoder initial state */
...@@ -73,8 +73,10 @@ dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback, ...@@ -73,8 +73,10 @@ dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback,
p_pat_decoder->pf_callback = pf_callback; p_pat_decoder->pf_callback = pf_callback;
p_pat_decoder->p_cb_data = p_cb_data; p_pat_decoder->p_cb_data = p_cb_data;
/* PAT decoder initial state */ /* PAT decoder initial state */
dvbpsi_InitPAT(&p_pat_decoder->current_pat, 1, 0, 0); p_pat_decoder->b_current_valid = 0;
p_pat_decoder->b_building_next = 0; p_pat_decoder->p_building_pat = NULL;
for(i = 0; i <= 255; i++)
p_pat_decoder->ap_sections[i] = NULL;
return h_dvbpsi; return h_dvbpsi;
} }
...@@ -90,8 +92,7 @@ void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi) ...@@ -90,8 +92,7 @@ void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi)
dvbpsi_pat_decoder_t* p_pat_decoder dvbpsi_pat_decoder_t* p_pat_decoder
= (dvbpsi_pat_decoder_t*)h_dvbpsi->p_private_decoder; = (dvbpsi_pat_decoder_t*)h_dvbpsi->p_private_decoder;
dvbpsi_EmptyPAT(&p_pat_decoder->current_pat); free(p_pat_decoder->p_building_pat);
dvbpsi_EmptyPAT(&p_pat_decoder->next_pat);
free(h_dvbpsi->p_private_decoder); free(h_dvbpsi->p_private_decoder);
free(h_dvbpsi); free(h_dvbpsi);
...@@ -110,7 +111,6 @@ void dvbpsi_InitPAT(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, uint8_t i_version, ...@@ -110,7 +111,6 @@ void dvbpsi_InitPAT(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, uint8_t i_version,
p_pat->i_version = i_version; p_pat->i_version = i_version;
p_pat->b_current_next = b_current_next; p_pat->b_current_next = b_current_next;
p_pat->p_first_program = NULL; p_pat->p_first_program = NULL;
p_pat->b_complete = 0;
} }
...@@ -169,18 +169,18 @@ dvbpsi_pat_program_t* dvbpsi_PATAddProgram(dvbpsi_pat_t* p_pat, ...@@ -169,18 +169,18 @@ dvbpsi_pat_program_t* dvbpsi_PATAddProgram(dvbpsi_pat_t* p_pat,
/***************************************************************************** /*****************************************************************************
* dvbpsi_DecodePATSection * dvbpsi_GatherPATSections
***************************************************************************** *****************************************************************************
* Callback for the PSI decoder. * Callback for the PSI decoder.
*****************************************************************************/ *****************************************************************************/
void dvbpsi_DecodePATSection(dvbpsi_decoder_t* p_decoder, void dvbpsi_GatherPATSections(dvbpsi_decoder_t* p_decoder,
dvbpsi_psi_section_t* p_section) dvbpsi_psi_section_t* p_section)
{ {
dvbpsi_pat_decoder_t* p_pat_decoder dvbpsi_pat_decoder_t* p_pat_decoder
= (dvbpsi_pat_decoder_t*)p_decoder->p_private_decoder; = (dvbpsi_pat_decoder_t*)p_decoder->p_private_decoder;
int b_decode = 1; int b_append = 1;
int b_reinit = 0; int b_reinit = 0;
uint8_t* p_byte; unsigned int i;
DVBPSI_DEBUG_ARG("PAT decoder", DVBPSI_DEBUG_ARG("PAT decoder",
"Table version %2d, " "i_extension %5d, " "Table version %2d, " "i_extension %5d, "
...@@ -195,84 +195,77 @@ void dvbpsi_DecodePATSection(dvbpsi_decoder_t* p_decoder, ...@@ -195,84 +195,77 @@ void dvbpsi_DecodePATSection(dvbpsi_decoder_t* p_decoder,
DVBPSI_ERROR_ARG("PAT decoder", DVBPSI_ERROR_ARG("PAT decoder",
"invalid section (table_id == 0x%02x)", "invalid section (table_id == 0x%02x)",
p_section->i_table_id); p_section->i_table_id);
b_decode = 0; b_append = 0;
b_reinit = 1;
} }
else if(!p_section->b_syntax_indicator)
if(b_append && !p_section->b_syntax_indicator)
{ {
/* Invalid section_syntax_indicator */ /* Invalid section_syntax_indicator */
DVBPSI_ERROR("PAT decoder", DVBPSI_ERROR("PAT decoder",
"invalid section (section_syntax_indicator == 0)"); "invalid section (section_syntax_indicator == 0)");
b_decode = 0; b_append = 0;
b_reinit = 1;
} }
else if(p_decoder->b_discontinuity)
{
/* A TS discontinuity has occured */
b_reinit = 1;
p_decoder->b_discontinuity = 0;
}
else
{
/* No TS discontinuity has occured */
/* Perform some few sanity checks */ /* Now if b_append is true then we have a valid PAT section */
if(p_pat_decoder->b_building_next) if(b_append)
{
/* TS discontinuity check */
if(p_decoder->b_discontinuity)
{ {
if(p_pat_decoder->next_pat.i_ts_id != p_section->i_extension) b_reinit = 1;
{ p_decoder->b_discontinuity = 0;
/* transport_stream_id */
DVBPSI_ERROR("PAT decoder",
"'transport_stream_id' differs"
" whereas no TS discontinuity has occured");
b_reinit = 1;
}
else if(p_pat_decoder->next_pat.i_version != p_section->i_version)
{
/* version_number */
DVBPSI_ERROR("PAT decoder",
"'version_number' differs"
" whereas no discontinuity has occured");
b_reinit = 1;
}
else if(p_pat_decoder->i_last_section_number != p_section->i_last_number)
{
/* last_section_number */
DVBPSI_ERROR("PAT decoder",
"'last_section_number' differs"
" whereas no discontinuity has occured");
b_reinit = 1;
}
else if(p_pat_decoder->i_previous_section_number >= p_section->i_number)
{
/* section_number */
DVBPSI_ERROR("PAT decoder",
"backward 'section_number'"
" whereas no discontinuity has occured");
b_reinit = 1;
}
} }
else else
{ {
if(p_pat_decoder->current_pat.i_version == p_section->i_version) /* Perform a few sanity checks */
if(p_pat_decoder->p_building_pat)
{ {
/* signal a new PAT if the previous one wasn't active */ if(p_pat_decoder->p_building_pat->i_ts_id != p_section->i_extension)
if( (p_pat_decoder->current_pat.b_complete)
&& (!p_pat_decoder->current_pat.b_current_next)
&& (p_section->b_current_next))
{ {
dvbpsi_pat_t* p_pat = (dvbpsi_pat_t*)malloc(sizeof(dvbpsi_pat_t)); /* transport_stream_id */
DVBPSI_ERROR("PAT decoder",
p_pat_decoder->current_pat.b_current_next = 1; "'transport_stream_id' differs"
/* Don't need the programs because the PAT is active */ " whereas no TS discontinuity has occured");
*p_pat = p_pat_decoder->current_pat; b_reinit = 1;
p_pat_decoder->current_pat.p_first_program = NULL; }
p_pat_decoder->pf_callback(p_pat_decoder->p_cb_data, p_pat); else if(p_pat_decoder->p_building_pat->i_version
!= p_section->i_version)
{
/* version_number */
DVBPSI_ERROR("PAT decoder",
"'version_number' differs"
" whereas no discontinuity has occured");
b_reinit = 1;
}
else if(p_pat_decoder->i_last_section_number !=
p_section->i_last_number)
{
/* last_section_number */
DVBPSI_ERROR("PAT decoder",
"'last_section_number' differs"
" whereas no discontinuity has occured");
b_reinit = 1;
}
}
else
{
if( (p_pat_decoder->b_current_valid)
&& (p_pat_decoder->current_pat.i_version == p_section->i_version))
{
/* Signal a new PAT if the previous one wasn't active */
if( (!p_pat_decoder->current_pat.b_current_next)
&& (p_section->b_current_next))
{
dvbpsi_pat_t* p_pat = (dvbpsi_pat_t*)malloc(sizeof(dvbpsi_pat_t));
p_pat_decoder->current_pat.b_current_next = 1;
*p_pat = p_pat_decoder->current_pat;
p_pat_decoder->pf_callback(p_pat_decoder->p_cb_data, p_pat);
}
/* Don't decode since this version is already decoded */
b_append = 0;
} }
/* Don't decode if the version is already decoded */
if(p_pat_decoder->current_pat.b_complete)
b_decode = 0;
} }
} }
} }
...@@ -280,64 +273,118 @@ void dvbpsi_DecodePATSection(dvbpsi_decoder_t* p_decoder, ...@@ -280,64 +273,118 @@ void dvbpsi_DecodePATSection(dvbpsi_decoder_t* p_decoder,
/* Reinit the decoder if wanted */ /* Reinit the decoder if wanted */
if(b_reinit) if(b_reinit)
{ {
dvbpsi_EmptyPAT(&p_pat_decoder->current_pat); /* Force redecoding */
p_pat_decoder->current_pat.b_complete = 0; /* force redecoding */ p_pat_decoder->b_current_valid = 0;
dvbpsi_EmptyPAT(&p_pat_decoder->next_pat); /* Free structures */
p_pat_decoder->b_building_next = 0; if(p_pat_decoder->p_building_pat)
{
free(p_pat_decoder->p_building_pat);
p_pat_decoder->p_building_pat = NULL;
}
/* Clear the section array */
for(i = 0; i <= 255; i++)
{
if(p_pat_decoder->ap_sections[i] != NULL)
{
dvbpsi_DeletePSISections(p_pat_decoder->ap_sections[i]);
p_pat_decoder->ap_sections[i] = NULL;
}
}
} }
/* Decode the section if wanted */ /* Append the section to the list if wanted */
if(b_decode) if(b_append)
{ {
if(!p_pat_decoder->b_building_next) int b_complete;
/* Initialize the structures if it's the first section received */
if(!p_pat_decoder->p_building_pat)
{ {
p_pat_decoder->next_pat.i_ts_id = p_section->i_extension; p_pat_decoder->p_building_pat =
p_pat_decoder->next_pat.i_version = p_section->i_version; (dvbpsi_pat_t*)malloc(sizeof(dvbpsi_pat_t));
p_pat_decoder->next_pat.b_current_next = p_section->b_current_next; dvbpsi_InitPAT(p_pat_decoder->p_building_pat,
p_section->i_extension,
p_section->i_version,
p_section->b_current_next);
p_pat_decoder->i_last_section_number = p_section->i_last_number; p_pat_decoder->i_last_section_number = p_section->i_last_number;
p_pat_decoder->b_section_lost = (p_section->i_number != 0);
p_pat_decoder->b_building_next = 1;
} }
else
/* Fill the section array */
if(p_pat_decoder->ap_sections[p_section->i_number] != NULL)
{ {
p_pat_decoder->b_section_lost = DVBPSI_DEBUG_ARG("PAT decoder", "overwrite section number %d",
( p_section->i_number p_section->i_number);
!= p_pat_decoder->i_previous_section_number + 1); dvbpsi_DeletePSISections(p_pat_decoder->ap_sections[p_section->i_number]);
} }
p_pat_decoder->ap_sections[p_section->i_number] = p_section;
/* Decode section */ /* Check if we have all the sections */
p_pat_decoder->i_previous_section_number = p_section->i_number; b_complete = 0;
for(p_byte = p_section->p_payload_start; for(i = 0; i <= p_pat_decoder->i_last_section_number; i++)
p_byte < p_section->p_payload_end;
p_byte += 4)
{ {
uint16_t i_program_number = ((uint16_t)(p_byte[0]) << 8) | p_byte[1]; if(!p_pat_decoder->ap_sections[i])
uint16_t i_pid = ((uint16_t)(p_byte[2] & 0x1f) << 8) | p_byte[3]; break;
dvbpsi_PATAddProgram(&p_pat_decoder->next_pat, i_program_number, i_pid);
if(i == p_pat_decoder->i_last_section_number)
b_complete = 1;
} }
if(p_section->i_number == p_pat_decoder->i_last_section_number) if(b_complete)
{ {
/* PAT is finished */ /* Save the current information */
dvbpsi_pat_t* p_pat = (dvbpsi_pat_t*)malloc(sizeof(dvbpsi_pat_t)); p_pat_decoder->current_pat = *p_pat_decoder->p_building_pat;
p_pat_decoder->b_current_valid = 1;
/* Chain the sections */
if(p_pat_decoder->i_last_section_number)
{
for(i = 0; i <= p_pat_decoder->i_last_section_number - 1; i++)
p_pat_decoder->ap_sections[i]->p_next =
p_pat_decoder->ap_sections[i + 1];
}
/* Decode the sections */
dvbpsi_DecodePATSections(p_pat_decoder->p_building_pat,
p_pat_decoder->ap_sections[0]);
/* Delete the sections */
dvbpsi_DeletePSISections(p_pat_decoder->ap_sections[0]);
/* signal the new PAT */
p_pat_decoder->pf_callback(p_pat_decoder->p_cb_data,
p_pat_decoder->p_building_pat);
/* Reinitialize the structures */
p_pat_decoder->p_building_pat = NULL;
for(i = 0; i <= p_pat_decoder->i_last_section_number; i++)
p_pat_decoder->ap_sections[i] = NULL;
}
}
else
{
dvbpsi_DeletePSISections(p_section);
}
}
p_pat_decoder->next_pat.b_complete = !p_pat_decoder->b_section_lost;
*p_pat = p_pat_decoder->next_pat; /*****************************************************************************
* dvbpsi_DecodePATSection
*****************************************************************************
* PAT decoder.
*****************************************************************************/
void dvbpsi_DecodePATSections(dvbpsi_pat_t* p_pat,
dvbpsi_psi_section_t* p_section)
{
uint8_t* p_byte;
dvbpsi_EmptyPAT(&p_pat_decoder->current_pat); while(p_section)
p_pat_decoder->current_pat.i_ts_id = p_pat->i_ts_id; {
p_pat_decoder->current_pat.i_version = p_pat->i_version; for(p_byte = p_section->p_payload_start;
p_pat_decoder->current_pat.b_current_next = p_pat->b_current_next; p_byte < p_section->p_payload_end;
p_pat_decoder->current_pat.b_complete = p_pat->b_complete; p_byte += 4)
/* signal the new PAT */ {
p_pat_decoder->pf_callback(p_pat_decoder->p_cb_data, p_pat); uint16_t i_program_number = ((uint16_t)(p_byte[0]) << 8) | p_byte[1];
p_pat_decoder->next_pat.p_first_program = NULL; uint16_t i_pid = ((uint16_t)(p_byte[2] & 0x1f) << 8) | p_byte[3];
p_pat_decoder->b_building_next = 0; dvbpsi_PATAddProgram(p_pat, i_program_number, i_pid);
} }
}
dvbpsi_DeletePSISection(p_section); p_section = p_section->p_next;
}
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pat.h: PAT structures * pat.h: PAT structures
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pat.h,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: pat.h,v 1.1 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -58,9 +58,6 @@ typedef struct dvbpsi_pat_s ...@@ -58,9 +58,6 @@ typedef struct dvbpsi_pat_s
dvbpsi_pat_program_t * p_first_program; /* program list */ dvbpsi_pat_program_t * p_first_program; /* program list */
int b_complete; /* may not be complete if
data has been lost */
} dvbpsi_pat_t; } dvbpsi_pat_t;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pat_private.h: private PAT structures * pat_private.h: private PAT structures
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pat_private.h,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: pat_private.h,v 1.1 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -35,28 +35,36 @@ ...@@ -35,28 +35,36 @@
*****************************************************************************/ *****************************************************************************/
typedef struct dvbpsi_pat_decoder_s typedef struct dvbpsi_pat_decoder_s
{ {
dvbpsi_pat_callback pf_callback; dvbpsi_pat_callback pf_callback;
void * p_cb_data; void * p_cb_data;
dvbpsi_pat_t current_pat; dvbpsi_pat_t current_pat;
dvbpsi_pat_t next_pat; dvbpsi_pat_t * p_building_pat;
int b_building_next; int b_current_valid;
uint8_t i_previous_section_number;
uint8_t i_last_section_number;
int b_section_lost; uint8_t i_last_section_number;
dvbpsi_psi_section_t * ap_sections [256];
} dvbpsi_pat_decoder_t; } dvbpsi_pat_decoder_t;
/***************************************************************************** /*****************************************************************************
* dvbpsi_DecodePATSection * dvbpsi_GatherPATSections
***************************************************************************** *****************************************************************************
* Callback for the PSI decoder. * Callback for the PSI decoder.
*****************************************************************************/ *****************************************************************************/
void dvbpsi_DecodePATSection(dvbpsi_decoder_t* p_decoder, void dvbpsi_GatherPATSections(dvbpsi_decoder_t* p_decoder,
dvbpsi_psi_section_t* p_section); dvbpsi_psi_section_t* p_section);
/*****************************************************************************
* dvbpsi_DecodePATSection
*****************************************************************************
* PAT decoder.
*****************************************************************************/
void dvbpsi_DecodePATSections(dvbpsi_pat_t* p_pat,
dvbpsi_psi_section_t* p_section);
#else #else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pmt.c: PMT decoder/generator * pmt.c: PMT decoder/generator
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pmt.c,v 1.3 2002/01/09 11:22:26 bozo Exp $ * $Id: pmt.c,v 1.1 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include "dvbpsi.h" #include "dvbpsi.h"
#include "psi.h"
#include "dvbpsi_private.h" #include "dvbpsi_private.h"
#include "psi_private.h" #include "psi.h"
#include "descriptor.h" #include "descriptor.h"
#include "pmt.h" #include "pmt.h"
#include "pmt_private.h" #include "pmt_private.h"
...@@ -50,6 +50,7 @@ dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number, ...@@ -50,6 +50,7 @@ dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number,
{ {
dvbpsi_handle h_dvbpsi = (dvbpsi_decoder_t*)malloc(sizeof(dvbpsi_decoder_t)); dvbpsi_handle h_dvbpsi = (dvbpsi_decoder_t*)malloc(sizeof(dvbpsi_decoder_t));
dvbpsi_pmt_decoder_t* p_pmt_decoder; dvbpsi_pmt_decoder_t* p_pmt_decoder;
unsigned int i;
if(h_dvbpsi == NULL) if(h_dvbpsi == NULL)
return NULL; return NULL;
...@@ -63,7 +64,7 @@ dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number, ...@@ -63,7 +64,7 @@ dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number,
} }
/* PSI decoder configuration */ /* PSI decoder configuration */
h_dvbpsi->pf_callback = &dvbpsi_DecodePMTSection; h_dvbpsi->pf_callback = &dvbpsi_GatherPMTSections;
h_dvbpsi->p_private_decoder = p_pmt_decoder; h_dvbpsi->p_private_decoder = p_pmt_decoder;
h_dvbpsi->i_section_max_size = 1024; h_dvbpsi->i_section_max_size = 1024;
/* PSI decoder initial state */ /* PSI decoder initial state */
...@@ -76,9 +77,10 @@ dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number, ...@@ -76,9 +77,10 @@ dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number,
p_pmt_decoder->pf_callback = pf_callback; p_pmt_decoder->pf_callback = pf_callback;
p_pmt_decoder->p_cb_data = p_cb_data; p_pmt_decoder->p_cb_data = p_cb_data;
/* PMT decoder initial state */ /* PMT decoder initial state */
dvbpsi_InitPMT(&p_pmt_decoder->current_pmt, 1, 0, 0, 0); p_pmt_decoder->b_current_valid = 0;
p_pmt_decoder->b_building_next = 0; p_pmt_decoder->p_building_pmt = NULL;
p_pmt_decoder->b_builded_next = 0; for(i = 0; i <= 255; i++)
p_pmt_decoder->ap_sections[i] = NULL;
return h_dvbpsi; return h_dvbpsi;
} }
...@@ -94,8 +96,7 @@ void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi) ...@@ -94,8 +96,7 @@ void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi)
dvbpsi_pmt_decoder_t* p_pmt_decoder dvbpsi_pmt_decoder_t* p_pmt_decoder
= (dvbpsi_pmt_decoder_t*)h_dvbpsi->p_private_decoder; = (dvbpsi_pmt_decoder_t*)h_dvbpsi->p_private_decoder;
dvbpsi_EmptyPMT(&p_pmt_decoder->current_pmt); free(p_pmt_decoder->p_building_pmt);
dvbpsi_EmptyPMT(&p_pmt_decoder->next_pmt);
free(h_dvbpsi->p_private_decoder); free(h_dvbpsi->p_private_decoder);
free(h_dvbpsi); free(h_dvbpsi);
...@@ -116,7 +117,6 @@ void dvbpsi_InitPMT(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number, ...@@ -116,7 +117,6 @@ void dvbpsi_InitPMT(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number,
p_pmt->i_pcr_pid = i_pcr_pid; p_pmt->i_pcr_pid = i_pcr_pid;
p_pmt->p_first_descriptor = NULL; p_pmt->p_first_descriptor = NULL;
p_pmt->p_first_es = NULL; p_pmt->p_first_es = NULL;
p_pmt->b_complete = 0;
} }
...@@ -241,18 +241,18 @@ dvbpsi_descriptor_t* dvbpsi_PMTESAddDescriptor(dvbpsi_pmt_es_t* p_es, ...@@ -241,18 +241,18 @@ dvbpsi_descriptor_t* dvbpsi_PMTESAddDescriptor(dvbpsi_pmt_es_t* p_es,
/***************************************************************************** /*****************************************************************************
* dvbpsi_DecodePMTSection * dvbpsi_GatherPMTSections
***************************************************************************** *****************************************************************************
* Callback for the PSI decoder. * Callback for the PSI decoder.
*****************************************************************************/ *****************************************************************************/
void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder, void dvbpsi_GatherPMTSections(dvbpsi_decoder_t* p_decoder,
dvbpsi_psi_section_t* p_section) dvbpsi_psi_section_t* p_section)
{ {
dvbpsi_pmt_decoder_t* p_pmt_decoder dvbpsi_pmt_decoder_t* p_pmt_decoder
= (dvbpsi_pmt_decoder_t*)p_decoder->p_private_decoder; = (dvbpsi_pmt_decoder_t*)p_decoder->p_private_decoder;
int b_decode = 1; int b_append = 1;
int b_reinit = 0; int b_reinit = 0;
uint8_t* p_byte, * p_end; unsigned int i;
DVBPSI_DEBUG_ARG("PMT decoder", DVBPSI_DEBUG_ARG("PMT decoder",
"Table version %2d, " "i_extension %5d, " "Table version %2d, " "i_extension %5d, "
...@@ -267,83 +267,76 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder, ...@@ -267,83 +267,76 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder,
DVBPSI_ERROR_ARG("PMT decoder", DVBPSI_ERROR_ARG("PMT decoder",
"invalid section (table_id == 0x%02x)", "invalid section (table_id == 0x%02x)",
p_section->i_table_id); p_section->i_table_id);
b_decode = 0; b_append = 0;
b_reinit = 1;
} }
else if(!p_section->b_syntax_indicator)
if(b_append && !p_section->b_syntax_indicator)
{ {
/* Invalid section_syntax_indicator */ /* Invalid section_syntax_indicator */
DVBPSI_ERROR("PMT decoder", DVBPSI_ERROR("PMT decoder",
"invalid section (section_syntax_indicator == 0)"); "invalid section (section_syntax_indicator == 0)");
b_decode = 0; b_append = 0;
b_reinit = 1;
} }
else if(p_pmt_decoder->i_program_number != p_section->i_extension)
/* Now if b_append is true then we have a valid PMT section */
if(b_append && (p_pmt_decoder->i_program_number != p_section->i_extension))
{ {
/* Invalid program_number */ /* Invalid program_number */
DVBPSI_ERROR("PMT decoder", DVBPSI_ERROR("PMT decoder",
"'program_number' don't match"); "'program_number' don't match");
b_decode = 0; b_append = 0;
} }
else if(p_decoder->b_discontinuity)
{
/* A TS discontinuity has occured */
b_reinit = 1;
p_decoder->b_discontinuity = 0;
}
else
{
/* No TS discontinuity has occured */
/* Perform some few sanity checks */ if(b_append)
if(p_pmt_decoder->b_building_next) {
/* TS discontinuity check */
if(p_decoder->b_discontinuity)
{ {
if(p_pmt_decoder->next_pmt.i_version != p_section->i_version) b_reinit = 1;
{ p_decoder->b_discontinuity = 0;
/* version_number */
DVBPSI_ERROR("PMT decoder",
"'version_number' differs"
" whereas no discontinuity has occured");
b_reinit = 1;
}
else if(p_pmt_decoder->i_last_section_number != p_section->i_last_number)
{
/* last_section_number */
DVBPSI_ERROR("PMT decoder",
"'last_section_number' differs"
" whereas no discontinuity has occured");
b_reinit = 1;
}
else if(p_pmt_decoder->i_previous_section_number >= p_section->i_number)
{
/* section_number */
DVBPSI_ERROR("PMT decoder",
"backward 'section_number'"
" whereas no discontinuity has occured");
b_reinit = 1;
}
} }
else else
{ {
if(p_pmt_decoder->current_pmt.i_version == p_section->i_version) /* Perform some few sanity checks */
if(p_pmt_decoder->p_building_pmt)
{ {
/* signal a new PMT if the previous one wasn't active */ if(p_pmt_decoder->p_building_pmt->i_version != p_section->i_version)
if( (p_pmt_decoder->current_pmt.b_complete)
&& (!p_pmt_decoder->current_pmt.b_current_next)
&& (p_section->b_current_next))
{ {
dvbpsi_pmt_t* p_pmt = (dvbpsi_pmt_t*)malloc(sizeof(dvbpsi_pmt_t)); /* version_number */
DVBPSI_ERROR("PMT decoder",
p_pmt_decoder->current_pmt.b_current_next = 1; "'version_number' differs"
*p_pmt = p_pmt_decoder->current_pmt; " whereas no discontinuity has occured");
p_pmt_decoder->current_pmt.p_first_descriptor = NULL; b_reinit = 1;
p_pmt_decoder->current_pmt.p_first_es = NULL; }
p_pmt_decoder->pf_callback(p_pmt_decoder->p_cb_data, p_pmt); else if(p_pmt_decoder->i_last_section_number
!= p_section->i_last_number)
{
/* last_section_number */
DVBPSI_ERROR("PMT decoder",
"'last_section_number' differs"
" whereas no discontinuity has occured");
b_reinit = 1;
}
}
else
{
if( (p_pmt_decoder->b_current_valid)
&& (p_pmt_decoder->current_pmt.i_version == p_section->i_version))
{
/* Signal a new PMT if the previous one wasn't active */
if( (!p_pmt_decoder->current_pmt.b_current_next)
&& (p_section->b_current_next))
{
dvbpsi_pmt_t* p_pmt = (dvbpsi_pmt_t*)malloc(sizeof(dvbpsi_pmt_t));
p_pmt_decoder->current_pmt.b_current_next = 1;
*p_pmt = p_pmt_decoder->current_pmt;
p_pmt_decoder->pf_callback(p_pmt_decoder->p_cb_data, p_pmt);
}
/* Don't decode since this version is already decoded */
b_append = 0;
} }
/* Don't decode if the version is already decoded */
if(p_pmt_decoder->current_pmt.b_complete)
b_decode = 0;
} }
} }
} }
...@@ -351,36 +344,108 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder, ...@@ -351,36 +344,108 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder,
/* Reinit the decoder if wanted */ /* Reinit the decoder if wanted */
if(b_reinit) if(b_reinit)
{ {
dvbpsi_EmptyPMT(&p_pmt_decoder->current_pmt); /* Force redecoding */
p_pmt_decoder->current_pmt.b_complete = 0; /* force redecoding */ p_pmt_decoder->b_current_valid = 0;
dvbpsi_EmptyPMT(&p_pmt_decoder->next_pmt); /* Free structures */
p_pmt_decoder->b_building_next = 0; if(p_pmt_decoder->p_building_pmt)
{
free(p_pmt_decoder->p_building_pmt);
p_pmt_decoder->p_building_pmt = NULL;
}
/* Clear the section array */
for(i = 0; i <= 255; i++)
{
if(p_pmt_decoder->ap_sections[i] != NULL)
{
dvbpsi_DeletePSISections(p_pmt_decoder->ap_sections[i]);
p_pmt_decoder->ap_sections[i] = NULL;
}
}
} }
/* Decode the section if wanted */ /* Append the section to the list if wanted */
if(b_decode) if(b_append)
{ {
/* Initialization */ int b_complete;
if(!p_pmt_decoder->b_building_next)
/* Initialize the structures if it's the first section received */
if(!p_pmt_decoder->p_building_pmt)
{ {
p_pmt_decoder->next_pmt.i_program_number = p_section->i_extension; p_pmt_decoder->p_building_pmt =
p_pmt_decoder->next_pmt.i_version = p_section->i_version; (dvbpsi_pmt_t*)malloc(sizeof(dvbpsi_pmt_t));
p_pmt_decoder->next_pmt.b_current_next = p_section->b_current_next; dvbpsi_InitPMT(p_pmt_decoder->p_building_pmt,
p_pmt_decoder->next_pmt.i_pcr_pid = p_pmt_decoder->i_program_number,
((uint16_t)(p_section->p_payload_start[0] & 0x1f) << 8) p_section->i_version,
| p_section->p_payload_start[1]; p_section->b_current_next,
p_pmt_decoder->i_last_section_number = p_section->i_last_number; ((uint16_t)(p_section->p_payload_start[0] & 0x1f) << 8)
p_pmt_decoder->b_section_lost = (p_section->i_number != 0); | p_section->p_payload_start[1]);
p_pmt_decoder->b_building_next = 1;
} }
else
/* Fill the section array */
if(p_pmt_decoder->ap_sections[p_section->i_number] != NULL)
{ {
p_pmt_decoder->b_section_lost = DVBPSI_DEBUG_ARG("PMT decoder", "overwrite section number %d",
( p_section->i_number p_section->i_number);
!= p_pmt_decoder->i_previous_section_number + 1); dvbpsi_DeletePSISections(p_pmt_decoder->ap_sections[p_section->i_number]);
} }
p_pmt_decoder->ap_sections[p_section->i_number] = p_section;
/* Decode section */ /* Check if we have all the sections */
b_complete = 0;
for(i = 0; i <= p_pmt_decoder->i_last_section_number; i++)
{
if(!p_pmt_decoder->ap_sections[i])
break;
if(i == p_pmt_decoder->i_last_section_number)
b_complete = 1;
}
if(b_complete)
{
/* Save the current information */
p_pmt_decoder->current_pmt = *p_pmt_decoder->p_building_pmt;
p_pmt_decoder->b_current_valid = 1;
/* Chain the sections */
if(p_pmt_decoder->i_last_section_number)
{
for(i = 0; i <= p_pmt_decoder->i_last_section_number - 1; i++)
p_pmt_decoder->ap_sections[i]->p_next =
p_pmt_decoder->ap_sections[i + 1];
}
/* Decode the sections */
dvbpsi_DecodePMTSections(p_pmt_decoder->p_building_pmt,
p_pmt_decoder->ap_sections[0]);
/* Delete the sections */
dvbpsi_DeletePSISections(p_pmt_decoder->ap_sections[0]);
/* signal the new PMT */
p_pmt_decoder->pf_callback(p_pmt_decoder->p_cb_data,
p_pmt_decoder->p_building_pmt);
/* Reinitialize the structures */
p_pmt_decoder->p_building_pmt = NULL;
for(i = 0; i <= p_pmt_decoder->i_last_section_number; i++)
p_pmt_decoder->ap_sections[i] = NULL;
}
}
else
{
dvbpsi_DeletePSISections(p_section);
}
}
/*****************************************************************************
* dvbpsi_DecodePMTSections
*****************************************************************************
* PMT decoder.
*****************************************************************************/
void dvbpsi_DecodePMTSections(dvbpsi_pmt_t* p_pmt,
dvbpsi_psi_section_t* p_section)
{
uint8_t* p_byte, * p_end;
while(p_section)
{
/* - PMT descriptors */ /* - PMT descriptors */
p_byte = p_section->p_payload_start + 4; p_byte = p_section->p_payload_start + 4;
p_end = p_byte + ( ((uint16_t)(p_section->p_payload_start[2] & 0x0f) << 8) p_end = p_byte + ( ((uint16_t)(p_section->p_payload_start[2] & 0x0f) << 8)
...@@ -390,22 +455,17 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder, ...@@ -390,22 +455,17 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder,
uint8_t i_tag = p_byte[0]; uint8_t i_tag = p_byte[0];
uint8_t i_length = p_byte[1]; uint8_t i_length = p_byte[1];
if(i_length + 2 <= p_end - p_byte) if(i_length + 2 <= p_end - p_byte)
{ dvbpsi_PMTAddDescriptor(p_pmt, i_tag, i_length, p_byte + 2);
dvbpsi_PMTAddDescriptor(&p_pmt_decoder->next_pmt,
i_tag, i_length, p_byte + 2);
}
p_byte += 2 + i_length; p_byte += 2 + i_length;
} }
/* - ESs */ /* - ESs */
p_pmt_decoder->i_previous_section_number = p_section->i_number;
for(p_byte = p_end; p_byte < p_section->p_payload_end;) for(p_byte = p_end; p_byte < p_section->p_payload_end;)
{ {
uint8_t i_type = p_byte[0]; uint8_t i_type = p_byte[0];
uint16_t i_pid = ((uint16_t)(p_byte[1] & 0x1f) << 8) | p_byte[2]; uint16_t i_pid = ((uint16_t)(p_byte[1] & 0x1f) << 8) | p_byte[2];
uint16_t i_length = ((uint16_t)(p_byte[3] & 0x0f) << 8) | p_byte[4]; uint16_t i_length = ((uint16_t)(p_byte[3] & 0x0f) << 8) | p_byte[4];
dvbpsi_pmt_es_t* p_es = dvbpsi_PMTAddES(&p_pmt_decoder->next_pmt, dvbpsi_pmt_es_t* p_es = dvbpsi_PMTAddES(p_pmt, i_type, i_pid);
i_type, i_pid);
/* - ES descriptors */ /* - ES descriptors */
p_byte += 5; p_byte += 5;
p_end = p_byte + i_length; p_end = p_byte + i_length;
...@@ -414,37 +474,13 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder, ...@@ -414,37 +474,13 @@ void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder,
uint8_t i_tag = p_byte[0]; uint8_t i_tag = p_byte[0];
uint8_t i_length = p_byte[1]; uint8_t i_length = p_byte[1];
if(i_length + 2 <= p_end - p_byte) if(i_length + 2 <= p_end - p_byte)
{
dvbpsi_PMTESAddDescriptor(p_es, i_tag, i_length, p_byte + 2); dvbpsi_PMTESAddDescriptor(p_es, i_tag, i_length, p_byte + 2);
}
p_byte += 2 + i_length; p_byte += 2 + i_length;
} }
} }
if(p_section->i_number == p_pmt_decoder->i_last_section_number) p_section = p_section->p_next;
{
/* PMT is finished */
dvbpsi_pmt_t* p_pmt = (dvbpsi_pmt_t*)malloc(sizeof(dvbpsi_pmt_t));
p_pmt_decoder->next_pmt.b_complete = !p_pmt_decoder->b_section_lost;
*p_pmt = p_pmt_decoder->next_pmt;
dvbpsi_EmptyPMT(&p_pmt_decoder->current_pmt);
p_pmt_decoder->current_pmt.i_program_number = p_pmt->i_program_number;
p_pmt_decoder->current_pmt.i_version = p_pmt->i_version;
p_pmt_decoder->current_pmt.b_current_next = p_pmt->b_current_next;
p_pmt_decoder->current_pmt.i_pcr_pid = p_pmt->i_pcr_pid;
p_pmt_decoder->current_pmt.b_complete = p_pmt->b_complete;
/* signal the new PMT */
p_pmt_decoder->pf_callback(p_pmt_decoder->p_cb_data, p_pmt);
p_pmt_decoder->next_pmt.p_first_descriptor = NULL;
p_pmt_decoder->next_pmt.p_first_es = NULL;
p_pmt_decoder->b_building_next = 0;
}
} }
dvbpsi_DeletePSISection(p_section);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pmt.h: PMT structures * pmt.h: PMT structures
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pmt.h,v 1.2 2002/01/09 11:22:26 bozo Exp $ * $Id: pmt.h,v 1.1 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -64,9 +64,6 @@ typedef struct dvbpsi_pmt_s ...@@ -64,9 +64,6 @@ typedef struct dvbpsi_pmt_s
dvbpsi_pmt_es_t * p_first_es; /* ES list */ dvbpsi_pmt_es_t * p_first_es; /* ES list */
int b_complete; /* may not be complete if
data has been lost */
} dvbpsi_pmt_t; } dvbpsi_pmt_t;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pmt_private.h: private PMT structures * pmt_private.h: private PMT structures
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pmt_private.h,v 1.1 2002/01/07 18:30:35 bozo Exp $ * $Id: pmt_private.h,v 1.1 2002/01/22 20:30:16 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -34,32 +34,38 @@ ...@@ -34,32 +34,38 @@
*****************************************************************************/ *****************************************************************************/
typedef struct dvbpsi_pmt_decoder_s typedef struct dvbpsi_pmt_decoder_s
{ {
uint16_t i_program_number; uint16_t i_program_number;
dvbpsi_pmt_callback pf_callback; dvbpsi_pmt_callback pf_callback;
void * p_cb_data; void * p_cb_data;
dvbpsi_pmt_t current_pmt; dvbpsi_pmt_t current_pmt;
dvbpsi_pmt_t next_pmt; dvbpsi_pmt_t * p_building_pmt;
int b_building_next; int b_current_valid;
int b_builded_next;
int b_current_next;
uint8_t i_previous_section_number;
uint8_t i_last_section_number;
int b_section_lost; uint8_t i_last_section_number;
dvbpsi_psi_section_t * ap_sections [256];
} dvbpsi_pmt_decoder_t; } dvbpsi_pmt_decoder_t;
/***************************************************************************** /*****************************************************************************
* dvbpsi_DecodePMTSection * dvbpsi_GatherPMTSections
***************************************************************************** *****************************************************************************
* Callback for the PSI decoder. * Callback for the PSI decoder.
*****************************************************************************/ *****************************************************************************/
void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder, void dvbpsi_GatherPMTSections(dvbpsi_decoder_t* p_decoder,
dvbpsi_psi_section_t* p_section); dvbpsi_psi_section_t* p_section);
/*****************************************************************************
* dvbpsi_DecodePMTSections
*****************************************************************************
* PMT decoder.
*****************************************************************************/
void dvbpsi_DecodePMTSections(dvbpsi_pmt_t* p_pmt,
dvbpsi_psi_section_t* p_section);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment