]> git.sesse.net Git - vlc/commitdiff
- libvlc: new libvlc_video_redraw_rectangle() API, this allows caller to tell vout...
authorDamien Fouilleul <damienf@videolan.org>
Wed, 28 Mar 2007 21:57:39 +0000 (21:57 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Wed, 28 Mar 2007 21:57:39 +0000 (21:57 +0000)
include/vlc/libvlc.h
include/vlc_vout.h
src/control/video.c

index d3320ce3c4ee5ccc37124bb3b379391b9d214f37..4403445a550e82ac7203a586090588c94357b4ca 100644 (file)
@@ -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 * );
 
+/**
+ * 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
  *  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
  */
 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
 
-
 /** @} */
 
 /**
index 848a90b9884dfbd538c2208fe22df54a0c4be254..4779b0a429d18aa437edc507371266e46f185c58 100644 (file)
@@ -607,7 +607,8 @@ enum output_query_e
     VOUT_SNAPSHOT,
     VOUT_CLOSE,
     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 {
index 48f8e7d5589a26bd52f2cc46c3f96123ca15bf00..d05c94fadcb4b498a5423ae3ba688c4a2cbd4f52 100644 (file)
@@ -8,6 +8,7 @@
  * Authors: Cl�ent Stenac <zorglub@videolan.org>
  *          Filippo Carone <littlejohn@videolan.org>
  *          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
  * 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
     }
 }
 
+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 */
 
 void libvlc_video_set_parent( libvlc_instance_t *p_instance, libvlc_drawable_t d,