[vlc-devel] [PATCH 03/18] libvlc: make the OpenGL host tell the rendering colorimetry it's using
    Steve Lhomme 
    robux4 at ycbcr.xyz
       
    Wed Feb  5 13:03:06 CET 2020
    
    
  
On 2020-02-04 19:52, Rémi Denis-Courmont wrote:
> Le tiistaina 4. helmikuuta 2020, 17.25.58 EET Steve Lhomme a écrit :
>> diff --git a/include/vlc/libvlc_media_player.h
>> b/include/vlc/libvlc_media_player.h index 70970f8c104..940059f044d 100644
>> --- a/include/vlc/libvlc_media_player.h
>> +++ b/include/vlc/libvlc_media_player.h
>> @@ -521,15 +521,29 @@ typedef bool (*libvlc_video_setup_cb)(void* opaque);
>>    */
>>   typedef void (*libvlc_video_cleanup_cb)(void* opaque);
>>
>> +typedef struct
>> +{
>> +    int surface_format;  /** the rendering DXGI_FORMAT for \ref
>> libvlc_video_direct3d_engine_d3d11,
>> +                          D3DFORMAT
>> for \ref libvlc_video_direct3d_engine_d3d9, +
>> GL_RGBA or GL_RGB for \ref libvlc_video_engine_opengl and +
>>           for \ref libvlc_video_engine_gles2 */
> 
> How do we know that 'int' works for all rendering APIs?
It does for all API's we support now.
If your question is about future API's (Vulkan, Metal, whatever) there's 
no guarantee it's not needing a 512-byte structure. We can't predict the 
future. But it's unlikely a surface format will use anything other than 
an enum or a FourCC.
We may version the structures we read/write in the API so we can add 
fields in the future if necessary. But IMO it's overkill.
    
    
More information about the vlc-devel
mailing list