1 /*****************************************************************************
2 * input_ext-dec.h: structures exported to the VideoLAN decoders
3 *****************************************************************************
4 * Copyright (C) 1999-2001 VideoLAN
5 * $Id: input_ext-dec.h,v 1.83 2003/11/24 00:39:00 fenrir Exp $
7 * Authors: Christophe Massiot <massiot@via.ecp.fr>
8 * Michel Kaempf <maxx@via.ecp.fr>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
25 #ifndef _VLC_INPUT_EXT_DEC_H
26 #define _VLC_INPUT_EXT_DEC_H 1
28 /* Structures exported to the decoders */
30 /*****************************************************************************
32 *****************************************************************************
33 * Describe a data packet.
34 *****************************************************************************/
37 /* Used to chain the packets that carry data for a same PES or PSI */
38 data_packet_t * p_next;
40 /* start of the PS or TS packet */
41 byte_t * p_demux_start;
42 /* start of the PES payload in this packet */
43 byte_t * p_payload_start;
44 byte_t * p_payload_end; /* guess ? :-) */
45 /* is the packet messed up ? */
46 vlc_bool_t b_discard_payload;
48 /* pointer to the real data */
49 data_buffer_t * p_buffer;
52 /*****************************************************************************
54 *****************************************************************************
55 * Describes an PES packet, with its properties, and pointers to the TS packets
57 *****************************************************************************/
60 /* Chained list to the next PES packet (depending on the context) */
61 pes_packet_t * p_next;
64 vlc_bool_t b_data_alignment; /* used to find the beginning of
65 * a video or audio unit */
66 vlc_bool_t b_discontinuity; /* This packet doesn't follow the
69 mtime_t i_pts; /* PTS for this packet (zero if unset) */
70 mtime_t i_dts; /* DTS for this packet (zero if unset) */
71 int i_rate; /* current reading pace (see stream_control.h) */
73 unsigned int i_pes_size; /* size of the current PES packet */
75 /* Chained list to packets */
76 data_packet_t * p_first; /* The first packet contained by this
77 * PES (used by decoders). */
78 data_packet_t * p_last; /* The last packet contained by this
79 * PES (used by the buffer allocator) */
80 unsigned int i_nb_data; /* Number of data packets in the chained list */
83 /*****************************************************************************
84 * Prototypes from input_ext-dec.c
85 *****************************************************************************/
86 VLC_EXPORT( void, input_DeletePES, ( input_buffers_t *, pes_packet_t * ) );
88 #endif /* "input_ext-dec.h" */