Commit 13dec857 authored by Vitor Sessak's avatar Vitor Sessak Committed by Diego Biurrun
Browse files

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
parent de8e2c1d
......@@ -894,7 +894,7 @@ library:
@item 4xm @tab @tab X
@tab 4X Technologies format, used in some games.
@item Playstation STR @tab @tab X
@item Id RoQ @tab @tab X
@item Id RoQ @tab X @tab X
@tab Used in Quake III, Jedi Knight 2, other computer games.
@item Interplay MVE @tab @tab X
@tab Format used in various Interplay computer games.
......
......@@ -116,6 +116,7 @@ OBJS-$(CONFIG_REDIR_DEMUXER) += rtsp.o
OBJS-$(CONFIG_RM_DEMUXER) += rm.o
OBJS-$(CONFIG_RM_MUXER) += rm.o
OBJS-$(CONFIG_ROQ_DEMUXER) += idroq.o
OBJS-$(CONFIG_ROQ_MUXER) += raw.o
OBJS-$(CONFIG_RTP_MUXER) += rtp.o rtp_h264.o
OBJS-$(CONFIG_RTSP_DEMUXER) += rtsp.o
OBJS-$(CONFIG_SDP_DEMUXER) += rtsp.o
......
......@@ -131,7 +131,7 @@ void av_register_all(void)
REGISTER_MUXER (PSP, psp);
REGISTER_MUXDEMUX(RAWVIDEO, rawvideo);
REGISTER_MUXDEMUX(RM, rm);
REGISTER_DEMUXER (ROQ, roq);
REGISTER_MUXDEMUX(ROQ, roq);
REGISTER_DEMUXER (REDIR, redir);
REGISTER_MUXER (RTP, rtp);
REGISTER_DEMUXER (RTSP, rtsp);
......
......@@ -169,6 +169,7 @@ extern AVOutputFormat pcm_u8_muxer;
extern AVOutputFormat psp_muxer;
extern AVOutputFormat rawvideo_muxer;
extern AVOutputFormat rm_muxer;
extern AVOutputFormat roq_muxer;
extern AVOutputFormat swf_muxer;
extern AVOutputFormat tg2_muxer;
extern AVOutputFormat tgp_muxer;
......
......@@ -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",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment