[vlc-devel] [PATCH] OSD: Show picture size
Rémi Denis-Courmont
remi at remlab.net
Sat Apr 27 19:23:03 CEST 2013
Hello,
Le samedi 27 avril 2013 20:07:57, Sandeep Ruhil a écrit :
> diff --git a/src/video_output/display.c b/src/video_output/display.c
> index 0d20a56..f08bf1e 100644
> --- a/src/video_output/display.c
> +++ b/src/video_output/display.c
> @@ -33,6 +33,7 @@
> #include <vlc_video_splitter.h>
> #include <vlc_vout_display.h>
> #include <vlc_vout.h>
> +#include <vlc_vout_osd.h>
> #include <vlc_block.h>
> #include <vlc_modules.h>
>
> @@ -640,6 +641,10 @@ static void VoutDisplayEvent(vout_display_t *vd, int
> event, va_list args)
> const bool is_fullscreen = (bool)va_arg(args, int);
> msg_Dbg(vd, "VoutDisplayEvent 'resize' %dx%d %s",
> width, height, is_fullscreen ? "fullscreen" : "window");
> + if(var_GetBool(vd->p_parent, "resize-msg"))
var_InheritBool(vd,...)
> + vout_OSDMessage( (vlc_object_t *) vd->p_parent,
> SPU_DEFAULT_CHANNEL,
> + "Screen Size: %d x %d", width, height );
> +
>
> /* */
> vlc_mutex_lock(&osys->lock);
> diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
> index c4c9f00..3786a50 100644
> --- a/src/video_output/vout_intf.c
> +++ b/src/video_output/vout_intf.c
> @@ -325,6 +325,10 @@ void vout_IntfInit( vout_thread_t *p_vout )
> var_AddCallback( p_vout, "sub-margin", SubMarginCallback, NULL );
> var_TriggerCallback( p_vout, "sub-margin" );
>
> + /* Add resize-msg variable */
We can see that. Please avoid comments with no value-add.
> + var_Create( p_vout, "resize-msg",
> + VLC_VAR_BOOL | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
> +
> /* Mouse coordinates */
> var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER );
> var_Create( p_vout, "mouse-moved", VLC_VAR_COORDS );
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list