1 /*
2 * RSO muxer
3 * Copyright (c) 2001 Fabrice Bellard (original AU code)
4 * Copyright (c) 2010 Rafael Carre
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 {
32
35
39 }
40
44 }
45
46 /* XXX: find legal sample rates (if any) */
50 }
51
55 }
56
57 /* format header */
59 avio_wb16(pb, 0);
/* data size, will be written at EOF */
61 avio_wb16(pb, 0x0000);
/* play mode ? (0x0000 = don't loop) */
62
64
65 return 0;
66 }
67
69 {
71 return 0;
72 }
73
75 {
77 int64_t file_size;
78 uint16_t coded_file_size;
79
81
82 if (file_size < 0)
83 return file_size;
84
87 "Output file is too big (%"PRId64" bytes >= 64kB)\n", file_size);
88 coded_file_size = 0xffff;
89 } else {
91 }
92
93 /* update file size */
97
98 return 0;
99 }
100
104 .extensions = "rso",
112 };