1 /*******************************************************************************
2 * video_parser.h : video parser thread
4 *******************************************************************************
5 *******************************************************************************
16 *******************************************************************************/
18 /*******************************************************************************
19 * sequence_t : sequence descriptor
20 *******************************************************************************
22 *******************************************************************************/
23 typedef struct sequence_s
25 u32 i_height, i_width;
26 unsigned int i_aspect_ratio;
30 /*******************************************************************************
31 * vpar_thread_t: video parser thread descriptor
32 *******************************************************************************
34 *******************************************************************************/
35 typedef struct vpar_thread_s
37 /* Thread properties and locks */
38 boolean_t b_die; /* `die' flag */
39 boolean_t b_run; /* `run' flag */
40 boolean_t b_error; /* `error' flag */
41 boolean_t b_active; /* `active' flag */
42 vlc_thread_t thread_id; /* id for thread functions */
44 /* Thread configuration */
50 /* Input properties */
51 decoder_fifo_t fifo; /* PES input fifo */
53 /* The bit stream structure handles the PES stream at the bit level */
54 bit_stream_t bit_stream;
56 /* Output properties */
57 vout_thread_t * p_vout; /* video output thread */
58 int i_stream; /* video stream id */
60 /* Decoder properties */
61 struct vdec_thread_s * p_vdec[MAX_VDEC];
63 video_buffer_t vbuffer;
65 /* Parser properties */
70 count_t c_loops; /* number of loops */
71 count_t c_idle_loops; /* number of idle loops */
72 count_t c_sequences; /* number of sequences */
73 count_t c_pictures; /* number of pictures read */
74 count_t c_i_pictures; /* number of I pictures read */
75 count_t c_p_pictures; /* number of P pictures read */
76 count_t c_b_pictures; /* number of B pictures read */
77 count_t c_decoded_pictures; /* number of pictures decoded */
78 count_t c_decoded_i_pictures; /* number of I pictures decoded */
79 count_t c_decoded_p_pictures; /* number of P pictures decoded */
80 count_t c_decoded_b_pictures; /* number of B pictures decoded */
84 /*******************************************************************************
85 * Standard start codes
86 *******************************************************************************/
87 #define PICTURE_START_CODE 0x100
88 #define SLICE_START_CODE_MIN 0x101
89 #define SLICE_START_CODE_MAX 0x1AF
90 #define USER_DATA_START_CODE 0x1B2
91 #define SEQUENCE_HEADER_CODE 0x1B3
92 #define SEQUENCE_ERROR_CODE 0x1B4
93 #define EXTENSION_START_CODE 0x1B5
94 #define SEQUENCE_END_CODE 0x1B7
95 #define GROUP_START_CODE 0x1B8
97 /*******************************************************************************
99 *******************************************************************************/
101 /* Thread management functions */
102 vpar_thread_t * vpar_CreateThread ( /* video_cfg_t *p_cfg, */ input_thread_t *p_input /*,
103 vout_thread_t *p_vout, int *pi_status */ );
104 void vpar_DestroyThread ( vpar_thread_t *p_vpar /*, int *pi_status */ );
106 /* Time management functions */
109 /* Dynamic thread settings */