[vlc-commits] libvlc: pass the select_plane/frame_metadata callback to OpenGL as well
Steve Lhomme
git at videolan.org
Mon Feb 10 09:07:11 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 4 15:40:02 2020 +0100| [5bbae6d818bebfde901fffb62a3b35b9a1cc646b] | committer: Steve Lhomme
libvlc: pass the select_plane/frame_metadata callback to OpenGL as well
So we have the same prototype between OpenGL and D3D setup functions.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5bbae6d818bebfde901fffb62a3b35b9a1cc646b
---
doc/libvlc/QtGL/qtvlcwidget.cpp | 2 +-
doc/libvlc/sdl_opengl_player.cpp | 2 +-
include/vlc/libvlc_media_player.h | 4 ++++
lib/media_player.c | 4 ++++
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/libvlc/QtGL/qtvlcwidget.cpp b/doc/libvlc/QtGL/qtvlcwidget.cpp
index db48bb571e..bf62116791 100644
--- a/doc/libvlc/QtGL/qtvlcwidget.cpp
+++ b/doc/libvlc/QtGL/qtvlcwidget.cpp
@@ -172,7 +172,7 @@ bool QtVLCWidget::playMedia(const char* url)
// Define the opengl rendering callbacks
libvlc_video_set_output_callbacks(m_mp, libvlc_video_engine_opengl,
VLCVideo::setup, VLCVideo::cleanup, nullptr, VLCVideo::resizeRenderTextures, VLCVideo::swap,
- VLCVideo::make_current, VLCVideo::get_proc_address,
+ VLCVideo::make_current, VLCVideo::get_proc_address, nullptr, nullptr,
mVLC);
// Play the video
diff --git a/doc/libvlc/sdl_opengl_player.cpp b/doc/libvlc/sdl_opengl_player.cpp
index f40fca99e2..ba6b4be872 100644
--- a/doc/libvlc/sdl_opengl_player.cpp
+++ b/doc/libvlc/sdl_opengl_player.cpp
@@ -81,7 +81,7 @@ public:
// Define the opengl rendering callbacks
libvlc_video_set_output_callbacks(m_mp, libvlc_video_engine_opengl,
setup, cleanup, nullptr, resize, swap,
- make_current, get_proc_address,
+ make_current, get_proc_address, nullptr, nullptr,
this);
// Play the video
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 6610dced5c..9dc0056abf 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -730,6 +730,8 @@ typedef bool( *libvlc_video_output_select_plane_cb )( void *opaque, size_t plane
* \param swap_cb callback called after rendering a video frame (cannot be NULL)
* \param makeCurrent_cb callback called to enter/leave the opengl context (cannot be NULL for \ref libvlc_video_engine_opengl and for \ref libvlc_video_engine_gles2)
* \param getProcAddress_cb opengl function loading callback (cannot be NULL for \ref libvlc_video_engine_opengl and for \ref libvlc_video_engine_gles2)
+ * \param metadata_cb callback to provide frame metadata (D3D11 only)
+ * \param select_plane_cb callback to select different D3D11 rendering targets
* \param opaque private pointer passed to callbacks
*
* \retval true engine selected and callbacks set
@@ -746,6 +748,8 @@ bool libvlc_video_set_output_callbacks( libvlc_media_player_t *mp,
libvlc_video_swap_cb swap_cb,
libvlc_video_makeCurrent_cb makeCurrent_cb,
libvlc_video_getProcAddress_cb getProcAddress_cb,
+ libvlc_video_frameMetadata_cb metadata_cb,
+ libvlc_video_output_select_plane_cb select_plane_cb,
void* opaque );
diff --git a/lib/media_player.c b/lib/media_player.c
index aa24872b78..1ee29b9602 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1041,6 +1041,8 @@ bool libvlc_video_set_output_callbacks(libvlc_media_player_t *mp,
libvlc_video_swap_cb swap_cb,
libvlc_video_makeCurrent_cb makeCurrent_cb,
libvlc_video_getProcAddress_cb getProcAddress_cb,
+ libvlc_video_frameMetadata_cb metadata_cb,
+ libvlc_video_output_select_plane_cb select_plane_cb,
void *opaque)
{
#ifdef __ANDROID__
@@ -1071,6 +1073,8 @@ bool libvlc_video_set_output_callbacks(libvlc_media_player_t *mp,
var_SetAddress( mp, "vout-cb-swap", swap_cb );
var_SetAddress( mp, "vout-cb-get-proc-address", getProcAddress_cb );
var_SetAddress( mp, "vout-cb-make-current", makeCurrent_cb );
+ var_SetAddress( mp, "vout-cb-metadata", metadata_cb );
+ var_SetAddress( mp, "vout-cb-select-plane", select_plane_cb );
return true;
}
More information about the vlc-commits
mailing list