[vlc-devel] [PATCH] picture_t: add the possibility to copy pixels another way than through planes
Rémi Denis-Courmont
remi at remlab.net
Mon Apr 20 15:55:59 CEST 2015
Le 2015-04-20 16:27, Steve Lhomme a écrit :
> --
> in the case of D3D9 surfaces, we copy pixels between the internal GPU
> surfaces
> ---
> include/vlc_picture.h | 1 +
> src/misc/picture.c | 3 +++
> 2 files changed, 4 insertions(+)
>
> diff --git a/include/vlc_picture.h b/include/vlc_picture.h
> index d3e3b99..393f17f 100644
> --- a/include/vlc_picture.h
> +++ b/include/vlc_picture.h
> @@ -98,6 +98,7 @@ struct picture_t
> /** Private data - the video output plugin might want to put
> stuff here to
> * keep track of the picture */
> picture_sys_t * p_sys;
> + void (*pf_copy_private)( picture_t *p_dst, picture_t *p_src );
>
> /** This way the picture_Release can be overloaded */
> struct
> diff --git a/src/misc/picture.c b/src/misc/picture.c
> index 1785d3d..8064346 100644
> --- a/src/misc/picture.c
> +++ b/src/misc/picture.c
> @@ -360,6 +360,7 @@ void picture_CopyProperties( picture_t *p_dst,
> const picture_t *p_src )
> p_dst->b_progressive = p_src->b_progressive;
> p_dst->i_nb_fields = p_src->i_nb_fields;
> p_dst->b_top_field_first = p_src->b_top_field_first;
> + p_dst->pf_copy_private = p_src->pf_copy_private;
You can't know how the source and destination picture have been
allocated the same way. So you do not know the meaning of the
p_sys/gc.p_sys, nor the context. Thus, the generic parameters and the
planes are the only thing that you can conceivably copy. So I don't see
a point.
Also copying callbacks is dubious w.r.t. plugin instance life cycle.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list