]> git.sesse.net Git - vlc/commitdiff
* modules/stream_out/display.c: converted to the new input API + re-enabled in the...
authorGildas Bazin <gbazin@videolan.org>
Sat, 24 Jul 2004 10:24:11 +0000 (10:24 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 24 Jul 2004 10:24:11 +0000 (10:24 +0000)
configure.ac
modules/stream_out/display.c

index 36b768d658fdd4c7dab0802d2299066519ffbe14..06685f7d245ba8507adf00fc370547c89d446fcf 100644 (file)
@@ -1177,8 +1177,8 @@ then
   VLC_ADD_PLUGINS([packetizer_copy])
 
   VLC_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp])
-  VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather])
-#  VLC_ADD_PLUGINS([stream_out_transrate stream_out_display])
+  VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather stream_out_display])
+#  VLC_ADD_PLUGINS([stream_out_transrate])
 
   dnl Ogg and vorbis are handled in their respective section
 fi
index 05378fe8f929052fc20297bd5ea2b24e34fdaf58..b402df09e7181ad31692cad288cf7bd7f7644527 100644 (file)
@@ -136,13 +136,12 @@ static void Close( vlc_object_t * p_this )
     p_stream->p_sout->i_out_pace_nocontrol--;
 
     vlc_object_release( p_sys->p_input );
-
     free( p_sys );
 }
 
 struct sout_stream_id_t
 {
-    es_descriptor_t *p_es;
+    decoder_t *p_dec;
 };
 
 static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
@@ -158,19 +157,11 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
     id = malloc( sizeof( sout_stream_id_t ) );
 
-    id->p_es = malloc( sizeof( es_descriptor_t ) );
-    memset( id->p_es, 0, sizeof( es_descriptor_t ) );
-    id->p_es->i_cat         = p_fmt->i_cat;
-    id->p_es->i_fourcc      = p_fmt->i_codec;
-    id->p_es->b_force_decoder = VLC_TRUE;
-    es_format_Copy( &id->p_es->fmt, p_fmt );
-
-    id->p_es->p_dec = input_RunDecoder( p_sys->p_input, id->p_es );
-    if( id->p_es->p_dec == NULL )
+    id->p_dec = input_DecoderNew( p_sys->p_input, p_fmt, VLC_TRUE );
+    if( id->p_dec == NULL )
     {
         msg_Err( p_stream, "cannot create decoder for fcc=`%4.4s'",
                  (char*)&p_fmt->i_codec );
-        free( id->p_es );
         free( id );
         return NULL;
     }
@@ -180,13 +171,8 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 {
-    sout_stream_sys_t *p_sys = p_stream->p_sys;
-
-    input_EndDecoder( p_sys->p_input, id->p_es );
-
-    free( id->p_es );
+    input_DecoderDelete( id->p_dec );
     free( id );
-
     return VLC_SUCCESS;
 }
 
@@ -201,7 +187,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
 
         p_buffer->p_next = NULL;
 
-        if( id->p_es->p_dec && p_buffer->i_buffer > 0 )
+        if( id->p_dec && p_buffer->i_buffer > 0 )
         {
             if( p_buffer->i_dts <= 0 )
                 p_buffer->i_dts= 0;
@@ -213,7 +199,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
             else
                 p_buffer->i_pts += p_sys->i_delay;
 
-            input_DecodeBlock( id->p_es->p_dec, p_buffer );
+            input_DecoderDecode( id->p_dec, p_buffer );
         }
 
         p_buffer = p_next;