comparison avienc.c @ 89:8e3cf4e9fc5a libavformat

rawvideo patch by (Fred Rothganger <rothgang at uiuc dot edu>)
author michaelni
date Sun, 16 Mar 2003 21:03:20 +0000
parents 25062c9b1f86
children 27d6df9208d4
comparison
equal deleted inserted replaced
88:70160a717f1b 89:8e3cf4e9fc5a
87 { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') }, 87 { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
88 { CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') }, 88 { CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },
89 { CODEC_ID_HUFFYUV, MKTAG('h', 'f', 'y', 'u') }, 89 { CODEC_ID_HUFFYUV, MKTAG('h', 'f', 'y', 'u') },
90 { CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') }, 90 { CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },
91 { CODEC_ID_CYUV, MKTAG('c', 'y', 'u', 'v') }, 91 { CODEC_ID_CYUV, MKTAG('c', 'y', 'u', 'v') },
92 { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },
92 { 0, 0 }, 93 { 0, 0 },
93 }; 94 };
94 95
95 unsigned int codec_get_tag(const CodecTag *tags, int id) 96 unsigned int codec_get_tag(const CodecTag *tags, int id)
96 { 97 {
247 list2 = start_tag(pb, "LIST"); 248 list2 = start_tag(pb, "LIST");
248 put_tag(pb, "strl"); 249 put_tag(pb, "strl");
249 250
250 stream = &s->streams[i]->codec; 251 stream = &s->streams[i]->codec;
251 252
253 /* FourCC should really be set by the codec itself */
254 if (! stream->codec_tag) {
255 stream->codec_tag = codec_get_bmp_tag(stream->codec_id);
256 }
257
252 /* stream generic header */ 258 /* stream generic header */
253 strh = start_tag(pb, "strh"); 259 strh = start_tag(pb, "strh");
254 switch(stream->codec_type) { 260 switch(stream->codec_type) {
255 case CODEC_TYPE_VIDEO: 261 case CODEC_TYPE_VIDEO:
256 put_tag(pb, "vids"); 262 put_tag(pb, "vids");
257 put_le32(pb, codec_get_bmp_tag(stream->codec_id)); 263 put_le32(pb, stream->codec_tag);
258 put_le32(pb, 0); /* flags */ 264 put_le32(pb, 0); /* flags */
259 put_le16(pb, 0); /* priority */ 265 put_le16(pb, 0); /* priority */
260 put_le16(pb, 0); /* language */ 266 put_le16(pb, 0); /* language */
261 put_le32(pb, 0); /* initial frame */ 267 put_le32(pb, 0); /* initial frame */
262 268