diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2007-05-09 23:07:40 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2007-05-09 23:07:40 +0000 |
commit | 13dec85765f8c1b57d152e691f51ec86152b0e4a (patch) | |
tree | 0fdd84f20a3dcce72a0a9226ad3f7bb4df7f7def /libavformat/raw.c | |
parent | de8e2c1d22bf691c9874c33528e16615b6c451a1 (diff) | |
download | ffmpeg-streaming-13dec85765f8c1b57d152e691f51ec86152b0e4a.zip ffmpeg-streaming-13dec85765f8c1b57d152e691f51ec86152b0e4a.tar.gz |
RoQ muxer, patch by Vitor, vitor1001 gmail com
reference thread:
Subject: [FFmpeg-devel] [PATCH] RoQ muxer
Date: Wed, 09 May 2007 19:44:21 +0200
Originally committed as revision 8959 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index 9f12e55..cdacfa8 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -43,6 +43,19 @@ static int flac_write_header(struct AVFormatContext *s) return 0; } + +static int roq_write_header(struct AVFormatContext *s) +{ + static const uint8_t header[] = { + 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x00 + }; + + put_buffer(&s->pb, header, 8); + put_flush_packet(&s->pb); + + return 0; +} + static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt) { put_buffer(&s->pb, pkt->data, pkt->size); @@ -527,6 +540,22 @@ AVInputFormat aac_demuxer = { .extensions = "aac", }; +#ifdef CONFIG_ROQ_MUXER +AVOutputFormat roq_muxer = +{ + "RoQ", + "Id RoQ format", + NULL, + "roq", + 0, + CODEC_ID_ROQ_DPCM, + CODEC_ID_ROQ, + roq_write_header, + raw_write_packet, + raw_write_trailer, +}; +#endif //CONFIG_ROQ_MUXER + AVInputFormat h261_demuxer = { "h261", "raw h261", |