adx: add an adx muxer
[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 = {
dfc2c4d9
AK
37 .name = "ac3",
38 .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
39 .mime_type = "audio/x-ac3",
40 .extensions = "ac3",
41 .audio_codec = CODEC_ID_AC3,
42 .video_codec = CODEC_ID_NONE,
43 .write_packet = ff_raw_write_packet,
494bbf58 44 .flags= AVFMT_NOTIMESTAMPS,
de6d9b64 45};
7402ee23 46#endif
17ac9f1c 47
779ef255
JR
48#if CONFIG_ADX_MUXER
49AVOutputFormat ff_adx_muxer = {
50 .name = "adx",
51 .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
52 .extensions = "adx",
53 .audio_codec = CODEC_ID_ADPCM_ADX,
54 .video_codec = CODEC_ID_NONE,
55 .write_packet = ff_raw_write_packet,
56 .flags = AVFMT_NOTIMESTAMPS,
57};
58#endif
59
b250f9c6 60#if CONFIG_DIRAC_MUXER
c6610a21 61AVOutputFormat ff_dirac_muxer = {
dfc2c4d9
AK
62 .name = "dirac",
63 .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
64 .extensions = "drc",
65 .audio_codec = CODEC_ID_NONE,
66 .video_codec = CODEC_ID_DIRAC,
67 .write_packet = ff_raw_write_packet,
17ac9f1c
LB
68 .flags= AVFMT_NOTIMESTAMPS,
69};
70#endif
71
b250f9c6 72#if CONFIG_DNXHD_MUXER
c6610a21 73AVOutputFormat ff_dnxhd_muxer = {
dfc2c4d9
AK
74 .name = "dnxhd",
75 .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
76 .extensions = "dnxhd",
77 .audio_codec = CODEC_ID_NONE,
78 .video_codec = CODEC_ID_DNXHD,
79 .write_packet = ff_raw_write_packet,
bd09e8a7
BC
80 .flags= AVFMT_NOTIMESTAMPS,
81};
82#endif
83
b250f9c6 84#if CONFIG_DTS_MUXER
c6610a21 85AVOutputFormat ff_dts_muxer = {
dfc2c4d9
AK
86 .name = "dts",
87 .long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
88 .mime_type = "audio/x-dca",
89 .extensions = "dts",
90 .audio_codec = CODEC_ID_DTS,
91 .video_codec = CODEC_ID_NONE,
92 .write_packet = ff_raw_write_packet,
76d32428
DB
93 .flags= AVFMT_NOTIMESTAMPS,
94};
95#endif
96
b250f9c6 97#if CONFIG_EAC3_MUXER
c6610a21 98AVOutputFormat ff_eac3_muxer = {
dfc2c4d9
AK
99 .name = "eac3",
100 .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
101 .mime_type = "audio/x-eac3",
102 .extensions = "eac3",
103 .audio_codec = CODEC_ID_EAC3,
104 .video_codec = CODEC_ID_NONE,
105 .write_packet = 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 = {
dfc2c4d9
AK
112 .name = "g722",
113 .long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
114 .mime_type = "audio/G722",
115 .extensions = "g722",
116 .audio_codec = CODEC_ID_ADPCM_G722,
117 .video_codec = CODEC_ID_NONE,
118 .write_packet = ff_raw_write_packet,
9013560f
MS
119 .flags= AVFMT_NOTIMESTAMPS,
120};
121#endif
122
b250f9c6 123#if CONFIG_H261_MUXER
c6610a21 124AVOutputFormat ff_h261_muxer = {
dfc2c4d9
AK
125 .name = "h261",
126 .long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
127 .mime_type = "video/x-h261",
128 .extensions = "h261",
129 .audio_codec = CODEC_ID_NONE,
130 .video_codec = CODEC_ID_H261,
131 .write_packet = ff_raw_write_packet,
494bbf58 132 .flags= AVFMT_NOTIMESTAMPS,
1c3990db 133};
082f7acf 134#endif
1c3990db 135
b250f9c6 136#if CONFIG_H263_MUXER
c6610a21 137AVOutputFormat ff_h263_muxer = {
dfc2c4d9
AK
138 .name = "h263",
139 .long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
140 .mime_type = "video/x-h263",
141 .extensions = "h263",
142 .audio_codec = CODEC_ID_NONE,
143 .video_codec = CODEC_ID_H263,
144 .write_packet = ff_raw_write_packet,
494bbf58 145 .flags= AVFMT_NOTIMESTAMPS,
c9a65ca8 146};
082f7acf 147#endif
c9a65ca8 148
b250f9c6 149#if CONFIG_H264_MUXER
c6610a21 150AVOutputFormat ff_h264_muxer = {
dfc2c4d9
AK
151 .name = "h264",
152 .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video format"),
153 .extensions = "h264",
154 .audio_codec = CODEC_ID_NONE,
155 .video_codec = CODEC_ID_H264,
156 .write_packet = ff_raw_write_packet,
76d32428
DB
157 .flags= AVFMT_NOTIMESTAMPS,
158};
082f7acf 159#endif
76d32428 160
de295976 161#if CONFIG_CAVSVIDEO_MUXER
c6610a21 162AVOutputFormat ff_cavsvideo_muxer = {
dfc2c4d9
AK
163 .name = "cavsvideo",
164 .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS video"),
165 .extensions = "cavs",
166 .audio_codec = CODEC_ID_NONE,
167 .video_codec = CODEC_ID_CAVS,
168 .write_packet = ff_raw_write_packet,
de295976 169 .flags= AVFMT_NOTIMESTAMPS,
de295976
SG
170};
171#endif
172
b250f9c6 173#if CONFIG_M4V_MUXER
c6610a21 174AVOutputFormat ff_m4v_muxer = {
dfc2c4d9
AK
175 .name = "m4v",
176 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
177 .extensions = "m4v",
178 .audio_codec = CODEC_ID_NONE,
179 .video_codec = CODEC_ID_MPEG4,
180 .write_packet = ff_raw_write_packet,
494bbf58 181 .flags= AVFMT_NOTIMESTAMPS,
89b3d7c9 182};
082f7acf 183#endif
89b3d7c9 184
b250f9c6 185#if CONFIG_MJPEG_MUXER
c6610a21 186AVOutputFormat ff_mjpeg_muxer = {
dfc2c4d9
AK
187 .name = "mjpeg",
188 .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
189 .mime_type = "video/x-mjpeg",
190 .extensions = "mjpg,mjpeg",
191 .audio_codec = CODEC_ID_NONE,
192 .video_codec = CODEC_ID_MJPEG,
193 .write_packet = ff_raw_write_packet,
494bbf58 194 .flags= AVFMT_NOTIMESTAMPS,
0da71265 195};
082f7acf 196#endif
0da71265 197
0e1ccdeb 198#if CONFIG_MLP_MUXER
c6610a21 199AVOutputFormat ff_mlp_muxer = {
dfc2c4d9
AK
200 .name = "mlp",
201 .long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
202 .extensions = "mlp",
203 .audio_codec = CODEC_ID_MLP,
204 .video_codec = CODEC_ID_NONE,
205 .write_packet = ff_raw_write_packet,
9145021d
RP
206 .flags= AVFMT_NOTIMESTAMPS,
207};
208#endif
209
ba2c508d 210#if CONFIG_SRT_MUXER
c6610a21 211AVOutputFormat ff_srt_muxer = {
ba2c508d
AJ
212 .name = "srt",
213 .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle format"),
214 .mime_type = "application/x-subrip",
215 .extensions = "srt",
54a73bb5 216 .write_packet = ff_raw_write_packet,
ba2c508d
AJ
217 .flags = AVFMT_NOTIMESTAMPS,
218 .subtitle_codec = CODEC_ID_SRT,
219};
220#endif
221
23d9cc45 222#if CONFIG_TRUEHD_MUXER
c6610a21 223AVOutputFormat ff_truehd_muxer = {
dfc2c4d9
AK
224 .name = "truehd",
225 .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
226 .extensions = "thd",
227 .audio_codec = CODEC_ID_TRUEHD,
228 .video_codec = CODEC_ID_NONE,
229 .write_packet = ff_raw_write_packet,
23d9cc45
RP
230 .flags= AVFMT_NOTIMESTAMPS,
231};
232#endif
233
b250f9c6 234#if CONFIG_MPEG1VIDEO_MUXER
c6610a21 235AVOutputFormat ff_mpeg1video_muxer = {
dfc2c4d9
AK
236 .name = "mpeg1video",
237 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
238 .mime_type = "video/x-mpeg",
239 .extensions = "mpg,mpeg,m1v",
240 .audio_codec = CODEC_ID_NONE,
241 .video_codec = CODEC_ID_MPEG1VIDEO,
242 .write_packet = ff_raw_write_packet,
494bbf58 243 .flags= AVFMT_NOTIMESTAMPS,
de6d9b64 244};
082f7acf 245#endif
de6d9b64 246
b250f9c6 247#if CONFIG_MPEG2VIDEO_MUXER
c6610a21 248AVOutputFormat ff_mpeg2video_muxer = {
dfc2c4d9
AK
249 .name = "mpeg2video",
250 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
251 .extensions = "m2v",
252 .audio_codec = CODEC_ID_NONE,
253 .video_codec = CODEC_ID_MPEG2VIDEO,
254 .write_packet = ff_raw_write_packet,
494bbf58 255 .flags= AVFMT_NOTIMESTAMPS,
6ec864da 256};
082f7acf 257#endif
6ec864da 258
b250f9c6 259#if CONFIG_RAWVIDEO_MUXER
c6610a21 260AVOutputFormat ff_rawvideo_muxer = {
dfc2c4d9
AK
261 .name = "rawvideo",
262 .long_name = NULL_IF_CONFIG_SMALL("raw video format"),
263 .extensions = "yuv,rgb",
264 .audio_codec = CODEC_ID_NONE,
265 .video_codec = CODEC_ID_RAWVIDEO,
266 .write_packet = ff_raw_write_packet,
494bbf58 267 .flags= AVFMT_NOTIMESTAMPS,
5ed8fafc 268};
082f7acf 269#endif