FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rawenc.c
Go to the documentation of this file.
1 /*
2  * RAW muxers
3  * Copyright (c) 2001 Fabrice Bellard
4  * Copyright (c) 2005 Alex Beregszaszi
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 
23 #include "avformat.h"
24 #include "rawenc.h"
25 
27 {
28  avio_write(s->pb, pkt->data, pkt->size);
29  avio_flush(s->pb);
30  return 0;
31 }
32 
33 /* Note: Do not forget to add new entries to the Makefile as well. */
34 
35 #if CONFIG_AC3_MUXER
36 AVOutputFormat ff_ac3_muxer = {
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 = AV_CODEC_ID_AC3,
42  .video_codec = AV_CODEC_ID_NONE,
43  .write_packet = ff_raw_write_packet,
44  .flags = AVFMT_NOTIMESTAMPS,
45 };
46 #endif
47 
48 #if CONFIG_ADX_MUXER
49 AVOutputFormat ff_adx_muxer = {
50  .name = "adx",
51  .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
52  .extensions = "adx",
53  .audio_codec = AV_CODEC_ID_ADPCM_ADX,
54  .video_codec = AV_CODEC_ID_NONE,
55  .write_packet = ff_raw_write_packet,
56  .flags = AVFMT_NOTIMESTAMPS,
57 };
58 #endif
59 
60 #if CONFIG_CAVSVIDEO_MUXER
61 AVOutputFormat ff_cavsvideo_muxer = {
62  .name = "cavsvideo",
63  .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
64  .extensions = "cavs",
65  .audio_codec = AV_CODEC_ID_NONE,
66  .video_codec = AV_CODEC_ID_CAVS,
67  .write_packet = ff_raw_write_packet,
68  .flags = AVFMT_NOTIMESTAMPS,
69 };
70 #endif
71 
72 #if CONFIG_DIRAC_MUXER
73 AVOutputFormat ff_dirac_muxer = {
74  .name = "dirac",
75  .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
76  .extensions = "drc",
77  .audio_codec = AV_CODEC_ID_NONE,
78  .video_codec = AV_CODEC_ID_DIRAC,
79  .write_packet = ff_raw_write_packet,
80  .flags = AVFMT_NOTIMESTAMPS,
81 };
82 #endif
83 
84 #if CONFIG_DNXHD_MUXER
85 AVOutputFormat ff_dnxhd_muxer = {
86  .name = "dnxhd",
87  .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
88  .extensions = "dnxhd",
89  .audio_codec = AV_CODEC_ID_NONE,
90  .video_codec = AV_CODEC_ID_DNXHD,
91  .write_packet = ff_raw_write_packet,
92  .flags = AVFMT_NOTIMESTAMPS,
93 };
94 #endif
95 
96 #if CONFIG_DTS_MUXER
97 AVOutputFormat ff_dts_muxer = {
98  .name = "dts",
99  .long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
100  .mime_type = "audio/x-dca",
101  .extensions = "dts",
102  .audio_codec = AV_CODEC_ID_DTS,
103  .video_codec = AV_CODEC_ID_NONE,
104  .write_packet = ff_raw_write_packet,
105  .flags = AVFMT_NOTIMESTAMPS,
106 };
107 #endif
108 
109 #if CONFIG_EAC3_MUXER
110 AVOutputFormat ff_eac3_muxer = {
111  .name = "eac3",
112  .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
113  .mime_type = "audio/x-eac3",
114  .extensions = "eac3",
115  .audio_codec = AV_CODEC_ID_EAC3,
116  .video_codec = AV_CODEC_ID_NONE,
117  .write_packet = ff_raw_write_packet,
118  .flags = AVFMT_NOTIMESTAMPS,
119 };
120 #endif
121 
122 #if CONFIG_G722_MUXER
123 AVOutputFormat ff_g722_muxer = {
124  .name = "g722",
125  .long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
126  .mime_type = "audio/G722",
127  .extensions = "g722",
128  .audio_codec = AV_CODEC_ID_ADPCM_G722,
129  .video_codec = AV_CODEC_ID_NONE,
130  .write_packet = ff_raw_write_packet,
131  .flags = AVFMT_NOTIMESTAMPS,
132 };
133 #endif
134 
135 #if CONFIG_G723_1_MUXER
136 AVOutputFormat ff_g723_1_muxer = {
137  .name = "g723_1",
138  .long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"),
139  .mime_type = "audio/g723",
140  .extensions = "tco,rco",
141  .audio_codec = AV_CODEC_ID_G723_1,
142  .video_codec = AV_CODEC_ID_NONE,
143  .write_packet = ff_raw_write_packet,
144  .flags = AVFMT_NOTIMESTAMPS,
145 };
146 #endif
147 
148 #if CONFIG_H261_MUXER
149 AVOutputFormat ff_h261_muxer = {
150  .name = "h261",
151  .long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
152  .mime_type = "video/x-h261",
153  .extensions = "h261",
154  .audio_codec = AV_CODEC_ID_NONE,
155  .video_codec = AV_CODEC_ID_H261,
156  .write_packet = ff_raw_write_packet,
157  .flags = AVFMT_NOTIMESTAMPS,
158 };
159 #endif
160 
161 #if CONFIG_H263_MUXER
162 AVOutputFormat ff_h263_muxer = {
163  .name = "h263",
164  .long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
165  .mime_type = "video/x-h263",
166  .extensions = "h263",
167  .audio_codec = AV_CODEC_ID_NONE,
168  .video_codec = AV_CODEC_ID_H263,
169  .write_packet = ff_raw_write_packet,
170  .flags = AVFMT_NOTIMESTAMPS,
171 };
172 #endif
173 
174 #if CONFIG_H264_MUXER
175 AVOutputFormat ff_h264_muxer = {
176  .name = "h264",
177  .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
178  .extensions = "h264",
179  .audio_codec = AV_CODEC_ID_NONE,
180  .video_codec = AV_CODEC_ID_H264,
181  .write_packet = ff_raw_write_packet,
182  .flags = AVFMT_NOTIMESTAMPS,
183 };
184 #endif
185 
186 #if CONFIG_M4V_MUXER
187 AVOutputFormat ff_m4v_muxer = {
188  .name = "m4v",
189  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
190  .extensions = "m4v",
191  .audio_codec = AV_CODEC_ID_NONE,
192  .video_codec = AV_CODEC_ID_MPEG4,
193  .write_packet = ff_raw_write_packet,
194  .flags = AVFMT_NOTIMESTAMPS,
195 };
196 #endif
197 
198 #if CONFIG_MJPEG_MUXER
199 AVOutputFormat ff_mjpeg_muxer = {
200  .name = "mjpeg",
201  .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
202  .mime_type = "video/x-mjpeg",
203  .extensions = "mjpg,mjpeg",
204  .audio_codec = AV_CODEC_ID_NONE,
205  .video_codec = AV_CODEC_ID_MJPEG,
206  .write_packet = ff_raw_write_packet,
207  .flags = AVFMT_NOTIMESTAMPS,
208 };
209 #endif
210 
211 #if CONFIG_MLP_MUXER
212 AVOutputFormat ff_mlp_muxer = {
213  .name = "mlp",
214  .long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
215  .extensions = "mlp",
216  .audio_codec = AV_CODEC_ID_MLP,
217  .video_codec = AV_CODEC_ID_NONE,
218  .write_packet = ff_raw_write_packet,
219  .flags = AVFMT_NOTIMESTAMPS,
220 };
221 #endif
222 
223 #if CONFIG_MPEG1VIDEO_MUXER
224 AVOutputFormat ff_mpeg1video_muxer = {
225  .name = "mpeg1video",
226  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
227  .mime_type = "video/x-mpeg",
228  .extensions = "mpg,mpeg,m1v",
229  .audio_codec = AV_CODEC_ID_NONE,
230  .video_codec = AV_CODEC_ID_MPEG1VIDEO,
231  .write_packet = ff_raw_write_packet,
232  .flags = AVFMT_NOTIMESTAMPS,
233 };
234 #endif
235 
236 #if CONFIG_MPEG2VIDEO_MUXER
237 AVOutputFormat ff_mpeg2video_muxer = {
238  .name = "mpeg2video",
239  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
240  .extensions = "m2v",
241  .audio_codec = AV_CODEC_ID_NONE,
242  .video_codec = AV_CODEC_ID_MPEG2VIDEO,
243  .write_packet = ff_raw_write_packet,
244  .flags = AVFMT_NOTIMESTAMPS,
245 };
246 #endif
247 
248 #if CONFIG_RAWVIDEO_MUXER
249 AVOutputFormat ff_rawvideo_muxer = {
250  .name = "rawvideo",
251  .long_name = NULL_IF_CONFIG_SMALL("raw video"),
252  .extensions = "yuv,rgb",
253  .audio_codec = AV_CODEC_ID_NONE,
254  .video_codec = AV_CODEC_ID_RAWVIDEO,
255  .write_packet = ff_raw_write_packet,
256  .flags = AVFMT_NOTIMESTAMPS,
257 };
258 #endif
259 
260 #if CONFIG_TRUEHD_MUXER
261 AVOutputFormat ff_truehd_muxer = {
262  .name = "truehd",
263  .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
264  .extensions = "thd",
265  .audio_codec = AV_CODEC_ID_TRUEHD,
266  .video_codec = AV_CODEC_ID_NONE,
267  .write_packet = ff_raw_write_packet,
268  .flags = AVFMT_NOTIMESTAMPS,
269 };
270 #endif