[vlc-commits] display: remove always NULL pool callback
Steve Lhomme
git at videolan.org
Mon Jan 20 08:25:37 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jan 15 09:50:33 2020 +0100| [36ff9f9f18d4abc10f2b76a5a0d97d25cac9473e] | committer: Steve Lhomme
display: remove always NULL pool callback
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=36ff9f9f18d4abc10f2b76a5a0d97d25cac9473e
---
include/vlc_vout_display.h | 11 -----------
src/video_output/display.c | 24 +-----------------------
2 files changed, 1 insertion(+), 34 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 664b7706a9..411bdd0332 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -308,17 +308,6 @@ struct vout_display_t {
*/
vout_display_info_t info;
- /* Return a pointer over the current picture_pool_t* (optional).
- *
- * For performance reasons, it is best to provide at least count
- * pictures but it is not mandatory.
- * You can return NULL when you cannot/do not want to allocate
- * pictures.
- * The vout display module keeps the ownership of the pool and can
- * destroy it only when closing or on invalid pictures control.
- */
- picture_pool_t *(*pool)(vout_display_t *, unsigned count);
-
/**
* Prepares a picture and an optional subpicture for display (optional).
*
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 1f58167242..76d49ee240 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -413,9 +413,6 @@ picture_pool_t *vout_GetPool(vout_display_t *vd, unsigned count)
{
vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
- if (vd->pool != NULL)
- return vd->pool(vd, count);
-
if (osys->pool == NULL)
osys->pool = picture_pool_NewFromFormat(&vd->fmt, count);
return osys->pool;
@@ -437,25 +434,7 @@ picture_t *vout_ConvertForDisplay(vout_display_t *vd, picture_t *picture)
return NULL;
}
- picture = filter_chain_VideoFilter(osys->converters, picture);
-
- if (picture != NULL && vd->pool != NULL && picture->i_planes > 0) {
- picture_pool_t *pool = vd->pool(vd, 3);
-
- if (!picture_pool_OwnsPic(pool, picture)) {
- /* The picture is not be allocated from the expected pool. Copy. */
- picture_t *direct = picture_pool_Get(pool);
-
- if (direct != NULL) {
- video_format_CopyCropAr(&direct->format, &picture->format);
- picture_Copy(direct, picture);
- }
- picture_Release(picture);
- picture = direct;
- }
- }
-
- return picture;
+ return filter_chain_VideoFilter(osys->converters, picture);
}
picture_t *vout_display_Prepare(vout_display_t *vd, picture_t *picture,
@@ -778,7 +757,6 @@ vout_display_t *vout_display_New(vlc_object_t *parent,
video_format_Copy(&vd->source, source);
vd->info = (vout_display_info_t){ };
vd->cfg = &osys->cfg;
- vd->pool = NULL;
vd->prepare = NULL;
vd->display = NULL;
vd->control = NULL;
More information about the vlc-commits
mailing list