- 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*)
osf3* | osf4* | osf5*)
version_type=osf
need_version=no
need_lib_prefix=no
soname_spec='${libname}${release}.so'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
shlibpath_var=LD_LIBRARY_PATH
......@@ -3420,13 +3421,7 @@ irix5* | irix6* | nonstopux*)
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
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_deplibs_check_method=pass_all
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
......
This diff is collapsed.
......@@ -42,7 +42,7 @@ else
fi
AC_OUTPUT([Makefile src/Makefile examples/Makefile misc/Makefile])
AC_OUTPUT([Makefile src/Makefile src/tables/Makefile examples/Makefile misc/Makefile])
echo "
libdvbpsi configuration
......
......@@ -2,7 +2,7 @@
* decode_pat.c: PAT decoder example
*----------------------------------------------------------------------------
* (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>
*
......@@ -36,7 +36,7 @@
#ifdef DVBPSI_DIST
#include "../src/dvbpsi.h"
#include "../src/psi.h"
#include "../src/pat.h"
#include "../src/tables/pat.h"
#else
#include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h>
......@@ -88,7 +88,6 @@ void DumpPAT(void* p_zero, dvbpsi_pat_t* p_pat)
p_program = p_program->p_next;
}
printf( " active : %d\n", p_pat->b_current_next);
printf( " complete : %d\n\n", p_pat->b_complete);
dvbpsi_DeletePAT(p_pat);
}
......
......@@ -2,7 +2,7 @@
* decode_pmt.c: PAT decoder example
*----------------------------------------------------------------------------
* (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>
*
......@@ -37,7 +37,7 @@
#include "../src/dvbpsi.h"
#include "../src/psi.h"
#include "../src/descriptor.h"
#include "../src/pmt.h"
#include "../src/tables/pmt.h"
#else
#include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h>
......@@ -112,8 +112,6 @@ void DumpPMT(void* p_zero, dvbpsi_pmt_t* p_pmt)
DumpDescriptors(" | ]", p_es->p_first_descriptor);
p_es = p_es->p_next;
}
printf( " complete : %d\n\n",
p_pmt->b_complete);
dvbpsi_DeletePMT(p_pmt);
}
......
......@@ -2,7 +2,7 @@
* gen_pat.c: PAT generator
*----------------------------------------------------------------------------
* (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>
*
......@@ -33,7 +33,7 @@
#ifdef DVBPSI_DIST
#include "../src/dvbpsi.h"
#include "../src/psi.h"
#include "../src/pat.h"
#include "../src/tables/pat.h"
#else
#include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h>
......@@ -142,12 +142,12 @@ int main(int i_argc, char* pa_argv[])
writePSI(packet, p_section6);
dvbpsi_DeletePSISection(p_section1);
dvbpsi_DeletePSISection(p_section2);
dvbpsi_DeletePSISection(p_section3);
dvbpsi_DeletePSISection(p_section4);
dvbpsi_DeletePSISection(p_section5);
dvbpsi_DeletePSISection(p_section6);
dvbpsi_DeletePSISections(p_section1);
dvbpsi_DeletePSISections(p_section2);
dvbpsi_DeletePSISections(p_section3);
dvbpsi_DeletePSISections(p_section4);
dvbpsi_DeletePSISections(p_section5);
dvbpsi_DeletePSISections(p_section6);
dvbpsi_EmptyPAT(&pat);
......
......@@ -2,7 +2,7 @@
* gen_pmt.c: PMT generator
*----------------------------------------------------------------------------
* (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>
*
......@@ -34,7 +34,7 @@
#include "../src/dvbpsi.h"
#include "../src/psi.h"
#include "../src/descriptor.h"
#include "../src/pmt.h"
#include "../src/tables/pmt.h"
#else
#include <dvbpsi/dvbpsi.h>
#include <dvbpsi/psi.h>
......@@ -149,12 +149,12 @@ int main(int i_argc, char* pa_argv[])
writePSI(packet, p_section6);
dvbpsi_DeletePSISection(p_section1);
dvbpsi_DeletePSISection(p_section2);
dvbpsi_DeletePSISection(p_section3);
dvbpsi_DeletePSISection(p_section4);
dvbpsi_DeletePSISection(p_section5);
dvbpsi_DeletePSISection(p_section6);
dvbpsi_DeletePSISections(p_section1);
dvbpsi_DeletePSISections(p_section2);
dvbpsi_DeletePSISections(p_section3);
dvbpsi_DeletePSISections(p_section4);
dvbpsi_DeletePSISections(p_section5);
dvbpsi_DeletePSISections(p_section6);
dvbpsi_EmptyPMT(&pmt);
......
......@@ -2,11 +2,14 @@
pkgincludedir = $(includedir)/dvbpsi
SUBDIRS = tables
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@
noinst_HEADERS = dvbpsi_private.h psi_private.h pat_private.h pmt_private.h
pkginclude_HEADERS = dvbpsi.h psi.h pat.h descriptor.h pmt.h
noinst_HEADERS = dvbpsi_private.h
pkginclude_HEADERS = dvbpsi.h psi.h descriptor.h
......@@ -75,13 +75,16 @@ VERSION = @VERSION@
pkgincludedir = $(includedir)/dvbpsi
SUBDIRS = tables
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@
noinst_HEADERS = dvbpsi_private.h psi_private.h pat_private.h pmt_private.h
pkginclude_HEADERS = dvbpsi.h psi.h pat.h descriptor.h pmt.h
noinst_HEADERS = dvbpsi_private.h
pkginclude_HEADERS = dvbpsi.h psi.h descriptor.h
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
......@@ -92,8 +95,8 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libdvbpsi_la_LIBADD =
libdvbpsi_la_OBJECTS = dvbpsi.lo psi.lo pat.lo descriptor.lo pmt.lo
libdvbpsi_la_DEPENDENCIES = tables/lib_tables.la
libdvbpsi_la_OBJECTS = dvbpsi.lo psi.lo descriptor.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)
......@@ -108,8 +111,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/descriptor.P .deps/dvbpsi.P .deps/pat.P .deps/pmt.P \
.deps/psi.P
DEP_FILES = .deps/descriptor.P .deps/dvbpsi.P .deps/psi.P
SOURCES = $(libdvbpsi_la_SOURCES)
OBJECTS = $(libdvbpsi_la_OBJECTS)
......@@ -233,6 +235,61 @@ uninstall-pkgincludeHEADERS:
rm -f $(DESTDIR)$(pkgincludedir)/$$p; \
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
ID: $(HEADERS) $(SOURCES) $(LISP)
......@@ -243,9 +300,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& 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=; \
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)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
......@@ -282,6 +344,16 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
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 || :)
......@@ -315,32 +387,33 @@ maintainer-clean-depend:
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
info: info-recursive
dvi-am:
dvi: dvi-am
dvi: dvi-recursive
check-am: all-am
check: check-am
check: check-recursive
installcheck-am:
installcheck: installcheck-am
installcheck: installcheck-recursive
all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am: install-libLTLIBRARIES
install-exec: install-exec-am
install-exec: install-exec-recursive
install-data-am: install-pkgincludeHEADERS
install-data: install-data-am
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
install: install-recursive
uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
uninstall: uninstall-am
uninstall: uninstall-recursive
all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
all-redirect: all-am
all-redirect: all-recursive-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(pkgincludedir)
......@@ -357,19 +430,19 @@ mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \
clean-tags clean-depend clean-generic mostlyclean-am
clean: clean-am
clean: clean-recursive
distclean-am: distclean-hdr distclean-libLTLIBRARIES distclean-compile \
distclean-libtool distclean-tags distclean-depend \
distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
distclean: distclean-recursive
maintainer-clean-am: maintainer-clean-hdr \
maintainer-clean-libLTLIBRARIES \
......@@ -379,7 +452,7 @@ maintainer-clean-am: maintainer-clean-hdr \
@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
maintainer-clean: maintainer-clean-recursive
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
......@@ -388,13 +461,19 @@ uninstall-libLTLIBRARIES install-libLTLIBRARIES 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 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 \
mostlyclean-generic distclean-generic clean-generic \
install-pkgincludeHEADERS install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive 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 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
......
......@@ -2,7 +2,7 @@
* dvbpsi.c: conversion from TS packets to PSI sections
*----------------------------------------------------------------------------
* (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>
*
......@@ -31,9 +31,8 @@
#include <stdio.h>
#include "dvbpsi.h"
#include "psi.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)
h_dvbpsi->b_discontinuity = 1;
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;
}
}
......@@ -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)
{
DVBPSI_ERROR("PSI decoder", "PSI section too long");
dvbpsi_DeletePSISection(p_section);
dvbpsi_DeletePSISections(p_section);
h_dvbpsi->p_current_section = NULL;
/* If there is a new section not being handled then go forward
in the packet */
......@@ -203,7 +202,7 @@ void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data)
else
{
/* PSI section isn't valid => trash it */
dvbpsi_DeletePSISection(p_section);
dvbpsi_DeletePSISections(p_section);
h_dvbpsi->p_current_section = NULL;
}
......
......@@ -2,7 +2,7 @@
* dvbpsi.h: main header
*----------------------------------------------------------------------------
* (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>
*
......@@ -47,6 +47,45 @@ typedef struct dvbpsi_decoder_s * dvbpsi_handle;
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
#error "Multiple inclusions of dvbpsi.h"
#endif
......
......@@ -2,7 +2,7 @@
* dvbpsi_private.h: main private header
*----------------------------------------------------------------------------
* (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>
*
......@@ -28,38 +28,6 @@
#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
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* psi.c: common PSI functions
*----------------------------------------------------------------------------
* (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>
*
......@@ -31,9 +31,8 @@
#include <stdlib.h>
#include "dvbpsi.h"
#include "psi.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)
/*****************************************************************************
* dvbpsi_DeletePSISection
* dvbpsi_DeletePSISections
*****************************************************************************
* 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)
{
......
......@@ -2,7 +2,7 @@
* psi.h: common PSI structures
*----------------------------------------------------------------------------
* (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>
*
......@@ -34,7 +34,7 @@
* This structure is used to store a PSI section. The common information are
* 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 */
uint8_t i_table_id; /* table_id */
......@@ -63,7 +63,7 @@ typedef struct dvbpsi_psi_section_s
/* list handling */
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);
/*****************************************************************************
* dvbpsi_DeletePSISection
* dvbpsi_DeletePSISections
*****************************************************************************
* 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
......
/*****************************************************************************
* 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:
This diff is collapsed.
......@@ -2,7 +2,7 @@
* pat.h: PAT structures
*----------------------------------------------------------------------------
* (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>
*
......@@ -58,9 +58,6 @@ typedef struct dvbpsi_pat_s
dvbpsi_pat_program_t * p_first_program; /* program list */
int b_complete; /* may not be complete if
data has been lost */
} dvbpsi_pat_t;
......
......@@ -2,7 +2,7 @@
* pat_private.h: private PAT structures
*----------------------------------------------------------------------------
* (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>
*
......@@ -35,28 +35,36 @@
*****************************************************************************/
typedef struct dvbpsi_pat_decoder_s
{
dvbpsi_pat_callback pf_callback;
void * p_cb_data;
dvbpsi_pat_callback pf_callback;
void * p_cb_data;
dvbpsi_pat_t current_pat;
dvbpsi_pat_t next_pat;
dvbpsi_pat_t current_pat;
dvbpsi_pat_t * p_building_pat;
int b_building_next;
uint8_t i_previous_section_number;
uint8_t i_last_section_number;
int b_current_valid;
int b_section_lost;
uint8_t i_last_section_number;
dvbpsi_psi_section_t * ap_sections [256];
} dvbpsi_pat_decoder_t;
/*****************************************************************************
* dvbpsi_DecodePATSection
* dvbpsi_GatherPATSections
*****************************************************************************
* Callback for the PSI decoder.
*****************************************************************************/
void dvbpsi_DecodePATSection(dvbpsi_decoder_t* p_decoder,
dvbpsi_psi_section_t* p_section);
void dvbpsi_GatherPATSections(dvbpsi_decoder_t* p_decoder,
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
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* pmt.h: PMT structures
*----------------------------------------------------------------------------
* (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>
*
......@@ -64,9 +64,6 @@ typedef struct dvbpsi_pmt_s
dvbpsi_pmt_es_t * p_first_es; /* ES list */
int b_complete; /* may not be complete if
data has been lost */
} dvbpsi_pmt_t;
......
......@@ -2,7 +2,7 @@
* pmt_private.h: private PMT structures
*----------------------------------------------------------------------------
* (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>
*
......@@ -34,32 +34,38 @@
*****************************************************************************/
typedef struct dvbpsi_pmt_decoder_s
{
uint16_t i_program_number;
uint16_t i_program_number;
dvbpsi_pmt_callback pf_callback;
void * p_cb_data;
dvbpsi_pmt_callback pf_callback;
void * p_cb_data;
dvbpsi_pmt_t current_pmt;
dvbpsi_pmt_t next_pmt;
dvbpsi_pmt_t current_pmt;
dvbpsi_pmt_t * p_building_pmt;
int b_building_next;
int b_builded_next;
int b_current_next;
uint8_t i_previous_section_number;
uint8_t i_last_section_number;
int b_current_valid;
int b_section_lost;
uint8_t i_last_section_number;
dvbpsi_psi_section_t * ap_sections [256];
} dvbpsi_pmt_decoder_t;
/*****************************************************************************
* dvbpsi_DecodePMTSection
* dvbpsi_GatherPMTSections
*****************************************************************************
* Callback for the PSI decoder.
*****************************************************************************/
void dvbpsi_DecodePMTSection(dvbpsi_decoder_t* p_decoder,
dvbpsi_psi_section_t* p_section);
void dvbpsi_GatherPMTSections(dvbpsi_decoder_t* p_decoder,
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
......
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