]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/transcode.c
* Fix some configuration options declerations and strings
[vlc] / modules / stream_out / transcode.c
index 8394d4a15d888043faa5b9063e136d7139f3967d..da2219e289ca67d1233312ab2cd0506b62e797ce 100644 (file)
@@ -63,8 +63,7 @@
     "Allows you to deinterlace the video before encoding." )
 #define DEINTERLACE_MODULE_TEXT N_("Deinterlace module")
 #define DEINTERLACE_MODULE_LONGTEXT N_( \
-    "Specifies the deinterlace module to use (ffmpeg-deinterlace or " \
-    "deinterlace)." )
+    "Specifies the deinterlace module to use." )
 #define WIDTH_TEXT N_("Video width")
 #define WIDTH_LONGTEXT N_( \
     "Allows you to specify the output video width." )
 #define HURRYUP_LONGTEXT N_( "Allows you to specify if the transcoder " \
   "should drop frames if your CPU can't keep up with the encoding rate." )
 
+static char *ppsz_deinterlace_type[] =
+{
+    "deinterlace", "ffmpeg-deinterlace"
+};
+
 static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
@@ -172,6 +176,7 @@ vlc_module_begin();
     add_string( SOUT_CFG_PREFIX "deinterlace-module", "deinterlace", NULL,
                 DEINTERLACE_MODULE_TEXT, DEINTERLACE_MODULE_LONGTEXT,
                 VLC_FALSE );
+        change_string_list( ppsz_deinterlace_type, 0, 0 );
     add_integer( SOUT_CFG_PREFIX "width", 0, NULL, WIDTH_TEXT,
                  WIDTH_LONGTEXT, VLC_TRUE );
     add_integer( SOUT_CFG_PREFIX "height", 0, NULL, HEIGHT_TEXT,
@@ -1770,7 +1775,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
                         malloc( sizeof(filter_owner_sys_t) );
                     for( i = 0; i < PICTURE_RING_SIZE; i++ )
                         id->pp_vfilter[id->i_vfilter]->p_owner->pp_pics[i] = 0;
-                    id->pp_filter[id->i_filter]->p_owner->p_sys = p_sys;
+                    id->pp_vfilter[id->i_vfilter]->p_owner->p_sys = p_sys;
 
                     id->i_vfilter++;
                 }
@@ -1952,7 +1957,8 @@ static void video_release_buffer( picture_t *p_pic )
     else if( p_pic && p_pic->i_refcount > 0 ) p_pic->i_refcount--;
 }
 
-static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring )
+static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring,
+                                    sout_stream_sys_t *p_sys )
 {
     decoder_t *p_dec = (decoder_t *)p_this;
     picture_t *p_pic;
@@ -1972,15 +1978,14 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring )
         if( pp_ring[i] == 0 ) break;
     }
 
-    if( i == PICTURE_RING_SIZE && p_dec->p_owner->p_sys->i_threads >= 1 )
+    if( i == PICTURE_RING_SIZE && p_sys->i_threads >= 1 )
     {
-        int i_first_pic = p_dec->p_owner->p_sys->i_first_pic;
+        int i_first_pic = p_sys->i_first_pic;
 
-        if( p_dec->p_owner->p_sys->i_first_pic !=
-            p_dec->p_owner->p_sys->i_last_pic )
+        if( p_sys->i_first_pic != p_sys->i_last_pic )
         {
             /* Encoder still has stuff to encode, wait to clear-up the list */
-            while( p_dec->p_owner->p_sys->i_first_pic == i_first_pic )
+            while( p_sys->i_first_pic == i_first_pic )
                 msleep( 100000 );
         }
 
@@ -2039,13 +2044,14 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring )
 static picture_t *video_new_buffer_decoder( decoder_t *p_dec )
 {
     return video_new_buffer( VLC_OBJECT(p_dec),
-                             p_dec->p_owner->pp_pics );
+                             p_dec->p_owner->pp_pics, p_dec->p_owner->p_sys );
 }
 
 static picture_t *video_new_buffer_filter( filter_t *p_filter )
 {
     return video_new_buffer( VLC_OBJECT(p_filter),
-                             p_filter->p_owner->pp_pics );
+                             p_filter->p_owner->pp_pics,
+                             p_filter->p_owner->p_sys );
 }
 
 static void video_del_buffer( vlc_object_t *p_this, picture_t *p_pic )