libvlc: pass the select_plane/frame_metadata callback to OpenGL as well

So we have the same prototype between OpenGL and D3D setup functions.
This commit is contained in:
Steve Lhomme 2020-02-04 15:40:02 +01:00
parent 42edb35888
commit 5bbae6d818
4 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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 );

View File

@ -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;
}