Commit d546db7e authored by Damien Fouilleul's avatar Damien Fouilleul

- libvlc: new libvlc_video_redraw_rectangle() API, this allows caller to tell...

- libvlc: new libvlc_video_redraw_rectangle() API, this allows caller to tell vout to redraw part of video, vout needs to implement VOUT_REDRAW_RECT message to support this
parent 1917275e
...@@ -450,6 +450,14 @@ VLC_PUBLIC_API void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exce ...@@ -450,6 +450,14 @@ VLC_PUBLIC_API void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exce
*/ */
VLC_PUBLIC_API int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * );
/**
* Tell windowless video output to redraw rectangular area (MacOS X only)
* \param p_instance libvlc instance
* \param area coordinates within video drawable
* \param p_exception an initialized exception
*/
VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_input_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
/** /**
* Set the default video output parent * Set the default video output parent
* this settings will be used as default for all video outputs * this settings will be used as default for all video outputs
...@@ -488,7 +496,6 @@ VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc ...@@ -488,7 +496,6 @@ VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc
*/ */
VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
/** @} */ /** @} */
/** /**
......
...@@ -607,7 +607,8 @@ enum output_query_e ...@@ -607,7 +607,8 @@ enum output_query_e
VOUT_SNAPSHOT, VOUT_SNAPSHOT,
VOUT_CLOSE, VOUT_CLOSE,
VOUT_SET_FOCUS, /* arg1= vlc_bool_t res= */ VOUT_SET_FOCUS, /* arg1= vlc_bool_t res= */
VOUT_SET_VIEWPORT /* arg1= view rect, arg2=clip rect, res= */ VOUT_SET_VIEWPORT, /* arg1= view rect, arg2=clip rect, res= */
VOUT_REDRAW_RECT, /* arg1= area rect, res= */
}; };
typedef struct snapshot_t { typedef struct snapshot_t {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* Authors: Cl�ent Stenac <zorglub@videolan.org> * Authors: Cl�ent Stenac <zorglub@videolan.org>
* Filippo Carone <littlejohn@videolan.org> * Filippo Carone <littlejohn@videolan.org>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl> * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
* Damien Fouilleul <damienf a_t videolan dot org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -251,6 +252,25 @@ void libvlc_video_resize( libvlc_input_t *p_input, int width, int height, libvlc ...@@ -251,6 +252,25 @@ void libvlc_video_resize( libvlc_input_t *p_input, int width, int height, libvlc
} }
} }
void libvlc_video_redraw_rectangle( libvlc_input_t *p_input,
const libvlc_rectangle_t *area,
libvlc_exception_t *p_e )
{
if( (NULL != area)
&& ((area->bottom - area->top) > 0)
&& ((area->right - area->left) > 0) )
{
vout_thread_t *p_vout = GetVout( p_input, p_e );
if( p_vout )
{
/* tell running vout to redraw area */
vout_Control( p_vout , VOUT_REDRAW_RECT,
area->top, area->left, area->bottom, area->right );
vlc_object_release( p_vout );
}
}
}
/* global video settings */ /* global video settings */
void libvlc_video_set_parent( libvlc_instance_t *p_instance, libvlc_drawable_t d, void libvlc_video_set_parent( libvlc_instance_t *p_instance, libvlc_drawable_t d,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment