1 /*
2 * Sony OpenMG (OMA) muxer
3 *
4 * Copyright (c) 2011 Michael Karcher
5 *
6 * This file is part of Libav.
7 *
8 * Libav 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 * Libav 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 Libav; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
29
31 {
32 int i;
34 int srate_index;
35 int isjointstereo;
36
38 /* check for support of the format first */
39
40 for (srate_index = 0; ; srate_index++) {
45 }
46
48 break;
49 }
50
51 /* Metadata; OpenMG does not support ID3v2.4 */
53
58 for (i = 0; i < 6; i++)
60
66 }
68 isjointstereo = format->
extradata[6] != 0;
70 isjointstereo = format->
extradata[8] == 0x12;
71 else {
74 }
76 (isjointstereo << 17) |
77 (srate_index << 13) |
79 break;
82 (srate_index << 13) |
85 break;
86 default:
90 }
93
94 return 0;
95 }
96
100 .mime_type = "audio/x-oma",
101 .extensions = "oma",
106 };