[vlc-devel] [PATCH 1/8] vout display: add an API to handle surface rendering through a callback

Steve Lhomme robux4 at ycbcr.xyz
Tue May 7 08:34:43 CEST 2019


On 2019-05-06 17:06, Rémi Denis-Courmont wrote:
> Le maanantaina 6. toukokuuta 2019, 16.01.30 EEST Steve Lhomme a écrit :
>> The callbacks will be used by D3D but could also be used by other rendering
>> engines.
>> ---
>>   include/vlc_vout_display.h | 27 +++++++++++++++++++++++++++
>>   1 file changed, 27 insertions(+)
>>
>> diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
>> index bdae03881c..7b2c9cf0d3 100644
>> --- a/include/vlc_vout_display.h
>> +++ b/include/vlc_vout_display.h
>> @@ -455,5 +455,32 @@ VLC_API void
>> vout_display_PlacePicture(vout_display_place_t *place, const video_ void
>> vout_display_TranslateMouseState(vout_display_t *vd, vlc_mouse_t *video,
>> const vlc_mouse_t *window);
>>
>> +/*** rendering to external surfaces ***/
>> +typedef struct
>> +{
>> +    bool hardware_decoding; /** set if D3D11_CREATE_DEVICE_VIDEO_SUPPORT is
>> needed */ +} vlc_video_surface_device_cfg_t;
>> +
>> +typedef struct
>> +{
>> +    void *device_context; /** ID3D11DeviceContext* for D3D11,
>> IDirect3DDevice9* for D3D9 */ +} vlc_video_surface_device_setup_t;
>> +
>> +typedef struct
>> +{
>> +    unsigned width, height;
>> +} vlc_video_surface_cfg_t;
>> +
>> +typedef struct
>> +{
>> +    intptr_t          surface_format; /* DXGI_FORMAT for D3D11, D3DFORMAT
>> for D3D9 */ +} video_surface_output_cfg_t;
>> +
>> +typedef bool( *vlc_video_surface_device_setup_cb )( void *opaque, const
>> vlc_video_surface_device_cfg_t *cfg, vlc_video_surface_device_setup_t *out
>> ); +typedef void( *vlc_video_surface_device_cleanup_cb )( void *opaque );
>> +typedef bool( *vlc_video_surface_update_output_cb )( void *opaque, const
>> vlc_video_surface_cfg_t *cfg, video_surface_output_cfg_t *output );
>> +typedef void( *vlc_video_swap_cb )( void* opaque );
>> +typedef bool( *vlc_video_surface_start_rendering_cb )( void *opaque, bool
>> enter );
> How does the application track per-surface private data here?

There's currently no support for rendering multiple tracks in a target, 
be it OpenGL, Direct3D, HWND, NSView. That would be another topic/task.

>
>> +
>>   /** @} */
>>   #endif /* VLC_VOUT_DISPLAY_H */
>
> -- 
> レミ・デニ-クールモン
> http://www.remlab.net/
>
>
>
> _______________________________________________
> 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