vlc | branch: master | Steve Lhomme <[email protected]> | Tue Feb 4 13:16:02 2020 +0100| [ec28698a489f7167b78c8d6ac06fdc83003cf784] | committer: Steve Lhomme
libvlc: merge direct3d_start_end_rendering_cb and makeCurrent_cb They have the same prototype and serve the same purpose. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec28698a489f7167b78c8d6ac06fdc83003cf784 --- include/vlc/libvlc_media_player.h | 49 ++++++++++++++------------------- lib/media_player.c | 2 +- modules/video_output/win32/direct3d11.c | 2 +- modules/video_output/win32/direct3d9.c | 2 +- 4 files changed, 24 insertions(+), 31 deletions(-) diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h index 1d3870c08e..94a939c3a1 100644 --- a/include/vlc/libvlc_media_player.h +++ b/include/vlc/libvlc_media_player.h @@ -541,12 +541,29 @@ typedef void (*libvlc_video_update_output_cb)(void* opaque, unsigned width, unsi typedef void (*libvlc_video_swap_cb)(void* opaque); /** - * Callback prototype to set up the OpenGL context for rendering + * Callback prototype to set up the OpenGL context for rendering. + * Tell the host the rendering is about to start/has finished. * - * \param opaque private pointer passed to the @a libvlc_video_set_output_callbacks() [IN] + * \param opaque private pointer passed to the @a libvlc_video_set_output_callbacks() or + * @a libvlc_video_direct3d_device_setup_cb() [IN] * \param enter true to set the context as current, false to unset it [IN] * \return true on success * \version LibVLC 4.0.0 or later + * + * On Direct3D11 the following may change on the provided ID3D11DeviceContext* + * between \ref enter being true and \ref enter being false: + * - IASetPrimitiveTopology() + * - IASetInputLayout() + * - IASetVertexBuffers() + * - IASetIndexBuffer() + * - VSSetConstantBuffers() + * - VSSetShader() + * - PSSetSamplers() + * - PSSetConstantBuffers() + * - PSSetShaderResources() + * - PSSetShader() + * - RSSetViewports() + * - DrawIndexed() */ typedef bool (*libvlc_video_makeCurrent_cb)(void* opaque, bool enter); @@ -739,30 +756,6 @@ typedef bool( *libvlc_video_direct3d_update_output_cb )( void *opaque, const libvlc_video_direct3d_cfg_t *cfg, libvlc_video_output_cfg_t *output ); -/** Tell the host the rendering is about to start/has finished. - * - * \param opaque private pointer set on the opaque parameter of @a libvlc_video_direct3d_device_setup_cb() [IN] - * \param enter true if the rendering is about to start, false if it's finished - * \return true on success - * \version LibVLC 4.0.0 or later - * - * On Direct3D11 the following may change on the provided ID3D11DeviceContext* - * between \ref enter being true and \ref enter being false: - * - IASetPrimitiveTopology() - * - IASetInputLayout() - * - IASetVertexBuffers() - * - IASetIndexBuffer() - * - VSSetConstantBuffers() - * - VSSetShader() - * - PSSetSamplers() - * - PSSetConstantBuffers() - * - PSSetShaderResources() - * - PSSetShader() - * - RSSetViewports() - * - DrawIndexed() - */ -typedef bool( *libvlc_video_direct3d_start_end_rendering_cb )( void *opaque, bool enter ); - /** Tell the host the rendering for the given plane is about to start * * \param opaque private pointer set on the opaque parameter of @a libvlc_video_direct3d_device_setup_cb() [IN] @@ -774,7 +767,7 @@ typedef bool( *libvlc_video_direct3d_start_end_rendering_cb )( void *opaque, boo * * The host should call OMSetRenderTargets for Direct3D11. If this callback is * not used (set to NULL in @a libvlc_video_direct3d_set_callbacks()) OMSetRenderTargets - * has to be set during the @a libvlc_video_direct3d_start_end_rendering_cb() + * has to be set during the @a libvlc_video_makeCurrent_cb() * entering call. * * The number of planes depend on the DXGI_FORMAT returned during the @@ -814,7 +807,7 @@ bool libvlc_video_direct3d_set_callbacks( libvlc_media_player_t *mp, libvlc_video_direct3d_set_resize_cb resize_cb, libvlc_video_direct3d_update_output_cb update_output_cb, libvlc_video_swap_cb swap_cb, - libvlc_video_direct3d_start_end_rendering_cb makeCurrent_cb, + libvlc_video_makeCurrent_cb makeCurrent_cb, libvlc_video_frameMetadata_cb metadata_cb, libvlc_video_direct3d_select_plane_cb select_plane_cb, void* opaque ); diff --git a/lib/media_player.c b/lib/media_player.c index 9fa894ed8e..2ea8e15cef 100644 --- a/lib/media_player.c +++ b/lib/media_player.c @@ -1080,7 +1080,7 @@ bool libvlc_video_direct3d_set_callbacks(libvlc_media_player_t *mp, libvlc_video_direct3d_set_resize_cb resize_cb, libvlc_video_direct3d_update_output_cb update_output_cb, libvlc_video_swap_cb swap_cb, - libvlc_video_direct3d_start_end_rendering_cb makeCurrent_cb, + libvlc_video_makeCurrent_cb makeCurrent_cb, libvlc_video_frameMetadata_cb metadata_cb, libvlc_video_direct3d_select_plane_cb select_plane_cb, void *opaque) diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c index 64adc7d09a..0e83b844b5 100644 --- a/modules/video_output/win32/direct3d11.c +++ b/modules/video_output/win32/direct3d11.c @@ -122,7 +122,7 @@ struct vout_display_sys_t void *outside_opaque; libvlc_video_direct3d_update_output_cb updateOutputCb; libvlc_video_swap_cb swapCb; - libvlc_video_direct3d_start_end_rendering_cb startEndRenderingCb; + libvlc_video_makeCurrent_cb startEndRenderingCb; libvlc_video_frameMetadata_cb sendMetadataCb; libvlc_video_direct3d_select_plane_cb selectPlaneCb; }; diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c index 8878054b9c..552e7dcef1 100644 --- a/modules/video_output/win32/direct3d9.c +++ b/modules/video_output/win32/direct3d9.c @@ -173,7 +173,7 @@ struct vout_display_sys_t void *outside_opaque; libvlc_video_direct3d_update_output_cb updateOutputCb; libvlc_video_swap_cb swapCb; - libvlc_video_direct3d_start_end_rendering_cb startEndRenderingCb; + libvlc_video_makeCurrent_cb startEndRenderingCb; }; /* */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
