[vlc-commits] commit: Merged vout_RenderWrapper/ vout_DisplayWrapper directly into ThreadDisplayRenderPicture. ( Laurent Aimar )

git at videolan.org git at videolan.org
Sun Jan 9 22:44:20 CET 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 12 20:08:19 2010 +0100| [f2582ce7a20b8d0e78b91ff6f0fd413079638e4f] | committer: Laurent Aimar 

Merged vout_RenderWrapper/vout_DisplayWrapper directly into ThreadDisplayRenderPicture.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2582ce7a20b8d0e78b91ff6f0fd413079638e4f
---

 src/video_output/video_output.c  |   20 ++++++++++++++++----
 src/video_output/vout_internal.h |    2 --
 src/video_output/vout_wrapper.c  |   37 -------------------------------------
 3 files changed, 16 insertions(+), 43 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 0c72b2d..2721caa 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -873,6 +873,7 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool is_
 
 static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
 {
+    vout_thread_sys_t *sys = vout->p;
     vout_display_t *vd = vout->p->display.vd;
 
     picture_t *torender = picture_Hold(vout->p->displayed.current);
@@ -955,8 +956,16 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
     if (do_snapshot)
         vout_snapshot_Set(&vout->p->snapshot, &vd->source, direct);
 
-    /* Render the direct buffer returned by vout_RenderPicture */
-    vout_RenderWrapper(vout, direct, NULL);
+    /* Render the direct buffer */
+    assert(vout_IsDisplayFiltered(vd) == !sys->display.use_dr);
+    vout_UpdateDisplaySourceProperties(vd, &direct->format);
+    if (sys->display.use_dr) {
+        vout_display_Prepare(vd, direct, NULL);
+    } else {
+        sys->display.filtered = vout_FilterDisplay(vd, direct);
+        if (sys->display.filtered)
+            vout_display_Prepare(vd, sys->display.filtered, NULL);
+    }
 
     vout_chrono_Stop(&vout->p->render);
 #if 0
@@ -979,8 +988,11 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
 
     /* Display the direct buffer returned by vout_RenderPicture */
     vout->p->displayed.date = mdate();
-
-    vout_DisplayWrapper(vout, direct, NULL);
+    vout_display_Display(vd,
+                         sys->display.filtered ? sys->display.filtered
+                                                : direct,
+                         NULL);
+    sys->display.filtered = NULL;
 
     vout_statistic_Update(&vout->p->statistic, 1, 0);
 
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 0dcd6f8..67c4f2b 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -161,8 +161,6 @@ void vout_CloseWrapper(vout_thread_t *, vout_display_state_t *);
 int  vout_InitWrapper(vout_thread_t *);
 void vout_EndWrapper(vout_thread_t *);
 void vout_ManageWrapper(vout_thread_t *);
-void vout_RenderWrapper(vout_thread_t *, picture_t *, subpicture_t *);
-void vout_DisplayWrapper(vout_thread_t *, picture_t *, subpicture_t *);
 
 /* */
 int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *);
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 4ed3255..c7c58dc 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -204,43 +204,6 @@ void vout_ManageWrapper(vout_thread_t *vout)
     }
 }
 
-/*****************************************************************************
- * Render
- *****************************************************************************/
-void vout_RenderWrapper(vout_thread_t *vout,
-                        picture_t *picture, subpicture_t *subpicture)
-{
-    vout_thread_sys_t *sys = vout->p;
-    vout_display_t *vd = sys->display.vd;
-
-    assert(vout_IsDisplayFiltered(vd) == !sys->display.use_dr);
-
-    vout_UpdateDisplaySourceProperties(vd, &picture->format);
-    if (sys->display.use_dr) {
-        vout_display_Prepare(vd, picture, subpicture);
-    } else {
-        sys->display.filtered = vout_FilterDisplay(vd, picture);
-        if (sys->display.filtered)
-            vout_display_Prepare(vd, sys->display.filtered, subpicture);
-    }
-}
-
-/*****************************************************************************
- *
- *****************************************************************************/
-void vout_DisplayWrapper(vout_thread_t *vout,
-                         picture_t *picture, subpicture_t *subpicture)
-{
-    vout_thread_sys_t *sys = vout->p;
-    vout_display_t *vd = sys->display.vd;
-
-    vout_display_Display(vd,
-                         sys->display.filtered ? sys->display.filtered
-                                                : picture,
-                         subpicture);
-    sys->display.filtered = NULL;
-}
-
 #ifdef WIN32
 static int Forward(vlc_object_t *object, char const *var,
                    vlc_value_t oldval, vlc_value_t newval, void *data)



More information about the vlc-commits mailing list