wav: remove a use of deprecated AV_METADATA_ macro
[libav.git] / libavformat / rawenc.c
CommitLineData
115329f1 1/*
4ca31edc 2 * RAW muxers
406792e7 3 * Copyright (c) 2001 Fabrice Bellard
84c63c01 4 * Copyright (c) 2005 Alex Beregszaszi
de6d9b64 5 *
2912e87a 6 * This file is part of Libav.
b78e7197 7 *
2912e87a 8 * Libav is free software; you can redistribute it and/or
19720f15
FB
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
b78e7197 11 * version 2.1 of the License, or (at your option) any later version.
de6d9b64 12 *
2912e87a 13 * Libav is distributed in the hope that it will be useful,
de6d9b64 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19720f15
FB
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
de6d9b64 17 *
19720f15 18 * You should have received a copy of the GNU Lesser General Public
2912e87a 19 * License along with Libav; if not, write to the Free Software
5509bffa 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
de6d9b64 21 */
245976da 22
de6d9b64 23#include "avformat.h"
4ca31edc 24#include "rawenc.h"
de6d9b64 25
54a73bb5 26int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
de6d9b64 27{
77eb5504 28 avio_write(s->pb, pkt->data, pkt->size);
b7f2fdde 29 avio_flush(s->pb);
de6d9b64
FB
30 return 0;
31}
de6d9b64 32
900eb63d
DB
33/* Note: Do not forget to add new entries to the Makefile as well. */
34
b250f9c6 35#if CONFIG_AC3_MUXER
c6610a21 36AVOutputFormat ff_ac3_muxer = {
de6d9b64 37 "ac3",
bde15e74 38 NULL_IF_CONFIG_SMALL("raw AC-3"),
115329f1 39 "audio/x-ac3",
de6d9b64 40 "ac3",
c9a65ca8 41 0,
de6d9b64 42 CODEC_ID_AC3,
d9133126 43 CODEC_ID_NONE,
7a97dd84 44 NULL,
54a73bb5 45 ff_raw_write_packet,
494bbf58 46 .flags= AVFMT_NOTIMESTAMPS,
de6d9b64 47};
7402ee23 48#endif
17ac9f1c 49
b250f9c6 50#if CONFIG_DIRAC_MUXER
c6610a21 51AVOutputFormat ff_dirac_muxer = {
17ac9f1c 52 "dirac",
bde15e74 53 NULL_IF_CONFIG_SMALL("raw Dirac"),
17ac9f1c
LB
54 NULL,
55 "drc",
56 0,
d9133126 57 CODEC_ID_NONE,
17ac9f1c
LB
58 CODEC_ID_DIRAC,
59 NULL,
54a73bb5 60 ff_raw_write_packet,
17ac9f1c
LB
61 .flags= AVFMT_NOTIMESTAMPS,
62};
63#endif
64
b250f9c6 65#if CONFIG_DNXHD_MUXER
c6610a21 66AVOutputFormat ff_dnxhd_muxer = {
bd09e8a7
BC
67 "dnxhd",
68 NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
69 NULL,
70 "dnxhd",
71 0,
72 CODEC_ID_NONE,
73 CODEC_ID_DNXHD,
74 NULL,
54a73bb5 75 ff_raw_write_packet,
bd09e8a7
BC
76 .flags= AVFMT_NOTIMESTAMPS,
77};
78#endif
79
b250f9c6 80#if CONFIG_DTS_MUXER
c6610a21 81AVOutputFormat ff_dts_muxer = {
76d32428
DB
82 "dts",
83 NULL_IF_CONFIG_SMALL("raw DTS"),
84 "audio/x-dca",
85 "dts",
fda885c7 86 0,
76d32428
DB
87 CODEC_ID_DTS,
88 CODEC_ID_NONE,
fda885c7 89 NULL,
54a73bb5 90 ff_raw_write_packet,
76d32428
DB
91 .flags= AVFMT_NOTIMESTAMPS,
92};
93#endif
94
b250f9c6 95#if CONFIG_EAC3_MUXER
c6610a21 96AVOutputFormat ff_eac3_muxer = {
2988c93d
JR
97 "eac3",
98 NULL_IF_CONFIG_SMALL("raw E-AC-3"),
99 "audio/x-eac3",
100 "eac3",
101 0,
102 CODEC_ID_EAC3,
103 CODEC_ID_NONE,
104 NULL,
54a73bb5 105 ff_raw_write_packet,
2988c93d
JR
106 .flags= AVFMT_NOTIMESTAMPS,
107};
108#endif
109
9013560f 110#if CONFIG_G722_MUXER
c6610a21 111AVOutputFormat ff_g722_muxer = {
9013560f
MS
112 "g722",
113 NULL_IF_CONFIG_SMALL("raw G.722"),
114 "audio/G722",
115 "g722",
116 0,
117 CODEC_ID_ADPCM_G722,
118 CODEC_ID_NONE,
119 NULL,
120 ff_raw_write_packet,
121 .flags= AVFMT_NOTIMESTAMPS,
122};
123#endif
124
b250f9c6 125#if CONFIG_H261_MUXER
c6610a21 126AVOutputFormat ff_h261_muxer = {
1c3990db 127 "h261",
bde15e74 128 NULL_IF_CONFIG_SMALL("raw H.261"),
1c3990db
MN
129 "video/x-h261",
130 "h261",
131 0,
d9133126 132 CODEC_ID_NONE,
1c3990db 133 CODEC_ID_H261,
7a97dd84 134 NULL,
54a73bb5 135 ff_raw_write_packet,
494bbf58 136 .flags= AVFMT_NOTIMESTAMPS,
1c3990db 137};
082f7acf 138#endif
1c3990db 139
b250f9c6 140#if CONFIG_H263_MUXER
c6610a21 141AVOutputFormat ff_h263_muxer = {
de6d9b64 142 "h263",
bde15e74 143 NULL_IF_CONFIG_SMALL("raw H.263"),
de6d9b64
FB
144 "video/x-h263",
145 "h263",
146 0,
d9133126 147 CODEC_ID_NONE,
de6d9b64 148 CODEC_ID_H263,
7a97dd84 149 NULL,
54a73bb5 150 ff_raw_write_packet,
494bbf58 151 .flags= AVFMT_NOTIMESTAMPS,
c9a65ca8 152};
082f7acf 153#endif
c9a65ca8 154
b250f9c6 155#if CONFIG_H264_MUXER
c6610a21 156AVOutputFormat ff_h264_muxer = {
76d32428
DB
157 "h264",
158 NULL_IF_CONFIG_SMALL("raw H.264 video format"),
159 NULL,
160 "h264",
161 0,
162 CODEC_ID_NONE,
163 CODEC_ID_H264,
164 NULL,
54a73bb5 165 ff_raw_write_packet,
76d32428
DB
166 .flags= AVFMT_NOTIMESTAMPS,
167};
082f7acf 168#endif
76d32428 169
de295976 170#if CONFIG_CAVSVIDEO_MUXER
c6610a21 171AVOutputFormat ff_cavsvideo_muxer = {
de295976
SG
172 "cavsvideo",
173 NULL_IF_CONFIG_SMALL("raw Chinese AVS video"),
174 NULL,
175 "cavs",
176 0,
177 CODEC_ID_NONE,
178 CODEC_ID_CAVS,
179 NULL,
54a73bb5 180 ff_raw_write_packet,
de295976 181 .flags= AVFMT_NOTIMESTAMPS,
de295976
SG
182};
183#endif
184
b250f9c6 185#if CONFIG_M4V_MUXER
c6610a21 186AVOutputFormat ff_m4v_muxer = {
89b3d7c9 187 "m4v",
bde15e74 188 NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
89b3d7c9
MK
189 NULL,
190 "m4v",
191 0,
192 CODEC_ID_NONE,
193 CODEC_ID_MPEG4,
7a97dd84 194 NULL,
54a73bb5 195 ff_raw_write_packet,
494bbf58 196 .flags= AVFMT_NOTIMESTAMPS,
89b3d7c9 197};
082f7acf 198#endif
89b3d7c9 199
b250f9c6 200#if CONFIG_MJPEG_MUXER
c6610a21 201AVOutputFormat ff_mjpeg_muxer = {
76d32428 202 "mjpeg",
b4ee1d39 203 NULL_IF_CONFIG_SMALL("raw MJPEG video"),
76d32428
DB
204 "video/x-mjpeg",
205 "mjpg,mjpeg",
0da71265
MN
206 0,
207 CODEC_ID_NONE,
76d32428 208 CODEC_ID_MJPEG,
7a97dd84 209 NULL,
54a73bb5 210 ff_raw_write_packet,
494bbf58 211 .flags= AVFMT_NOTIMESTAMPS,
0da71265 212};
082f7acf 213#endif
0da71265 214
0e1ccdeb 215#if CONFIG_MLP_MUXER
c6610a21 216AVOutputFormat ff_mlp_muxer = {
9145021d
RP
217 "mlp",
218 NULL_IF_CONFIG_SMALL("raw MLP"),
219 NULL,
220 "mlp",
221 0,
222 CODEC_ID_MLP,
223 CODEC_ID_NONE,
224 NULL,
54a73bb5 225 ff_raw_write_packet,
9145021d
RP
226 .flags= AVFMT_NOTIMESTAMPS,
227};
228#endif
229
ba2c508d 230#if CONFIG_SRT_MUXER
c6610a21 231AVOutputFormat ff_srt_muxer = {
ba2c508d
AJ
232 .name = "srt",
233 .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle format"),
234 .mime_type = "application/x-subrip",
235 .extensions = "srt",
54a73bb5 236 .write_packet = ff_raw_write_packet,
ba2c508d
AJ
237 .flags = AVFMT_NOTIMESTAMPS,
238 .subtitle_codec = CODEC_ID_SRT,
239};
240#endif
241
23d9cc45 242#if CONFIG_TRUEHD_MUXER
c6610a21 243AVOutputFormat ff_truehd_muxer = {
23d9cc45
RP
244 "truehd",
245 NULL_IF_CONFIG_SMALL("raw TrueHD"),
246 NULL,
247 "thd",
248 0,
249 CODEC_ID_TRUEHD,
250 CODEC_ID_NONE,
251 NULL,
54a73bb5 252 ff_raw_write_packet,
23d9cc45
RP
253 .flags= AVFMT_NOTIMESTAMPS,
254};
255#endif
256
b250f9c6 257#if CONFIG_MPEG1VIDEO_MUXER
c6610a21 258AVOutputFormat ff_mpeg1video_muxer = {
c9a65ca8 259 "mpeg1video",
b4ee1d39 260 NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
de6d9b64 261 "video/x-mpeg",
e0827ba4 262 "mpg,mpeg,m1v",
de6d9b64 263 0,
d9133126 264 CODEC_ID_NONE,
de6d9b64 265 CODEC_ID_MPEG1VIDEO,
7a97dd84 266 NULL,
54a73bb5 267 ff_raw_write_packet,
494bbf58 268 .flags= AVFMT_NOTIMESTAMPS,
de6d9b64 269};
082f7acf 270#endif
de6d9b64 271
b250f9c6 272#if CONFIG_MPEG2VIDEO_MUXER
c6610a21 273AVOutputFormat ff_mpeg2video_muxer = {
6ec864da 274 "mpeg2video",
b4ee1d39 275 NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
6ec864da
MN
276 NULL,
277 "m2v",
278 0,
d9133126 279 CODEC_ID_NONE,
6ec864da 280 CODEC_ID_MPEG2VIDEO,
7a97dd84 281 NULL,
54a73bb5 282 ff_raw_write_packet,
494bbf58 283 .flags= AVFMT_NOTIMESTAMPS,
6ec864da 284};
082f7acf 285#endif
6ec864da 286
b250f9c6 287#if CONFIG_RAWVIDEO_MUXER
c6610a21 288AVOutputFormat ff_rawvideo_muxer = {
76d32428
DB
289 "rawvideo",
290 NULL_IF_CONFIG_SMALL("raw video format"),
291 NULL,
292 "yuv,rgb",
5ed8fafc 293 0,
d9133126 294 CODEC_ID_NONE,
76d32428 295 CODEC_ID_RAWVIDEO,
7a97dd84 296 NULL,
54a73bb5 297 ff_raw_write_packet,
494bbf58 298 .flags= AVFMT_NOTIMESTAMPS,
5ed8fafc 299};
082f7acf 300#endif