qml: Create MediaGroupDisplay
[vlc.git] / modules / packetizer / dts_header.h
blob255f0be770e6a57dfcd325281ece273e75e091a0
1 /*****************************************************************************
2 * dts_header.c: parse DTS audio headers info
3 *****************************************************************************
4 * Copyright (C) 2004-2016 VLC authors and VideoLAN
6 * Authors: Gildas Bazin <gbazin@netcourrier.com>
7 * Laurent Aimar
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #define VLC_DTS_HEADER_SIZE 14
26 #define PROFILE_DTS_INVALID -1
27 #define PROFILE_DTS 0
28 #define PROFILE_DTS_HD 1
29 #define PROFILE_DTS_EXPRESS 2
31 enum vlc_dts_syncword_e
33 DTS_SYNC_NONE = 0,
34 DTS_SYNC_CORE_BE,
35 DTS_SYNC_CORE_LE,
36 DTS_SYNC_CORE_14BITS_BE,
37 DTS_SYNC_CORE_14BITS_LE,
38 DTS_SYNC_SUBSTREAM,
39 /* Substreams internal syncs */
40 DTS_SYNC_SUBSTREAM_LBR,
43 typedef struct
45 enum vlc_dts_syncword_e syncword;
46 unsigned int i_rate;
47 unsigned int i_bitrate;
48 unsigned int i_frame_size;
49 unsigned int i_frame_length;
50 uint32_t i_substream_header_size;
51 uint16_t i_physical_channels;
52 uint16_t i_chan_mode;
53 } vlc_dts_header_t;
55 int vlc_dts_header_Parse( vlc_dts_header_t *p_header,
56 const void *p_buffer, size_t i_buffer);
58 bool vlc_dts_header_IsSync( const void *p_buffer, size_t i_buffer );
60 ssize_t vlc_dts_header_Convert14b16b( void *p_dst, size_t i_dst,
61 const void *p_src, size_t i_src,
62 bool b_out_le );