]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_wrapper.c
LGPL
[vlc] / src / video_output / vout_wrapper.c
index 4ed32559c6030252a64cae33fcecfea564e5c747..fc6072f93d5ecc5253d9b75426ae8b4a8eae020d 100644 (file)
@@ -6,19 +6,19 @@
  *
  * Authors: Laurent Aimar <fenrir _AT_ 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
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -133,8 +133,8 @@ int vout_InitWrapper(vout_thread_t *vout)
     video_format_t source = vd->source;
 
     sys->display.use_dr = !vout_IsDisplayFiltered(vd);
-    const bool allow_dr = !vd->info.has_pictures_invalid && sys->display.use_dr;
-    const unsigned private_picture  = 3; /* XXX 2 for filter, 1 for SPU */
+    const bool allow_dr = !vd->info.has_pictures_invalid && !vd->info.is_slow && sys->display.use_dr;
+    const unsigned private_picture  = 4; /* XXX 3 for filter, 1 for SPU */
     const unsigned decoder_picture  = 1 + sys->dpb_size;
     const unsigned kept_picture     = 1; /* last displayed picture */
     const unsigned reserved_picture = DISPLAY_PICTURE_COUNT +
@@ -148,7 +148,6 @@ int vout_InitWrapper(vout_thread_t *vout)
         sys->dpb_size     = picture_pool_GetSize(display_pool) - reserved_picture;
         sys->decoder_pool = display_pool;
         sys->display_pool = display_pool;
-        sys->is_decoder_pool_slow = vd->info.is_slow;
     } else if (!sys->decoder_pool) {
         sys->decoder_pool =
             picture_pool_NewFromFormat(&source,
@@ -161,7 +160,6 @@ int vout_InitWrapper(vout_thread_t *vout)
             sys->dpb_size = picture_pool_GetSize(sys->decoder_pool) - reserved_picture;
         }
         NoDrInit(vout);
-        sys->is_decoder_pool_slow = false;
     }
     sys->private_pool = picture_pool_Reserve(sys->decoder_pool, private_picture);
     sys->display.filtered = NULL;
@@ -204,43 +202,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)