2 * D-Cinema audio decoder.
3 * Copyright (c) 2005 Reimar Döffinger.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
22 AVStream *st = av_new_stream(s, 0);
23 st->codec->codec_type = CODEC_TYPE_AUDIO;
24 st->codec->codec_id = CODEC_ID_PCM_S24DAUD;
25 st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
26 st->codec->channels = 6;
27 st->codec->sample_rate = 96000;
28 st->codec->bit_rate = 3 * 6 * 96000 * 8;
29 st->codec->block_align = 3 * 6;
30 st->codec->bits_per_sample = 24;
34 static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
35 ByteIOContext *pb = &s->pb;
40 get_be16(pb); // unknown
41 ret = av_get_packet(pb, pkt, size);
42 pkt->stream_index = 0;
46 static AVInputFormat daud_demuxer = {
48 "D-Cinema audio format",
60 av_register_input_format(&daud_demuxer);