[vlc-devel] commit: Actions on cropping UI. This doesn't work yet, because I am unsure of the good way to do it. Ref #1400. ( Jean-Baptiste Kempf )
Antoine Cellerier
dionoea at videolan.org
Mon Mar 31 15:06:37 CEST 2008
On Mon, Mar 31, 2008, git version control wrote:
> Actions on cropping UI. This doesn't work yet, because I am unsure of the good way to do it. Ref #1400.
> +void ExtVideo::cropChange()
> +{
> + char *psz_crop;
> + unsigned int height, width; //TODO set the variables if vout exists...
> +
> + p_vout = ( vout_thread_t * )vlc_object_find( p_intf,
> + VLC_OBJECT_VOUT, FIND_CHILD );
> + if( p_vout )
> + {
> + height = p_vout->i_window_height;
> + width = p_vout->i_window_width;
> + sprintf( psz_crop,"%ix%i+%i+%i",
> + width - ui.cropLeftPx->value() - ui.cropRightPx->value(),
> + height - ui.cropBotPx->value() - ui.cropTopPx->value(),
> + ui.cropLeftPx->value(),
> + ui.cropTopPx->value() );
> +
> + // var_Set( p_vout, "crop-geometry", qtu( qs_crop ) );
> + }
> +
> +}
I'd use "crop-right", "crop-left", "crop-top" and "crop-bottom" instead
for live changes since those take integer arguments instead of a string.
(Of course you'd have a problem if you wanted to save the crop settings
in the config)
--
Antoine Cellerier
dionoea
More information about the vlc-devel
mailing list