File: util.hpp

package info (click to toggle)
vlc 2.2.7-1~deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 191,124 kB
  • sloc: ansic: 356,116; cpp: 94,295; objc: 34,063; sh: 6,765; makefile: 4,272; xml: 1,538; asm: 1,251; python: 240; perl: 77; sed: 16
file content (91 lines) | stat: -rw-r--r-- 2,827 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

/*****************************************************************************
 * mkv.cpp : matroska demuxer
 *****************************************************************************
 * Copyright (C) 2003-2004 VLC authors and VideoLAN
 * $Id: c181ad23be316f15470605833baf722f9fe6b83f $
 *
 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
 *          Steve Lhomme <steve.lhomme@free.fr>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#include "mkv.hpp"

#ifdef HAVE_ZLIB_H
int32_t zlib_decompress_extra( demux_t * p_demux, mkv_track_t * tk );
block_t *block_zlib_decompress( vlc_object_t *p_this, block_t *p_in_block );
#endif

block_t *MemToBlock( uint8_t *p_mem, size_t i_mem, size_t offset);
void handle_real_audio(demux_t * p_demux, mkv_track_t * p_tk, block_t * p_blk, mtime_t i_pts);


struct real_audio_private
{
    uint32_t fourcc;
    uint16_t version;
    uint16_t unknown1;
    uint8_t  unknown2[12];
    uint16_t unknown3;
    uint16_t flavor;
    uint32_t coded_frame_size;
    uint32_t unknown4[3];
    uint16_t sub_packet_h;
    uint16_t frame_size;
    uint16_t sub_packet_size;
    uint16_t unknown5;
};

struct real_audio_private_v4
{
    real_audio_private header;
    uint16_t sample_rate;
    uint16_t unknown;
    uint16_t sample_size;
    uint16_t channels;
};


struct real_audio_private_v5
{
    real_audio_private header;
    uint32_t unknown1;
    uint16_t unknown2;
    uint16_t sample_rate;
    uint16_t unknown3;
    uint16_t sample_size;
    uint16_t channels;
};

class Cook_PrivateTrackData : public PrivateTrackData
{
public:
    Cook_PrivateTrackData(uint16_t sph, uint16_t fs, uint16_t sps):
        i_sub_packet_h(sph), i_frame_size(fs), i_subpacket_size(sps),
        p_subpackets(NULL), i_subpackets(0), i_subpacket(0){}
    ~Cook_PrivateTrackData();
    int32_t Init();

    uint16_t i_sub_packet_h;
    uint16_t i_frame_size;
    uint16_t i_subpacket_size;
    block_t  **p_subpackets;
    size_t   i_subpackets;
    size_t   i_subpacket;
};

block_t * packetize_wavpack( mkv_track_t *, uint8_t *, size_t);