[vlc-devel] [PATCH 08/10] vout: keep vout_thread_sys_t private

Steve Lhomme robux4 at ycbcr.xyz
Thu Jul 16 16:13:04 CEST 2020


On 2020-07-16 16:02, Alexandre Janniaux wrote:
> Hi,
> 
> There is only one vout_thread_sys_t and it's not used in
> C++ code so keeping it as a forward declaration is much
> more convenient.
> 
>          struct vout_thread_sys_t *p;

I remove it in patch 10/10.

> Regards,
> --
> Alexandre Janniaux
> Videolabs
> 
> On Thu, Jul 16, 2020 at 03:58:06PM +0200, Steve Lhomme wrote:
>> ---
>>   include/vlc_vout.h               | 7 +------
>>   src/video_output/video_output.c  | 2 +-
>>   src/video_output/vout_internal.h | 5 ++++-
>>   3 files changed, 6 insertions(+), 8 deletions(-)
>>
>> diff --git a/include/vlc_vout.h b/include/vlc_vout.h
>> index adfc15a0f0d..2903dda346c 100644
>> --- a/include/vlc_vout.h
>> +++ b/include/vlc_vout.h
>> @@ -44,11 +44,6 @@
>>    * Video output thread interface
>>    */
>>
>> -/**
>> - * Video output thread private structure
>> - */
>> -typedef struct vout_thread_sys_t vout_thread_sys_t;
>> -
>>   /**
>>    * Video output thread descriptor
>>    *
>> @@ -60,7 +55,7 @@ struct vout_thread_t {
>>       struct vlc_object_t obj;
>>
>>       /* Private vout_thread data */
>> -    vout_thread_sys_t *p;
>> +    void *p;
>>   };
>>
>>   /* Alignment flags */
>> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
>> index 4d8e7068952..f72f59df266 100644
>> --- a/src/video_output/video_output.c
>> +++ b/src/video_output/video_output.c
>> @@ -1889,7 +1889,7 @@ static vout_thread_t *vout_CreateCommon(vlc_object_t *object)
>>   {
>>       /* Allocate descriptor */
>>       vout_thread_t *vout = vlc_custom_create(object,
>> -                                            sizeof(*vout) + sizeof(*vout->p),
>> +                                            sizeof(*vout) + sizeof(vout_thread_sys_t),
>>                                               "video output");
>>       if (!vout)
>>           return NULL;
>> diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
>> index 1ce5550db6f..106c48ca0d0 100644
>> --- a/src/video_output/vout_internal.h
>> +++ b/src/video_output/vout_internal.h
>> @@ -60,7 +60,10 @@ enum vout_crop_mode {
>>       VOUT_CROP_NONE, VOUT_CROP_RATIO, VOUT_CROP_WINDOW, VOUT_CROP_BORDER,
>>   };
>>
>> -/* */
>> +/**
>> + * Video output thread private structure
>> + */
>> +typedef struct vout_thread_sys_t vout_thread_sys_t;
>>   struct vout_thread_sys_t
>>   {
>>       bool dummy;
>> --
>> 2.26.2
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list