]> git.sesse.net Git - vlc/commitdiff
Merged mp1v/mp2v codecs.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 13 May 2009 20:34:07 +0000 (22:34 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 13 May 2009 20:35:16 +0000 (22:35 +0200)
The codec defined will only be used by encoder to force one of the types.

include/vlc_fourcc.h
modules/access/dshow/dshow.cpp
modules/access/dshow/filter.cpp
modules/codec/avcodec/encoder.c
modules/codec/avcodec/fourcc.c
modules/codec/libmpeg2.c
modules/mux/mpeg/ps.c
modules/stream_out/record.c
src/misc/fourcc.c

index c041a8e6c9fd774aa54154afb44d612b354f4aba..7bc40765eb600bcd569234618765418a15791724 100644 (file)
@@ -29,8 +29,6 @@
 
 /* Video codec */
 #define VLC_CODEC_MPGV      VLC_FOURCC('m','p','g','v')
-#define VLC_CODEC_MP1V      VLC_FOURCC('m','p','1','v')
-#define VLC_CODEC_MP2V      VLC_FOURCC('m','p','2','v')
 #define VLC_CODEC_MP4V      VLC_FOURCC('m','p','4','v')
 #define VLC_CODEC_DIV1      VLC_FOURCC('D','I','V','1')
 #define VLC_CODEC_DIV2      VLC_FOURCC('D','I','V','2')
 #   define VLC_CODEC_S32N VLC_CODEC_S32L
 #endif
 
+/* Non official codecs, used to force a profile in an encoder */
+#define VLC_CODEC_MP1V      VLC_FOURCC('m','p','1','v')
+#define VLC_CODEC_MP2V      VLC_FOURCC('m','p','2','v')
+
 /**
  * It returns the codec associatedto a fourcc within a ES category.
  *
index 729648aa58514ef23484b54e902de7903db2d7b4..9a6cf7cd3bfd3f63b2c5cea64f5615fc7546cf02 100644 (file)
@@ -491,7 +491,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
             if( /* Raw DV stream */
                 p_stream->i_fourcc == VLC_CODEC_DV ||
                 /* Raw MPEG video stream */
-                p_stream->i_fourcc == VLC_CODEC_MP2V )
+                p_stream->i_fourcc == VLC_CODEC_MPGV )
             {
                 b_use_audio = false;
 
@@ -729,7 +729,7 @@ static int AccessOpen( vlc_object_t *p_this )
             free( p_access->psz_demux );
             p_access->psz_demux = strdup( "rawdv" );
         }
