Mercurial > libavformat.hg
changeset 6038:d0ea87d82842 libavformat
Define ff_nut_video_tags and make Nut muxer and demuxer set it in
codec_tag.
author | stefano |
---|---|
date | Sun, 23 May 2010 18:34:15 +0000 |
parents | ea60b0454e78 |
children | eeb6e3c4c32b |
files | nut.c nut.h nutdec.c nutenc.c |
diffstat | 4 files changed, 36 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/nut.c Sun May 23 13:07:33 2010 +0000 +++ b/nut.c Sun May 23 18:34:15 2010 +0000 @@ -31,6 +31,39 @@ { CODEC_ID_NONE , 0 } }; +const AVCodecTag ff_nut_video_tags[] = { + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 16 ) }, + { CODEC_ID_RAWVIDEO, MKTAG(15 , 'B', 'G', 'R') }, + { CODEC_ID_RAWVIDEO, MKTAG(15 , 'R', 'G', 'B') }, + { CODEC_ID_RAWVIDEO, MKTAG(16 , 'B', 'G', 'R') }, + { CODEC_ID_RAWVIDEO, MKTAG(16 , 'R', 'G', 'B') }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') }, + { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') }, + { CODEC_ID_RAWVIDEO, MKTAG('A', 'R', 'G', 'B') }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 24 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 24 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '1', '1', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', '1', 'W', '0') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', '0', 'W', '1') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 8 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 8 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 4 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 4 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) }, + { CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') }, + { CODEC_ID_NONE , 0 } +}; + void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ int i; for(i=0; i<nut->avf->nb_streams; i++){
--- a/nut.h Sun May 23 13:07:33 2010 +0000 +++ b/nut.h Sun May 23 18:34:15 2010 +0000 @@ -99,6 +99,7 @@ } NUTContext; extern const AVCodecTag ff_nut_subtitle_tags[]; +extern const AVCodecTag ff_nut_video_tags[]; typedef struct { char str[9];
--- a/nutdec.c Sun May 23 13:07:33 2010 +0000 +++ b/nutdec.c Sun May 23 18:34:15 2010 +0000 @@ -924,5 +924,6 @@ read_seek, .extensions = "nut", .metadata_conv = ff_nut_metadata_conv, + .codec_tag = (const AVCodecTag * const []) { ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 }, }; #endif
--- a/nutenc.c Sun May 23 13:07:33 2010 +0000 +++ b/nutenc.c Sun May 23 18:34:15 2010 +0000 @@ -824,6 +824,6 @@ write_packet, write_trailer, .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, - .codec_tag= (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0}, + .codec_tag = (const AVCodecTag * const []){ ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 }, .metadata_conv = ff_nut_metadata_conv, };