1 /*
2 * Sony OpenMG (OMA) muxer
3 *
4 * Copyright (c) 2011 Michael Karcher
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
29
31 {
33 int srate_index;
34 int isjointstereo;
35
36 par =
s->streams[0]->codecpar;
37 /* check for support of the format first */
38
39 for (srate_index = 0; ; srate_index++) {
44 }
45
47 break;
48 }
49
50 /* Metadata; OpenMG does not support ID3v2.4 */
52
57 ffio_fill(
s->pb, 0, 6 * 4);
/* Padding + DRM id */
58
64 }
68 isjointstereo = par->
extradata[8] == 0x12;
69 else {
72 }
74 (isjointstereo << 17) |
75 (srate_index << 13) |
77 break;
80 (srate_index << 13) |
83 break;
84 default:
88 }
90
91 return 0;
92 }
93
97 .mime_type = "audio/x-oma",
98 .extensions = "oma",
104 };