1 /*
2 * MD STUDIO audio muxer
3 *
4 * Copyright (c) 2024 asivery
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
27
29 {
31 size_t title_length = 0;
33
38 }
39
43 }
44
45 /* Write magic */
47
48 /* Write AEA title */
50 if (title_entry) {
51 const char *title_contents = title_entry->
value;
52 title_length = strlen(title_contents);
53 if (title_length > 256) {
55 title_length = 256;
56 }
58 }
59
61
62 /* Write number of frames (zero at header-writing time, will seek later), number of channels */
66
67 /* Pad the header to 2048 bytes */
69
70 return 0;
71 }
72
74 {
79 /* Seek to rewrite the block count. */
82 if (total_blocks > UINT32_MAX) {
84 " Block count in the header will be truncated.\n", total_blocks);
85 total_blocks = UINT32_MAX;
86 }
88 } else {
90 }
91
92 return 0;
93 }
94
98 .p.extensions = "aea",
102
108 };