lavf: Drop deprecated AVFract type and related field
[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);
de6d9b64
FB
29 return 0;
30}
de6d9b64 31
900eb63d
DB
32/* Note: Do not forget to add new entries to the Makefile as well. */
33
b250f9c6 34#if CONFIG_AC3_MUXER
c6610a21 35AVOutputFormat ff_ac3_muxer = {
dfc2c4d9
AK
36 .name = "ac3",
37 .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
38 .mime_type = "audio/x-ac3",
39 .extensions = "ac3",
36ef5369
AK
40 .audio_codec = AV_CODEC_ID_AC3,
41 .video_codec = AV_CODEC_ID_NONE,
dfc2c4d9 42 .write_packet = ff_raw_write_packet,
20234a4b 43 .flags = AVFMT_NOTIMESTAMPS,
de6d9b64 44};
7402ee23 45#endif
17ac9f1c 46
779ef255
JR
47#if CONFIG_ADX_MUXER
48AVOutputFormat ff_adx_muxer = {
49 .name = "adx",
50 .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
51 .extensions = "adx",
36ef5369
AK
52 .audio_codec = AV_CODEC_ID_ADPCM_ADX,
53 .video_codec = AV_CODEC_ID_NONE,
779ef255
JR
54 .write_packet = ff_raw_write_packet,
55 .flags = AVFMT_NOTIMESTAMPS,
56};
57#endif
58
2ef15b46
DB
59#if CONFIG_CAVSVIDEO_MUXER
60AVOutputFormat ff_cavsvideo_muxer = {
61 .name = "cavsvideo",
0177b7d2 62 .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
2ef15b46 63 .extensions = "cavs",
36ef5369
AK
64 .audio_codec = AV_CODEC_ID_NONE,
65 .video_codec = AV_CODEC_ID_CAVS,
2ef15b46
DB
66 .write_packet = ff_raw_write_packet,
67 .flags = AVFMT_NOTIMESTAMPS,
68};
69#endif
70
b250f9c6 71#if CONFIG_DIRAC_MUXER
c6610a21 72AVOutputFormat ff_dirac_muxer = {
dfc2c4d9
AK
73 .name = "dirac",
74 .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
75 .extensions = "drc",
36ef5369
AK
76 .audio_codec = AV_CODEC_ID_NONE,
77 .video_codec = AV_CODEC_ID_DIRAC,
dfc2c4d9 78 .write_packet = ff_raw_write_packet,
20234a4b 79 .flags = AVFMT_NOTIMESTAMPS,
17ac9f1c
LB
80};
81#endif
82
b250f9c6 83#if CONFIG_DNXHD_MUXER
c6610a21 84AVOutputFormat ff_dnxhd_muxer = {
dfc2c4d9
AK
85 .name = "dnxhd",
86 .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
87 .extensions = "dnxhd",
36ef5369
AK
88 .audio_codec = AV_CODEC_ID_NONE,
89 .video_codec = AV_CODEC_ID_DNXHD,
dfc2c4d9 90 .write_packet = ff_raw_write_packet,
20234a4b 91 .flags = AVFMT_NOTIMESTAMPS,
bd09e8a7
BC
92};
93#endif
94
b250f9c6 95#if CONFIG_DTS_MUXER
c6610a21 96AVOutputFormat ff_dts_muxer = {
dfc2c4d9
AK
97 .name = "dts",
98 .long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
99 .mime_type = "audio/x-dca",
100 .extensions = "dts",
36ef5369
AK
101 .audio_codec = AV_CODEC_ID_DTS,
102 .video_codec = AV_CODEC_ID_NONE,
dfc2c4d9 103 .write_packet = ff_raw_write_packet,
20234a4b 104 .flags = AVFMT_NOTIMESTAMPS,
76d32428
DB
105};
106#endif
107
b250f9c6 108#if CONFIG_EAC3_MUXER
c6610a21 109AVOutputFormat ff_eac3_muxer = {
dfc2c4d9
AK
110 .name = "eac3",
111 .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
112 .mime_type = "audio/x-eac3",
113 .extensions = "eac3",
36ef5369
AK
114 .audio_codec = AV_CODEC_ID_EAC3,
115 .video_codec = AV_CODEC_ID_NONE,
dfc2c4d9 116 .write_packet = ff_raw_write_packet,
20234a4b 117 .flags = AVFMT_NOTIMESTAMPS,
2988c93d
JR
118};
119#endif
120
9013560f 121#if CONFIG_G722_MUXER
c6610a21 122AVOutputFormat ff_g722_muxer = {
dfc2c4d9
AK
123 .name = "g722",
124 .long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
125 .mime_type = "audio/G722",
126 .extensions = "g722",
36ef5369
AK
127 .audio_codec = AV_CODEC_ID_ADPCM_G722,
128 .video_codec = AV_CODEC_ID_NONE,
dfc2c4d9 129 .write_packet = ff_raw_write_packet,
20234a4b 130 .flags = AVFMT_NOTIMESTAMPS,
9013560f
MS
131};
132#endif
133
ca5f386e
MN
134#if CONFIG_G723_1_MUXER
135AVOutputFormat ff_g723_1_muxer = {
136 .name = "g723_1",
137 .long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"),
138 .mime_type = "audio/g723",
139 .extensions = "tco,rco",
140 .audio_codec = AV_CODEC_ID_G723_1,
141 .video_codec = AV_CODEC_ID_NONE,
142 .write_packet = ff_raw_write_packet,
143 .flags = AVFMT_NOTIMESTAMPS,
144};
145#endif
146
b250f9c6 147#if CONFIG_H261_MUXER
c6610a21 148AVOutputFormat ff_h261_muxer = {
dfc2c4d9
AK
149 .name = "h261",
150 .long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
151 .mime_type = "video/x-h261",
152 .extensions = "h261",
36ef5369
AK
153 .audio_codec = AV_CODEC_ID_NONE,
154 .video_codec = AV_CODEC_ID_H261,
dfc2c4d9 155 .write_packet = ff_raw_write_packet,
20234a4b 156 .flags = AVFMT_NOTIMESTAMPS,
1c3990db 157};
082f7acf 158#endif
1c3990db 159
b250f9c6 160#if CONFIG_H263_MUXER
c6610a21 161AVOutputFormat ff_h263_muxer = {
dfc2c4d9
AK
162 .name = "h263",
163 .long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
164 .mime_type = "video/x-h263",
165 .extensions = "h263",
36ef5369
AK
166 .audio_codec = AV_CODEC_ID_NONE,
167 .video_codec = AV_CODEC_ID_H263,
dfc2c4d9 168 .write_packet = ff_raw_write_packet,
20234a4b 169 .flags = AVFMT_NOTIMESTAMPS,
c9a65ca8 170};
082f7acf 171#endif
c9a65ca8 172
b250f9c6 173#if CONFIG_H264_MUXER
c6610a21 174AVOutputFormat ff_h264_muxer = {
dfc2c4d9 175 .name = "h264",
6774247a 176 .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
dfc2c4d9 177 .extensions = "h264",
36ef5369
AK
178 .audio_codec = AV_CODEC_ID_NONE,
179 .video_codec = AV_CODEC_ID_H264,
dfc2c4d9 180 .write_packet = ff_raw_write_packet,
20234a4b 181 .flags = AVFMT_NOTIMESTAMPS,
76d32428 182};
082f7acf 183#endif
76d32428 184
72255478
DB
185#if CONFIG_HEVC_MUXER
186AVOutputFormat ff_hevc_muxer = {
187 .name = "hevc",
188 .long_name = NULL_IF_CONFIG_SMALL("raw HEVC video"),
189 .extensions = "hevc",
190 .audio_codec = AV_CODEC_ID_NONE,
191 .video_codec = AV_CODEC_ID_HEVC,
192 .write_packet = ff_raw_write_packet,
193 .flags = AVFMT_NOTIMESTAMPS,
194};
195#endif
196
b250f9c6 197#if CONFIG_M4V_MUXER
c6610a21 198AVOutputFormat ff_m4v_muxer = {
dfc2c4d9 199 .name = "m4v",
6774247a 200 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
dfc2c4d9 201 .extensions = "m4v",
36ef5369
AK
202 .audio_codec = AV_CODEC_ID_NONE,
203 .video_codec = AV_CODEC_ID_MPEG4,
dfc2c4d9 204 .write_packet = ff_raw_write_packet,
20234a4b 205 .flags = AVFMT_NOTIMESTAMPS,
89b3d7c9 206};
082f7acf 207#endif
89b3d7c9 208
b250f9c6 209#if CONFIG_MJPEG_MUXER
c6610a21 210AVOutputFormat ff_mjpeg_muxer = {
dfc2c4d9
AK
211 .name = "mjpeg",
212 .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
213 .mime_type = "video/x-mjpeg",
214 .extensions = "mjpg,mjpeg",
36ef5369
AK
215 .audio_codec = AV_CODEC_ID_NONE,
216 .video_codec = AV_CODEC_ID_MJPEG,
dfc2c4d9 217 .write_packet = ff_raw_write_packet,
20234a4b 218 .flags = AVFMT_NOTIMESTAMPS,
0da71265 219};
082f7acf 220#endif
0da71265 221
0e1ccdeb 222#if CONFIG_MLP_MUXER
c6610a21 223AVOutputFormat ff_mlp_muxer = {
dfc2c4d9
AK
224 .name = "mlp",
225 .long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
226 .extensions = "mlp",
36ef5369
AK
227 .audio_codec = AV_CODEC_ID_MLP,
228 .video_codec = AV_CODEC_ID_NONE,
dfc2c4d9 229 .write_packet = ff_raw_write_packet,
e72d6fa0
DB
230 .flags = AVFMT_NOTIMESTAMPS,
231};
232#endif
233
234#if CONFIG_MP2_MUXER
235AVOutputFormat ff_mp2_muxer = {
236 .name = "mp2",
237 .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
238 .mime_type = "audio/mpeg",
239 .extensions = "mp2,m2a,mpa",
240 .audio_codec = AV_CODEC_ID_MP2,
241 .video_codec = AV_CODEC_ID_NONE,
242 .write_packet = ff_raw_write_packet,
20234a4b 243 .flags = AVFMT_NOTIMESTAMPS,
9145021d
RP
244};
245#endif
246
b250f9c6 247#if CONFIG_MPEG1VIDEO_MUXER
c6610a21 248AVOutputFormat ff_mpeg1video_muxer = {
dfc2c4d9
AK
249 .name = "mpeg1video",
250 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
2e093596 251 .mime_type = "video/mpeg",
dfc2c4d9 252 .extensions = "mpg,mpeg,m1v",
36ef5369
AK
253 .audio_codec = AV_CODEC_ID_NONE,
254 .video_codec = AV_CODEC_ID_MPEG1VIDEO,
dfc2c4d9 255 .write_packet = ff_raw_write_packet,
20234a4b 256 .flags = AVFMT_NOTIMESTAMPS,
de6d9b64 257};
082f7acf 258#endif
de6d9b64 259
b250f9c6 260#if CONFIG_MPEG2VIDEO_MUXER
c6610a21 261AVOutputFormat ff_mpeg2video_muxer = {
dfc2c4d9
AK
262 .name = "mpeg2video",
263 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
264 .extensions = "m2v",
36ef5369
AK
265 .audio_codec = AV_CODEC_ID_NONE,
266 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
dfc2c4d9 267 .write_packet = ff_raw_write_packet,
20234a4b 268 .flags = AVFMT_NOTIMESTAMPS,
6ec864da 269};
082f7acf 270#endif
6ec864da 271
b250f9c6 272#if CONFIG_RAWVIDEO_MUXER
c6610a21 273AVOutputFormat ff_rawvideo_muxer = {
dfc2c4d9 274 .name = "rawvideo",
6774247a 275 .long_name = NULL_IF_CONFIG_SMALL("raw video"),
dfc2c4d9 276 .extensions = "yuv,rgb",
36ef5369
AK
277 .audio_codec = AV_CODEC_ID_NONE,
278 .video_codec = AV_CODEC_ID_RAWVIDEO,
dfc2c4d9 279 .write_packet = ff_raw_write_packet,
20234a4b 280 .flags = AVFMT_NOTIMESTAMPS,
5ed8fafc 281};
082f7acf 282#endif
2ef15b46
DB
283
284#if CONFIG_SRT_MUXER
285AVOutputFormat ff_srt_muxer = {
286 .name = "srt",
6774247a 287 .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
2ef15b46
DB
288 .mime_type = "application/x-subrip",
289 .extensions = "srt",
290 .write_packet = ff_raw_write_packet,
291 .flags = AVFMT_NOTIMESTAMPS,
36ef5369 292 .subtitle_codec = AV_CODEC_ID_SRT,
2ef15b46
DB
293};
294#endif
295
296#if CONFIG_TRUEHD_MUXER
297AVOutputFormat ff_truehd_muxer = {
298 .name = "truehd",
299 .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
300 .extensions = "thd",
36ef5369
AK
301 .audio_codec = AV_CODEC_ID_TRUEHD,
302 .video_codec = AV_CODEC_ID_NONE,
2ef15b46
DB
303 .write_packet = ff_raw_write_packet,
304 .flags = AVFMT_NOTIMESTAMPS,
305};
306#endif