Commit 5a70322c authored by Johan Bilien's avatar Johan Bilien

* Moved Program Specific Information decoder to the ts demux module

* Added a mpeg_ts_dvbpsi module tha uses libdvbpsi to decode PSIs. It is
  used by default if the lib is found. It shares much code with mpeg_ts
parent 060c0b88
...@@ -46,6 +46,7 @@ E: jobi@via.ecp.fr ...@@ -46,6 +46,7 @@ E: jobi@via.ecp.fr
C: jobi C: jobi
D: VCD input D: VCD input
D: Satellite input D: Satellite input
D: libdvbpsi support
S: France S: France
N: Julien Blache N: Julien Blache
......
...@@ -131,6 +131,7 @@ PLUGINS_TARGETS := a52/a52 \ ...@@ -131,6 +131,7 @@ PLUGINS_TARGETS := a52/a52 \
mpeg_system/mpeg_es \ mpeg_system/mpeg_es \
mpeg_system/mpeg_ps \ mpeg_system/mpeg_ps \
mpeg_system/mpeg_ts \ mpeg_system/mpeg_ts \
mpeg_system/mpeg_ts_dvbpsi \
mpeg_adec/mpeg_adec \ mpeg_adec/mpeg_adec \
mpeg_vdec/mpeg_vdec \ mpeg_vdec/mpeg_vdec \
network/ipv4 \ network/ipv4 \
......
...@@ -73,6 +73,7 @@ builtins_CFLAGS := @builtins_CFLAGS@ ...@@ -73,6 +73,7 @@ builtins_CFLAGS := @builtins_CFLAGS@
arts_CFLAGS = @arts_CFLAGS@ arts_CFLAGS = @arts_CFLAGS@
dvd_CFLAGS = @dvd_CFLAGS@ dvd_CFLAGS = @dvd_CFLAGS@
dvdread_CFLAGS = @dvdread_CFLAGS@ dvdread_CFLAGS = @dvdread_CFLAGS@
mpeg_ts_dvbpsi_CFLAGS = @mpeg_ts_dvbpsi_CFLAGS@
directx_CFLAGS = @directx_CFLAGS@ directx_CFLAGS = @directx_CFLAGS@
esd_CFLAGS = @esd_CFLAGS@ esd_CFLAGS = @esd_CFLAGS@
ffmpeg_CFLAGS = @ffmpeg_CFLAGS@ ffmpeg_CFLAGS = @ffmpeg_CFLAGS@
...@@ -107,6 +108,7 @@ directx_LDFLAGS = @directx_LDFLAGS@ ...@@ -107,6 +108,7 @@ directx_LDFLAGS = @directx_LDFLAGS@
dsp_LDFLAGS = @dsp_LDFLAGS@ dsp_LDFLAGS = @dsp_LDFLAGS@
dvd_LDFLAGS = @dvd_LDFLAGS@ dvd_LDFLAGS = @dvd_LDFLAGS@
dvdread_LDFLAGS = @dvdread_LDFLAGS@ dvdread_LDFLAGS = @dvdread_LDFLAGS@
mpeg_ts_dvbpsi_LDFLAGS = @mpeg_ts_dvbpsi_LDFLAGS@
esd_LDFLAGS = @esd_LDFLAGS@ esd_LDFLAGS = @esd_LDFLAGS@
filter_distort_LDFLAGS = @filter_distort_LDFLAGS@ filter_distort_LDFLAGS = @filter_distort_LDFLAGS@
ffmpeg_LDFLAGS = @ffmpeg_LDFLAGS@ ffmpeg_LDFLAGS = @ffmpeg_LDFLAGS@
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -680,6 +680,35 @@ then ...@@ -680,6 +680,35 @@ then
CPPFLAGS="$save_CPPFLAGS" CPPFLAGS="$save_CPPFLAGS"
fi fi
dnl
dnl libdvbpsi ts demux
dnl
AC_ARG_ENABLE(dvbpsi,
[ --enable-dvbpsi dvbpsi ts demux module (default disabled)])
if test "x$enable_dvdread" != "xno"
then
if test "x$withval" = x
then
test_LDFLAGS=""
test_CFLAGS=""
else
test_LDFLAGS="-L${withval}/lib"
test_CFLAGS="-I${withval}/include"
fi
CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
AC_CHECK_HEADER([dvbpsi/dvbpsi.h],[
PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
],[
if test "x$enable_dvbpsi" != x
then
AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org])
fi
])
CPPFLAGS="$save_CPPFLAGS"
fi
dnl dnl
dnl VCD module dnl VCD module
dnl dnl
...@@ -1503,6 +1532,7 @@ AC_SUBST(builtins_CFLAGS) ...@@ -1503,6 +1532,7 @@ AC_SUBST(builtins_CFLAGS)
AC_SUBST(arts_CFLAGS) AC_SUBST(arts_CFLAGS)
AC_SUBST(dvd_CFLAGS) AC_SUBST(dvd_CFLAGS)
AC_SUBST(dvdread_CFLAGS) AC_SUBST(dvdread_CFLAGS)
AC_SUBST(mpeg_ts_dvbpsi_CFLAGS)
AC_SUBST(directx_CFLAGS) AC_SUBST(directx_CFLAGS)
AC_SUBST(esd_CFLAGS) AC_SUBST(esd_CFLAGS)
AC_SUBST(ffmpeg_CFLAGS) AC_SUBST(ffmpeg_CFLAGS)
...@@ -1534,6 +1564,7 @@ AC_SUBST(directx_LDFLAGS) ...@@ -1534,6 +1564,7 @@ AC_SUBST(directx_LDFLAGS)
AC_SUBST(dsp_LDFLAGS) AC_SUBST(dsp_LDFLAGS)
AC_SUBST(dvd_LDFLAGS) AC_SUBST(dvd_LDFLAGS)
AC_SUBST(dvdread_LDFLAGS) AC_SUBST(dvdread_LDFLAGS)
AC_SUBST(mpeg_ts_dvbpsi_LDFLAGS)
AC_SUBST(esd_LDFLAGS) AC_SUBST(esd_LDFLAGS)
AC_SUBST(filter_distort_LDFLAGS) AC_SUBST(filter_distort_LDFLAGS)
AC_SUBST(ffmpeg_LDFLAGS) AC_SUBST(ffmpeg_LDFLAGS)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.97 2002/04/24 00:36:24 sam Exp $ * $Id: common.h,v 1.98 2002/04/25 02:10:33 jobi Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -562,6 +562,8 @@ typedef struct module_symbols_s ...@@ -562,6 +562,8 @@ typedef struct module_symbols_s
int ( * input_ChangeProgram ) ( struct input_thread_s *, u16 ); int ( * input_ChangeProgram ) ( struct input_thread_s *, u16 );
struct es_descriptor_s * ( * input_FindES ) ( struct input_thread_s *, struct es_descriptor_s * ( * input_FindES ) ( struct input_thread_s *,
u16 ); u16 );
struct pgrm_descriptor_s * ( * input_FindProgram )
( struct input_thread_s *, u16 );
struct es_descriptor_s * ( * input_AddES ) ( struct input_thread_s *, struct es_descriptor_s * ( * input_AddES ) ( struct input_thread_s *,
struct pgrm_descriptor_s *, u16, size_t ); struct pgrm_descriptor_s *, u16, size_t );
void ( * input_DelES ) ( struct input_thread_s *, void ( * input_DelES ) ( struct input_thread_s *,
...@@ -607,11 +609,12 @@ typedef struct module_symbols_s ...@@ -607,11 +609,12 @@ typedef struct module_symbols_s
ssize_t ( * input_ReadTS ) ( struct input_thread_s *, ssize_t ( * input_ReadTS ) ( struct input_thread_s *,
struct data_packet_s ** ); struct data_packet_s ** );
void ( * input_DemuxTS ) ( struct input_thread_s *, void ( * input_DemuxTS ) ( struct input_thread_s *,
struct data_packet_s * ); struct data_packet_s *,
void ( * input_DemuxPSI ) ( struct input_thread_s *, void(* pf_psi_callback)
( struct input_thread_s *,
struct data_packet_s *, struct data_packet_s *,
struct es_descriptor_s *, struct es_descriptor_s *,
boolean_t, boolean_t ); boolean_t ) );
int ( * input_ClockManageControl ) ( struct input_thread_s *, int ( * input_ClockManageControl ) ( struct input_thread_s *,
struct pgrm_descriptor_s *, struct pgrm_descriptor_s *,
mtime_t ); mtime_t );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* control the pace of reading. * control the pace of reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.65 2002/04/24 00:36:24 sam Exp $ * $Id: input_ext-intf.h,v 1.66 2002/04/25 02:10:33 jobi Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -235,7 +235,6 @@ typedef struct stream_descriptor_s ...@@ -235,7 +235,6 @@ typedef struct stream_descriptor_s
* the interface */ * the interface */
es_descriptor_t * p_removed_es; /* ES removed from the interface */ es_descriptor_t * p_removed_es; /* ES removed from the interface */
/* Stream control */ /* Stream control */
stream_ctrl_t control; stream_ctrl_t control;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* but exported to plug-ins * but exported to plug-ins
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2002 VideoLAN * Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.22 2002/04/24 00:36:24 sam Exp $ * $Id: input_ext-plugins.h,v 1.23 2002/04/25 02:10:33 jobi Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -49,6 +49,7 @@ int input_SetProgram( struct input_thread_s *, struct pgrm_descriptor_s * ); ...@@ -49,6 +49,7 @@ int input_SetProgram( struct input_thread_s *, struct pgrm_descriptor_s * );
struct input_area_s * input_AddArea( struct input_thread_s * ); struct input_area_s * input_AddArea( struct input_thread_s * );
void input_DelArea ( struct input_thread_s *, struct input_area_s * ); void input_DelArea ( struct input_thread_s *, struct input_area_s * );
struct es_descriptor_s * input_FindES( struct input_thread_s *, u16 ); struct es_descriptor_s * input_FindES( struct input_thread_s *, u16 );
struct pgrm_descriptor_s * input_FindProgram( struct input_thread_s *, u16 );
struct es_descriptor_s * input_AddES ( struct input_thread_s *, struct es_descriptor_s * input_AddES ( struct input_thread_s *,
struct pgrm_descriptor_s *, u16, struct pgrm_descriptor_s *, u16,
size_t ); size_t );
...@@ -60,6 +61,7 @@ int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * ); ...@@ -60,6 +61,7 @@ int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * );
# define input_EndStream p_symbols->input_EndStream # define input_EndStream p_symbols->input_EndStream
# define input_SetProgram p_symbols->input_SetProgram # define input_SetProgram p_symbols->input_SetProgram
# define input_FindES p_symbols->input_FindES # define input_FindES p_symbols->input_FindES
# define input_FindProgram p_symbols->input_FindProgram
# define input_AddES p_symbols->input_AddES # define input_AddES p_symbols->input_AddES
# define input_DelES p_symbols->input_DelES # define input_DelES p_symbols->input_DelES
# define input_SelectES p_symbols->input_SelectES # define input_SelectES p_symbols->input_SelectES
...@@ -203,6 +205,19 @@ static __inline__ void input_NullPacket( input_thread_t * p_input, ...@@ -203,6 +205,19 @@ static __inline__ void input_NullPacket( input_thread_t * p_input,
#define PSI_IS_PMT 0x01 #define PSI_IS_PMT 0x01
#define UNKNOWN_PSI 0xff #define UNKNOWN_PSI 0xff
/****************************************************************************
* psi_callback_t
****************************************************************************
* Used by TS demux to handle a PSI, either with the builtin decoder, either
* with a library such as libdvbpsi
****************************************************************************/
typedef void( * psi_callback_t )(
input_thread_t * p_input,
data_packet_t * p_data,
es_descriptor_t * p_es,
boolean_t b_unit_start );
/***************************************************************************** /*****************************************************************************
* psi_section_t * psi_section_t
***************************************************************************** *****************************************************************************
...@@ -256,6 +271,8 @@ typedef struct pgrm_ts_data_s ...@@ -256,6 +271,8 @@ typedef struct pgrm_ts_data_s
{ {
u16 i_pcr_pid; /* PCR ES, for TS streams */ u16 i_pcr_pid; /* PCR ES, for TS streams */
int i_pmt_version; int i_pmt_version;
/* libdvbpsi pmt decoder handle */
void * p_pmt_handle;
} pgrm_ts_data_t; } pgrm_ts_data_t;
/***************************************************************************** /*****************************************************************************
...@@ -264,6 +281,8 @@ typedef struct pgrm_ts_data_s ...@@ -264,6 +281,8 @@ typedef struct pgrm_ts_data_s
typedef struct stream_ts_data_s typedef struct stream_ts_data_s
{ {
int i_pat_version; /* Current version of the PAT */ int i_pat_version; /* Current version of the PAT */
/* libdvbpsi pmt decoder handle */
void * p_pat_handle;
} stream_ts_data_t; } stream_ts_data_t;
/***************************************************************************** /*****************************************************************************
...@@ -292,9 +311,8 @@ es_descriptor_t * input_ParsePS( struct input_thread_s *, ...@@ -292,9 +311,8 @@ es_descriptor_t * input_ParsePS( struct input_thread_s *,
struct data_packet_s * ); struct data_packet_s * );
ssize_t input_ReadTS ( struct input_thread_s *, struct data_packet_s ** ); ssize_t input_ReadTS ( struct input_thread_s *, struct data_packet_s ** );
void input_DemuxPS ( struct input_thread_s *, struct data_packet_s * ); void input_DemuxPS ( struct input_thread_s *, struct data_packet_s * );
void input_DemuxTS ( struct input_thread_s *, struct data_packet_s * ); void input_DemuxTS ( struct input_thread_s *, struct data_packet_s *,
void input_DemuxPSI ( struct input_thread_s *, struct data_packet_s *, psi_callback_t );
struct es_descriptor_s *, boolean_t, boolean_t );
#else #else
# define input_ParsePES p_symbols->input_ParsePES # define input_ParsePES p_symbols->input_ParsePES
# define input_GatherPES p_symbols->input_GatherPES # define input_GatherPES p_symbols->input_GatherPES
...@@ -303,7 +321,6 @@ void input_DemuxPSI ( struct input_thread_s *, struct data_packet_s *, ...@@ -303,7 +321,6 @@ void input_DemuxPSI ( struct input_thread_s *, struct data_packet_s *,
# define input_DemuxPS p_symbols->input_DemuxPS # define input_DemuxPS p_symbols->input_DemuxPS
# define input_ReadTS p_symbols->input_ReadTS # define input_ReadTS p_symbols->input_ReadTS
# define input_DemuxTS p_symbols->input_DemuxTS # define input_DemuxTS p_symbols->input_DemuxTS
# define input_DemuxPSI p_symbols->input_DemuxPSI
#endif #endif
......
mpeg_es_SOURCES = mpeg_es.c mpeg_es_SOURCES = mpeg_es.c
mpeg_ps_SOURCES = mpeg_ps.c mpeg_ps_SOURCES = mpeg_ps.c
mpeg_ts_SOURCES = mpeg_ts.c mpeg_ts_SOURCES = mpeg_ts.c
mpeg_ts_dvbpsi_SOURCES = mpeg_ts.c
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules_plugin.h : Plugin management functions used by the core application. * modules_plugin.h : Plugin management functions used by the core application.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules_plugin.h,v 1.19 2002/04/11 08:55:49 sam Exp $ * $Id: modules_plugin.h,v 1.20 2002/04/25 02:10:33 jobi Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -224,6 +224,7 @@ module_error( char *psz_buffer ) ...@@ -224,6 +224,7 @@ module_error( char *psz_buffer )
(p_symbols)->input_ToggleES = input_ToggleES; \ (p_symbols)->input_ToggleES = input_ToggleES; \
(p_symbols)->input_ChangeProgram = input_ChangeProgram; \ (p_symbols)->input_ChangeProgram = input_ChangeProgram; \
(p_symbols)->input_ChangeArea = input_ChangeArea; \ (p_symbols)->input_ChangeArea = input_ChangeArea; \
(p_symbols)->input_FindProgram = input_FindProgram; \
(p_symbols)->input_FindES = input_FindES; \ (p_symbols)->input_FindES = input_FindES; \
(p_symbols)->input_AddES = input_AddES; \ (p_symbols)->input_AddES = input_AddES; \
(p_symbols)->input_DelES = input_DelES; \ (p_symbols)->input_DelES = input_DelES; \
...@@ -247,7 +248,6 @@ module_error( char *psz_buffer ) ...@@ -247,7 +248,6 @@ module_error( char *psz_buffer )
(p_symbols)->input_DemuxPS = input_DemuxPS; \ (p_symbols)->input_DemuxPS = input_DemuxPS; \
(p_symbols)->input_ReadTS = input_ReadTS; \ (p_symbols)->input_ReadTS = input_ReadTS; \
(p_symbols)->input_DemuxTS = input_DemuxTS; \ (p_symbols)->input_DemuxTS = input_DemuxTS; \
(p_symbols)->input_DemuxPSI = input_DemuxPSI; \
(p_symbols)->input_ClockManageControl = input_ClockManageControl; \ (p_symbols)->input_ClockManageControl = input_ClockManageControl; \
(p_symbols)->input_FDSeek = input_FDSeek; \ (p_symbols)->input_FDSeek = input_FDSeek; \
(p_symbols)->input_FDClose = input_FDClose; \ (p_symbols)->input_FDClose = input_FDClose; \
......
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