Commit f1240107 authored by Sam Hocevar's avatar Sam Hocevar

- je ne ferai plus de commits d�biles � 5h du mat

 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
 - je ne ferai plus de commits d�biles � 5h du mat
parent 5e22d74d
/*******************************************************************************
/******************************************************************************
* input.h: input thread interface
* (c)1999 VideoLAN
*******************************************************************************/
******************************************************************************/
/* needs : "netlist.h", "config.h", "mtime.h" */
/* ?? missing:
* tables version control */
/*******************************************************************************
/******************************************************************************
* External structures
*******************************************************************************
******************************************************************************
* These structures, required here only as pointers destinations, are declared
* in other headers.
*******************************************************************************/
******************************************************************************/
struct video_cfg_s; /* video configuration descriptor */
struct vout_thread_s; /* video output thread */
struct stream_descriptor_s; /* PSI tables */
/*******************************************************************************
/******************************************************************************
* Constants related to input
*******************************************************************************/
******************************************************************************/
#define TS_PACKET_SIZE 188 /* size of a TS packet */
#define PES_HEADER_SIZE 14 /* size of the first part of a PES header */
#define PSI_SECTION_SIZE 4096 /* Maximum size of a PSI section */
/*******************************************************************************
/******************************************************************************
* ts_packet_t
*******************************************************************************
******************************************************************************
* Describe a TS packet.
*******************************************************************************/
******************************************************************************/
typedef struct ts_packet_struct
{
/* Nothing before this line, the code relies on that */
......@@ -46,12 +46,12 @@ typedef struct ts_packet_struct
} ts_packet_t;
/*******************************************************************************
/******************************************************************************
* pes_packet_t
*******************************************************************************
******************************************************************************
* Describes an PES packet, with its properties, and pointers to the TS packets
* containing it.
*******************************************************************************/
******************************************************************************/
typedef struct
{
/* PES properties */
......@@ -83,12 +83,12 @@ typedef struct
} pes_packet_t;
/*******************************************************************************
/******************************************************************************
* 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
{
byte_t buffer[PSI_SECTION_SIZE];
......@@ -100,12 +100,12 @@ typedef struct
} psi_section_t;
/*******************************************************************************
/******************************************************************************
* es_descriptor_t: elementary stream descriptor
*******************************************************************************
******************************************************************************
* Describes an elementary stream, and includes fields required to handle and
* demultiplex this elementary stream.
*******************************************************************************/
******************************************************************************/
typedef struct
{
u16 i_id; /* stream ID, PID for TS streams */
......@@ -146,7 +146,7 @@ typedef struct
#ifdef STATS
/* Stats */
count_t c_bytes; /* total bytes read */
count_t c_payload_bytes; /* total of payload usefull bytes */
count_t c_payload_bytes;/* total of payload usefull bytes */
count_t c_packets; /* total packets read */
count_t c_invalid_packets; /* invalid packets read */
/* ?? ... other stats */
......@@ -164,15 +164,14 @@ typedef struct
#define MPEG2_VIDEO_ES 0x02
#define MPEG1_AUDIO_ES 0x03
#define MPEG2_AUDIO_ES 0x04
#define AC3_AUDIO_ES 0x05
/*******************************************************************************
/******************************************************************************
* program_descriptor_t
*******************************************************************************
******************************************************************************
* Describes a program and list associated elementary streams. It is build by
* the PSI decoder upon the informations carried in program map sections
*******************************************************************************/
******************************************************************************/
typedef struct
{
/* Program characteristics */
......@@ -200,11 +199,11 @@ typedef struct
#endif
} pgrm_descriptor_t;
/*******************************************************************************
/******************************************************************************
* pcr_descriptor_t
*******************************************************************************
******************************************************************************
* Contains informations used to synchronise the decoder with the server
*******************************************************************************/
******************************************************************************/
typedef struct pcr_descriptor_struct
{
......@@ -227,12 +226,12 @@ typedef struct pcr_descriptor_struct
#endif
} pcr_descriptor_t;
/*******************************************************************************
/******************************************************************************
* stream_descriptor_t
*******************************************************************************
******************************************************************************
* Describes a transport stream and list its associated programs. Build upon
* the informations carried in program association sections
*******************************************************************************/
******************************************************************************/
typedef struct
{
u16 i_stream_id; /* stream id */
......@@ -240,19 +239,25 @@ typedef struct
/* Program Association Table status */
u8 i_PAT_version; /* version number */
boolean_t b_is_PAT_complete; /* Is the PAT complete ?*/
u8 i_known_PAT_sections; /* Number of section we received so far */
byte_t a_known_PAT_sections[32]; /* Already received sections */
u8 i_known_PAT_sections;
/* Number of section we received so far */
byte_t a_known_PAT_sections[32];
/* Already received sections */
/* Program Map Table status */
boolean_t b_is_PMT_complete; /* Is the PMT complete ?*/
u8 i_known_PMT_sections; /* Number of section we received so far */
byte_t a_known_PMT_sections[32]; /* Already received sections */
u8 i_known_PMT_sections;
/* Number of section we received so far */
byte_t a_known_PMT_sections[32];
/* Already received sections */
/* Service Description Table status */
u8 i_SDT_version; /* version number */
boolean_t b_is_SDT_complete; /* Is the SDT complete ?*/
u8 i_known_SDT_sections; /* Number of section we received so far */
byte_t a_known_SDT_sections[32]; /* Already received sections */
u8 i_known_SDT_sections;
/* Number of section we received so far */
byte_t a_known_SDT_sections[32];
/* Already received sections */
/* Programs description */
int i_pgrm_number; /* Number of program number we have */
......@@ -264,9 +269,9 @@ typedef struct
#endif
} stream_descriptor_t;
/*******************************************************************************
/******************************************************************************
* input_netlist_t
*******************************************************************************/
******************************************************************************/
typedef struct
{
vlc_mutex_t lock; /* netlist modification lock */
......@@ -280,8 +285,8 @@ typedef struct
pes_packet_t * p_pes_packets;
/* pointer to the first PES packet we allocated */
/* To use the efficiency of the scatter/gather IO operations. We implemented it
* in 2 ways, as we don't know yet which one is better : as a FIFO (code
/* To use the efficiency of the scatter/gather IO operations. We implemented
* it in 2 ways, as we don't know yet which one is better : as a FIFO (code
* simplier) or as a LIFO stack (when we doesn't care of the ordering, this
* allow to drastically improve the cache performance) */
#ifdef INPUT_LIFO_TS_NETLIST
......@@ -296,14 +301,14 @@ typedef struct
#endif
} input_netlist_t;
/*******************************************************************************
/******************************************************************************
* input_thread_t
*******************************************************************************
******************************************************************************
* This structure includes all the local static variables of an input thread,
* including the netlist and the ES descriptors
* Note that p_es must be defined as a static table, otherwise we would have to
* update all reference to it each time the table would be reallocated
*******************************************************************************/
******************************************************************************/
/* function pointers */
struct input_thread_struct;
......@@ -363,15 +368,15 @@ typedef struct input_thread_struct
#define INPUT_METHOD_TS_BCAST 22 /* TS UDP broadcast */
#define INPUT_METHOD_TS_VLAN_BCAST 32 /* TS UDP broadcast with VLANs */
/*******************************************************************************
/******************************************************************************
* input_cfg_t: input thread configuration structure
*******************************************************************************
******************************************************************************
* This structure is passed as a parameter to input_CreateTtread(). It includes
* several fields describing potential properties of a new object.
* The 'i_properties' field allow to set only a subset of the required
* properties, asking the called function to use default settings for
* the other ones.
*******************************************************************************/
******************************************************************************/
typedef struct input_cfg_struct
{
u64 i_properties;
......@@ -397,9 +402,9 @@ typedef struct input_cfg_struct
#define INPUT_CFG_PORT (1 << 10)
#define INPUT_CFG_VLAN (1 << 11)
/******************************************************************************
/*****************************************************************************
* Prototypes
******************************************************************************/
*****************************************************************************/
input_thread_t *input_CreateThread ( input_cfg_t *p_cfg );
void input_DestroyThread ( input_thread_t *p_input );
......
......@@ -388,8 +388,8 @@ static void IdentifyPES( gdec_thread_t *p_gdec, pes_packet_t *p_pes, int i_strea
if( i_stream_id == 0xbd )
{
/* Dolby AC-3 stream - might be specific to DVD PS streams */
i_type = AC3_AUDIO_ES;
intf_DbgMsg("PES %p identified as AC3\n", p_pes);
i_type = MPEG2_AUDIO_ES;
intf_DbgMsg("PES %p identified as AUDIO AC3\n", p_pes);
}
else if( (i_stream_id & 0xe0) == 0xc0 )
{
......@@ -398,7 +398,7 @@ static void IdentifyPES( gdec_thread_t *p_gdec, pes_packet_t *p_pes, int i_strea
* an ISO/IEC 13818-3 is capable of decoding an ISO/IEC 11172-3 stream,
* the first one is used */
i_type = MPEG2_AUDIO_ES;
intf_DbgMsg("PES %p identified as AUDIO\n", p_pes);
intf_DbgMsg("PES %p identified as AUDIO MPEG\n", p_pes);
}
else if( (i_stream_id & 0xf0) == 0xe0 )
{
......
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