1 /*****************************************************************************
2 * generic_decoder.h : generic decoder thread
4 *****************************************************************************
13 *****************************************************************************/
15 /*****************************************************************************
16 * gdec_cfg_t: generic decoder configuration structure
17 *****************************************************************************
18 * This structure is passed as an initializer when a generic decoder thread is
20 *****************************************************************************/
21 typedef struct gdec_cfg_s
25 int i_actions; /* decoder actions */
26 char * psz_base_filename; /* base demux file name */
29 /* Properties flags */
30 #define GDEC_CFG_ACTIONS (1 << 0)
31 #define GDEC_CFG_FILENAME (1 << 1)
33 /*****************************************************************************
34 * gdec_thread_t: generic decoder thread descriptor
35 *****************************************************************************
36 * This type describes a generic decoder thread.
37 *****************************************************************************/
38 typedef struct gdec_thread_s
40 /* Thread properties and locks */
41 boolean_t b_die; /* `die' flag */
42 boolean_t b_error; /* `error' flag */
43 boolean_t b_active; /* `active' flag */
44 vlc_thread_t thread_id; /* id for thread functions */
46 /* Thread configuration */
47 int i_actions; /* decoder actions */
49 /* Input properties */
50 input_thread_t * p_input; /* input thread */
51 decoder_fifo_t fifo; /* PES input fifo */
57 /* Files array - these files are used to extract ES streams from a
58 * demultiplexed stream */
63 count_t c_loops; /* number of loops */
64 count_t c_idle_loops; /* number of idle loops */
65 count_t c_pes; /* number of PES packets read */
69 /* Decoder actions - this flags select which actions the decoder will perform
70 * when it receives a PES packet */
71 #define GDEC_IDENTIFY (1 << 0) /* update input's ES tables */
72 #define GDEC_SAVE (1 << 1) /* save all PES to a same file */
73 #define GDEC_SAVE_DEMUX (1 << 2) /* save PES to files by stream id */
74 #define GDEC_PRINT (1 << 3) /* print PES informations */
76 /*****************************************************************************
78 *****************************************************************************/
80 /* Thread management functions */
81 gdec_thread_t * gdec_CreateThread ( gdec_cfg_t *p_cfg,
82 input_thread_t *p_input, int *pi_status );
83 void gdec_DestroyThread ( gdec_thread_t *p_gdec, int *pi_status );
85 /* Time management functions */
88 /* Dynamic thread settings */