]> git.sesse.net Git - vlc/blob - modules/demux/mpeg4_iod.h
demux: ts: rewrite/split IOD parsing
[vlc] / modules / demux / mpeg4_iod.h
1 /*****************************************************************************
2  * mpeg4_iod.h: ISO 14496-1 IOD and parsers
3  *****************************************************************************
4  * Copyright (C) 2004-2015 VLC authors and VideoLAN
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19  *****************************************************************************/
20
21 #define ES_DESCRIPTOR_COUNT 255
22
23 typedef struct
24 {
25     uint8_t                 i_objectTypeIndication;
26     uint8_t                 i_streamType;
27
28     unsigned                i_extra;
29     uint8_t                 *p_extra;
30
31 } decoder_config_descriptor_t;
32
33 typedef struct
34 {
35     bool                    b_ok;
36     uint16_t                i_es_id;
37
38     char                    *psz_url;
39
40     decoder_config_descriptor_t    dec_descr;
41
42 } es_mpeg4_descriptor_t;
43
44 typedef struct
45 {
46     /* IOD */
47     char                    *psz_url;
48
49     es_mpeg4_descriptor_t   es_descr[ES_DESCRIPTOR_COUNT];
50
51 } iod_descriptor_t;
52
53 iod_descriptor_t *IODNew( vlc_object_t *p_object, unsigned i_data, const uint8_t *p_data );
54 void IODFree( iod_descriptor_t *p_iod );