* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
- * $Id: input_ext-plugins.h,v 1.33 2002/07/31 20:56:50 sam Exp $
+ * $Id: input_ext-plugins.h,v 1.38 2002/11/12 13:57:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
VLC_EXPORT( int, input_InitStream,( input_thread_t *, size_t ) );
VLC_EXPORT( void, input_EndStream, ( input_thread_t * ) );
-VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, u16 ) );
-VLC_EXPORT( pgrm_descriptor_t *, input_AddProgram, ( input_thread_t *, u16, size_t ) );
+VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, uint16_t ) );
+VLC_EXPORT( pgrm_descriptor_t *, input_AddProgram, ( input_thread_t *, uint16_t, size_t ) );
VLC_EXPORT( void, input_DelProgram,( input_thread_t *, pgrm_descriptor_t * ) );
VLC_EXPORT( int, input_SetProgram,( input_thread_t *, pgrm_descriptor_t * ) );
VLC_EXPORT( input_area_t *, input_AddArea,( input_thread_t * ) );
VLC_EXPORT( void, input_DelArea, ( input_thread_t *, input_area_t * ) );
-VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, u16 ) );
-VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, u16, size_t ) );
+VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, uint16_t ) );
+VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, uint16_t, size_t ) );
VLC_EXPORT( void, input_DelES, ( input_thread_t *, es_descriptor_t * ) );
VLC_EXPORT( int, input_SelectES, ( input_thread_t *, es_descriptor_t * ) );
VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) );
/*****************************************************************************
* Prototypes from input_dec.c
*****************************************************************************/
-//decoder_capabilities_t * input_ProbeDecoder( void );
decoder_fifo_t * input_RunDecoder( input_thread_t *, es_descriptor_t * );
void input_EndDecoder( input_thread_t *, es_descriptor_t * );
VLC_EXPORT( void, input_DecodePES, ( decoder_fifo_t *, pes_packet_t * ) );
+VLC_EXPORT( void, input_ExtractPES, ( decoder_fifo_t *, pes_packet_t ** ) );
+VLC_EXPORT( void, input_FlushPESFifo, ( decoder_fifo_t * ) );
void input_EscapeDiscontinuity( input_thread_t * );
void input_EscapeAudioDiscontinuity( input_thread_t * );
}
}
-
-/*
- * Optional MPEG demultiplexing
- */
-
-/*****************************************************************************
- * Constants
- *****************************************************************************/
-#define TS_PACKET_SIZE 188 /* Size of a TS packet */
-#define TS_SYNC_CODE 0x47 /* First byte of a TS packet */
-#define PSI_SECTION_SIZE 4096 /* Maximum size of a PSI section */
-
-#define PAT_UNINITIALIZED (1 << 6)
-#define PMT_UNINITIALIZED (1 << 6)
-
-#define PSI_IS_PAT 0x00
-#define PSI_IS_PMT 0x01
-#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,
- vlc_bool_t b_unit_start );
-
-
-/*****************************************************************************
- * psi_section_t
- *****************************************************************************
- * Describes a PSI section. Beware, it doesn't contain pointers to the TS
- * packets that contain it as for a PES, but the data themselves
- *****************************************************************************/
-typedef struct psi_section_t
-{
- byte_t buffer[PSI_SECTION_SIZE];
-
- u8 i_section_number;
- u8 i_last_section_number;
- u8 i_version_number;
- u16 i_section_length;
- u16 i_read_in_section;
-
- /* the PSI is complete */
- vlc_bool_t b_is_complete;
-
- /* packet missed up ? */
- vlc_bool_t b_trash;
-
- /*about sections */
- vlc_bool_t b_section_complete;
-
- /* where are we currently ? */
- byte_t * p_current;
-
-} psi_section_t;
-
-/*****************************************************************************
- * es_ts_data_t: extension of es_descriptor_t
- *****************************************************************************/
-typedef struct es_ts_data_t
-{
- vlc_bool_t b_psi; /* Does the stream have to be handled by
- * the PSI decoder ? */
-
- int i_psi_type; /* There are different types of PSI */
-
- psi_section_t * p_psi_section; /* PSI packets */
-
- /* Markers */
- int i_continuity_counter;
-} es_ts_data_t;
-
-/*****************************************************************************
- * pgrm_ts_data_t: extension of pgrm_descriptor_t
- *****************************************************************************/
-typedef struct pgrm_ts_data_t
-{
- u16 i_pcr_pid; /* PCR ES, for TS streams */
- int i_pmt_version;
- /* libdvbpsi pmt decoder handle */
- void * p_pmt_handle;
-} pgrm_ts_data_t;
-
-/*****************************************************************************
- * stream_ts_data_t: extension of stream_descriptor_t
- *****************************************************************************/
-typedef struct stream_ts_data_t
-{
- int i_pat_version; /* Current version of the PAT */
- /* libdvbpsi pmt decoder handle */
- void * p_pat_handle;
-} stream_ts_data_t;
-
-/*****************************************************************************
- * stream_ps_data_t: extension of stream_descriptor_t
- *****************************************************************************/
-typedef struct stream_ps_data_t
-{
- vlc_bool_t b_has_PSM; /* very rare, in fact */
-
- u8 i_PSM_version;
-} stream_ps_data_t;
-
-/* PSM version is 5 bits, so -1 is not a valid value */
-#define EMPTY_PSM_VERSION -1
-
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-VLC_EXPORT( void, input_ParsePES, ( input_thread_t *, es_descriptor_t * ) );
-VLC_EXPORT( void, input_GatherPES, ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t, vlc_bool_t ) );
-VLC_EXPORT( ssize_t, input_ReadPS, ( input_thread_t *, data_packet_t ** ) );
-VLC_EXPORT( es_descriptor_t *, input_ParsePS, ( input_thread_t *, data_packet_t * ) );
-VLC_EXPORT( ssize_t, input_ReadTS, ( input_thread_t *, data_packet_t ** ) );
-VLC_EXPORT( void, input_DemuxPS, ( input_thread_t *, data_packet_t * ) );
-VLC_EXPORT( void, input_DemuxTS, ( input_thread_t *, data_packet_t *, void(*) ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t ) ) );
-
/*
* Optional standard file descriptor operations (input_ext-plugins.h)
*/
int i_handle;
};
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-VLC_EXPORT( void, __input_FDClose, ( vlc_object_t * ) );
-#define input_FDClose(a) __input_FDClose(VLC_OBJECT(a))
-VLC_EXPORT( void, __input_FDNetworkClose, ( vlc_object_t * ) );
-#define input_FDNetworkClose(a) __input_FDNetworkClose(VLC_OBJECT(a))
-VLC_EXPORT( ssize_t, input_FDRead, ( input_thread_t *, byte_t *, size_t ) );
-VLC_EXPORT( ssize_t, input_FDNetworkRead, ( input_thread_t *, byte_t *, size_t ) );
-VLC_EXPORT( void, input_FDSeek, ( input_thread_t *, off_t ) );
-