[vlc-devel] [PATCH] --height --width cmdline parameters currently ignored

Greg Farrell greg at gregfarrell.org
Wed Oct 12 10:23:34 CEST 2005


Hi,

   the --height and --width command line parameters seem to be ignored
in the current vlc-trunk.

They are parsed and stored in the vlc object, however any video windows
created seem to totally ignore them. When a video window is created it
will check it's parent (if it's parent is not a vout obj) for aspect
ratio and will inherit these values.

As I understood it from the documentation, the video window also should
inherit width and height from the parent unless they are over-riden.

I've attached a small patch that fixes this for me. However I'm not very
confident about the order various level width/heights are meant to
over-ride each other, so this is more meant as a proof of the bug (and a
fix for my own use) than a VLC submission.

It works for me, and to the best of my understanding, but that's all I
can vouch for. Hopefully someone can confirm this patch is ok, or can
fix this problem themselves.

    Greg

--- /home/p4/vlc-trunk.backup/src/video_output/video_output.c
2005-10-07 13:39:12.000000000 +0100
+++ video_output.c      2005-10-12 09:14:07.594994193 +0100
@@ -316,6 +316,20 @@
      * the video output pipe */
     if( p_parent->i_object_type != VLC_OBJECT_VOUT )
     {
+        int i_parent_width = config_GetInt( p_parent, "width");
+        int i_parent_height = config_GetInt( p_parent, "height");
+
+        if ( i_parent_width  )
+        {
+            var_Create( p_vout, "width", VLC_VAR_INTEGER );
+            var_SetInteger ( p_vout, "width", i_parent_width );
+        }
+        if ( i_parent_height )
+        {
+            var_Create( p_vout, "height", VLC_VAR_INTEGER );
+            var_SetInteger ( p_vout, "height", i_parent_height );
+        }
+
         int i_monitor_aspect_x = 4 , i_monitor_aspect_y = 3;
         var_Get( p_vout, "aspect-ratio", &val );
         var_Get( p_vout, "monitor-aspect-ratio", &val2 );

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list