[FFmpeg-cvslog] r8959 - in trunk: doc/ffmpeg-doc.texi libavformat/Makefile libavformat/allformats.c libavformat/allformats.h libavformat/raw.c

diego subversion
Thu May 10 01:07:41 CEST 2007


Author: diego
Date: Thu May 10 01:07:40 2007
New Revision: 8959

Log:
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                                                                       


Modified:
   trunk/doc/ffmpeg-doc.texi
   trunk/libavformat/Makefile
   trunk/libavformat/allformats.c
   trunk/libavformat/allformats.h
   trunk/libavformat/raw.c

Modified: trunk/doc/ffmpeg-doc.texi
==============================================================================
--- trunk/doc/ffmpeg-doc.texi	(original)
+++ trunk/doc/ffmpeg-doc.texi	Thu May 10 01:07:40 2007
@@ -894,7 +894,7 @@ library:
 @item 4xm              @tab    @tab X
 @tab 4X Technologies format, used in some games.
 @item Playstation STR  @tab    @tab X
- at item Id RoQ           @tab    @tab X
+ at 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.

Modified: trunk/libavformat/Makefile
==============================================================================
--- trunk/libavformat/Makefile	(original)
+++ trunk/libavformat/Makefile	Thu May 10 01:07:40 2007
@@ -116,6 +116,7 @@ OBJS-$(CONFIG_REDIR_DEMUXER)            
 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

Modified: trunk/libavformat/allformats.c
==============================================================================
--- trunk/libavformat/allformats.c	(original)
+++ trunk/libavformat/allformats.c	Thu May 10 01:07:40 2007
@@ -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);

Modified: trunk/libavformat/allformats.h
==============================================================================
--- trunk/libavformat/allformats.h	(original)
+++ trunk/libavformat/allformats.h	Thu May 10 01:07:40 2007
@@ -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;

Modified: trunk/libavformat/raw.c
==============================================================================
--- trunk/libavformat/raw.c	(original)
+++ trunk/libavformat/raw.c	Thu May 10 01:07:40 2007
@@ -43,6 +43,19 @@ static int flac_write_header(struct AVFo
     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",




More information about the ffmpeg-cvslog mailing list