1 /* Communication plugin -> input */
3 #define INPUT_READ_ONCE 7 /* We live in a world dominated by Ethernet. *
4 * Ethernet MTU is 1500 bytes, so in a UDP *
5 * packet we can put : 1500/188 = 7 TS *
6 * packets. Have a nice day and merry Xmas. */
8 /*****************************************************************************
10 *****************************************************************************
11 * This structure gives pointers to the useful methods of the plugin
12 *****************************************************************************/
13 typedef struct input_capabilities_s
15 /* Plugin properties */
16 int i_weight; /* for a given stream type, the plugin *
17 * with higher weight will be used */
20 int (* pf_probe)( struct input_thread_s * );
21 void (* pf_init)( struct input_thread_s * );
22 void (* pf_end)( struct input_thread_s * );
24 /* Read & Demultiplex */
25 void (* pf_read)( struct input_thread_s *,
26 struct data_packet_s * pp_packets[INPUT_READ_ONCE] );
27 void (* pf_demux)( struct input_thread_s *,
28 struct data_packet_s * );
30 /* Packet management facilities */
31 struct data_packet_s *(* pf_new_packet)( void *, size_t );
32 struct pes_packet_s *(* pf_new_pes)( void * );
33 void (* pf_delete_packet)( void *,
34 struct data_packet_s * );
35 void (* pf_delete_pes)( void *, struct pes_packet_s * );
37 /* Stream control capabilities */
38 int (* pf_rewind)( struct input_thread_s * );
39 /* NULL if we don't support going *
40 * backwards (it's gonna be fun) */
41 int (* pf_seek)( struct input_thread_s *, off_t );
42 } input_capabilities_t;
44 /*****************************************************************************
45 * Prototypes from input_ext-dec.c
46 *****************************************************************************/
47 void InitBitstream ( struct bit_stream_s *, struct decoder_fifo_s * );
48 void NextDataPacket ( struct bit_stream_s * );
50 /*****************************************************************************
51 * Prototypes from input_programs.c
52 *****************************************************************************/
53 void input_InitStream( struct input_thread_s *, size_t );
54 struct pgrm_descriptor_s * input_AddProgram( struct input_thread_s *,
56 void input_DelProgram( struct input_thread_s *, u16 );
57 struct es_descriptor_s * input_AddES( struct input_thread_s *,
58 struct pgrm_descriptor_s *, u16,
60 void input_DelES( struct input_thread_s *, u16 );
61 int input_SelectES( struct input_thread_s *, struct es_descriptor_s * );