-        else if( p_stream->i_fourcc == VLC_CODEC_MP2V )
+        else if( p_stream->i_fourcc == VLC_CODEC_MPGV )
         {
             free( p_access->psz_demux );
             p_access->psz_demux = strdup( "mpgv" );
index 8262e66ba4da8a33542a4e977c157241a2bf5e3c..a9f7d5cb8623f39d1210dd72df3040e3f44bad14 100644 (file)
@@ -286,7 +286,7 @@ int GetFourCCFromMediaType( const AM_MEDIA_TYPE &media_type )
 
             /* MPEG2 video elementary stream */
             else if( media_type.subtype == MEDIASUBTYPE_MPEG2_VIDEO )
-               i_fourcc = VLC_CODEC_MP2V;
+               i_fourcc = VLC_CODEC_MPGV;
 
             /* DivX video */
             else if( media_type.subtype == MEDIASUBTYPE_DIVX )
index 389475573aa26be5061df50b2549d56e3fed5405..a77e1df946ae403615b7c8deefe76dbb8bdce294 100644 (file)
@@ -453,7 +453,8 @@ int OpenEncoder( vlc_object_t *p_this )
             __MAX( __MIN( p_sys->i_b_frames, FF_MAX_B_FRAMES ), 0 );
         p_context->b_frame_strategy = 0;
         if( !p_context->max_b_frames  &&
-            (  p_enc->fmt_out.i_codec == VLC_CODEC_MP2V ||
+            (  p_enc->fmt_out.i_codec == VLC_CODEC_MPGV ||
+               p_enc->fmt_out.i_codec == VLC_CODEC_MP2V ||
                p_enc->fmt_out.i_codec == VLC_CODEC_MP1V ) )
             p_context->flags |= CODEC_FLAG_LOW_DELAY;
 
index 686b2fa10caa87a348bb8d79e45b72e2a34fbce0..6e18746cc4270173fe840330330b021d1cf3a6fc 100644 (file)
@@ -52,9 +52,7 @@ static const struct
      * Video Codecs
      */
 
-    { VLC_CODEC_MP1V, CODEC_ID_MPEG1VIDEO, VIDEO_ES },
-
-    { VLC_CODEC_MP2V, CODEC_ID_MPEG2VIDEO, VIDEO_ES },
+    { VLC_CODEC_MPGV, CODEC_ID_MPEG2VIDEO, VIDEO_ES },
 
     { VLC_CODEC_MP4V, CODEC_ID_MPEG4, VIDEO_ES },
     /* 3ivx delta 3.5 Unsupported
index b456fa93e19e61f7741c23e4cab6cc54ed43e9df..36f55696d151201e91c56c701aa3fe1074627b2d 100644 (file)
@@ -119,9 +119,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_sys_t *p_sys;
     uint32_t i_accel = 0;
 
-    if( p_dec->fmt_in.i_codec != VLC_CODEC_MP1V &&
-        p_dec->fmt_in.i_codec != VLC_CODEC_MP2V &&
-        p_dec->fmt_in.i_codec != VLC_CODEC_MPGV )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_MPGV )
         return VLC_EGENERIC;
 
     /* Select onl recognized original format (standard mpeg video) */
index 724da3c7bd56e848d7cb7f862df0158621d2b546..a7e4ef5f7266d74875022f7e628e4452bb84a6de 100644 (file)
@@ -276,12 +276,6 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     /* Init this new stream */
     switch( p_input->p_fmt->i_codec )
     {
-        case VLC_CODEC_MP1V:
-            p_stream->i_stream_id =
-                StreamIdGet( p_sys->stream_id_mpgv, 0xe0, 0xef );
-            p_stream->i_stream_type = 0x01; /* ISO/IEC 11172 Video */
-            break;
-        case VLC_CODEC_MP2V:
         case VLC_CODEC_MPGV:
             p_stream->i_stream_id =
                 StreamIdGet( p_sys->stream_id_mpgv, 0xe0, 0xef );
index a3b13268a83266142cf429e8798cd149ecbc5230..77f00a44a81ea7f0c0184f907d81fcb583644a33 100644 (file)
@@ -287,12 +287,12 @@ static const muxer_properties_t p_muxers[] = {
     M( "mp4", "mp4", INT_MAX,   VLC_CODEC_MP4A, VLC_CODEC_H264, VLC_CODEC_MP4V,
                                 VLC_CODEC_SUBT ),
 
-    M( "ps", "mpg", 16/* FIXME*/,VLC_CODEC_MPGV, VLC_CODEC_MP1V, VLC_CODEC_MP2V,
+    M( "ps", "mpg", 16/* FIXME*/,VLC_CODEC_MPGV,
                                 VLC_CODEC_MPGA, VLC_CODEC_DVD_LPCM, VLC_CODEC_A52,
                                 VLC_CODEC_DTS,
                                 VLC_CODEC_SPU ),
 
-    M( "ts", "ts", 8000,        VLC_CODEC_MPGV, VLC_CODEC_MP1V, VLC_CODEC_MP2V,
+    M( "ts", "ts", 8000,        VLC_CODEC_MPGV,
                                 VLC_CODEC_H264,
                                 VLC_CODEC_MPGA, VLC_CODEC_DVD_LPCM, VLC_CODEC_A52,
                                 VLC_CODEC_DTS, VLC_CODEC_MP4A,
index d585992d95c2a7fcba91cc2bb09b9bc7326c9cb8..b0a699c01c2e3372db352a7eb0711e1a30c15066 100644 (file)
@@ -56,16 +56,18 @@ typedef struct
 
 /* */
 static const entry_t p_list_video[] = {
-    B(VLC_CODEC_MP1V, "MPEG-1 Video"),
+
+    B(VLC_CODEC_MPGV, "MPEG-1/2 Video"),
+        A("mpgv"),
         A("mp1v"),
         A("mpeg"),
         A("mpg1"),
-        E("PIM1", "Pinnacle DC1000 (MPEG-1 Video)"),
-
-    B(VLC_CODEC_MP2V, "MPEG-2 Video"),
         A("mp2v"),
         A("MPEG"),
         A("mpg2"),
+
+        E("PIM1", "Pinnacle DC1000 (MPEG-1 Video)"),
+
         E("hdv1", "HDV 720p30 (MPEG-2 Video)"),
         E("hdv2", "Sony HDV (MPEG-2 Video)"),
         E("hdv3", "FCP HDV (MPEG-2 Video)"),
@@ -83,9 +85,6 @@ static const entry_t p_list_video[] = {
         E("xdv2", "XDCAM HD 1080i60"),
         E("AVmp", "AVID IMX PAL"),
 
-    B(VLC_CODEC_MPGV, "MPEG-1/2 Video"),
-        A("mpgv"),
-
     B(VLC_CODEC_MP4V, "MPEG-4 Video"),
         A("mp4v"),
         A("DIVX"),