]> git.sesse.net Git - vlc/blob - include/input_ext-dec.h
* mp4: fixed width in tkhd. (at least I hope).
[vlc] / include / input_ext-dec.h
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 $
6  *
7  * Authors: Christophe Massiot <massiot@via.ecp.fr>
8  *          Michel Kaempf <maxx@via.ecp.fr>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24
25 #ifndef _VLC_INPUT_EXT_DEC_H
26 #define _VLC_INPUT_EXT_DEC_H 1
27
28 /* Structures exported to the decoders */
29
30 /*****************************************************************************
31  * data_packet_t
32  *****************************************************************************
33  * Describe a data packet.
34  *****************************************************************************/
35 struct data_packet_t
36 {
37     /* Used to chain the packets that carry data for a same PES or PSI */
38     data_packet_t *  p_next;
39
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;
47
48     /* pointer to the real data */
49     data_buffer_t *  p_buffer;
50 };
51
52 /*****************************************************************************
53  * pes_packet_t
54  *****************************************************************************
55  * Describes an PES packet, with its properties, and pointers to the TS packets
56  * containing it.
57  *****************************************************************************/
58 struct pes_packet_t
59 {
60     /* Chained list to the next PES packet (depending on the context) */
61     pes_packet_t *  p_next;
62
63     /* PES properties */
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
67                                                * previous one */
68
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) */
72
73     unsigned int    i_pes_size;            /* size of the current PES packet */
74
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 */
81 };
82
83 /*****************************************************************************
84  * Prototypes from input_ext-dec.c
85  *****************************************************************************/
86 VLC_EXPORT( void, input_DeletePES,         ( input_buffers_t *, pes_packet_t * ) );
87
88 #endif /* "input_ext-dec.h" */