[vlc-commits] add mp2v/mp1v to muxers

Ilkka Ollakka git at videolan.org
Sat Feb 15 15:32:13 CET 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Feb 14 12:44:15 2014 +0200| [87cd07ca3ae1ee3eeb59c8f6a659180ba85795d8] | committer: Ilkka Ollakka

add mp2v/mp1v to muxers

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87cd07ca3ae1ee3eeb59c8f6a659180ba85795d8
---

 modules/mux/mp4.c      |   12 +++++++++---
 modules/mux/mpeg/pes.c |    5 ++++-
 modules/mux/mpeg/ps.c  |    2 ++
 modules/mux/mpeg/ts.c  |    2 ++
 modules/mux/ogg.c      |    2 ++
 5 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
index e8b72d3..156ecd1 100644
--- a/modules/mux/mp4.c
+++ b/modules/mux/mp4.c
@@ -376,6 +376,8 @@ static int AddStream(sout_mux_t *p_mux, sout_input_t *p_input)
     case VLC_CODEC_MP4V:
     case VLC_CODEC_MPGA:
     case VLC_CODEC_MPGV:
+    case VLC_CODEC_MP2V:
+    case VLC_CODEC_MP1V:
     case VLC_CODEC_MJPG:
     case VLC_CODEC_MJPGB:
     case VLC_CODEC_SVQ1:
@@ -654,9 +656,13 @@ static bo_t *GetESDS(mp4_stream_t *p_stream)
     case VLC_CODEC_MP4V:
         i_object_type_indication = 0x20;
         break;
-    case VLC_CODEC_MPGV:
-        /* FIXME MPEG-I=0x6b, MPEG-II = 0x60 -> 0x65 */
-        i_object_type_indication = 0x60;
+    case VLC_CODEC_MP2V:
+        /* MPEG-I=0x6b, MPEG-II = 0x60 -> 0x65 */
+        i_object_type_indication = 0x65;
+        break;
+    case VLC_CODEC_MP1V:
+        /* MPEG-I=0x6b, MPEG-II = 0x60 -> 0x65 */
+        i_object_type_indication = 0x6b;
         break;
     case VLC_CODEC_MP4A:
         /* FIXME for mpeg2-aac == 0x66->0x68 */
diff --git a/modules/mux/mpeg/pes.c b/modules/mux/mpeg/pes.c
index beb87da..045096b 100644
--- a/modules/mux/mpeg/pes.c
+++ b/modules/mux/mpeg/pes.c
@@ -110,7 +110,10 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
 
                 if( i_pts > 0 && i_dts > 0 &&
                     ( i_pts != i_dts || ( p_fmt->i_cat == VIDEO_ES &&
-                      p_fmt->i_codec != VLC_CODEC_MPGV ) ) )
+                      p_fmt->i_codec != VLC_CODEC_MPGV &&
+                      p_fmt->i_codec != VLC_CODEC_MP2V &&
+                      p_fmt->i_codec != VLC_CODEC_MP1V 
+                      ) ) )
                 {
                     i_pts_dts = 0x03;
                     if ( !i_header_size ) i_header_size = 0xa;
diff --git a/modules/mux/mpeg/ps.c b/modules/mux/mpeg/ps.c
index cd36bd3..e00390b 100644
--- a/modules/mux/mpeg/ps.c
+++ b/modules/mux/mpeg/ps.c
@@ -273,6 +273,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     switch( p_input->p_fmt->i_codec )
     {
         case VLC_CODEC_MPGV:
+        case VLC_CODEC_MP2V:
+        case VLC_CODEC_MP1V:
             p_stream->i_stream_id =
                 StreamIdGet( p_sys->stream_id_mpgv, 0xe0, 0xef );
             p_stream->i_stream_type = 0x02; /* ISO/IEC 13818 Video */
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index dc8010c..e631e7e 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -895,6 +895,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     /* VIDEO */
 
     case VLC_CODEC_MPGV:
+    case VLC_CODEC_MP2V:
+    case VLC_CODEC_MP1V:
         /* TODO: do we need to check MPEG-I/II ? */
         p_stream->i_stream_type = 0x02;
         p_stream->i_stream_id = 0xe0;
diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index f5f2eea..d91418c 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -389,6 +389,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
         {
         case VLC_CODEC_MP4V:
         case VLC_CODEC_MPGV:
+        case VLC_CODEC_MP1V:
+        case VLC_CODEC_MP2V:
         case VLC_CODEC_DIV3:
         case VLC_CODEC_MJPG:
         case VLC_CODEC_WMV1:



More information about the vlc-commits mailing list