mirror of https://code.videolan.org/videolan/vlc
video_output: add a wextern window which doesn't let the core resize it
Instead the display module can call vout_window_ReportSize() on its behalf.
This commit is contained in:
parent
38319885e7
commit
7a796c310f
|
@ -477,6 +477,7 @@ libvdummy_plugin_la_SOURCES = video_output/vdummy.c
|
|||
libvideo_splitter_plugin_la_SOURCES = video_output/splitter.c
|
||||
libvmem_plugin_la_SOURCES = video_output/vmem.c
|
||||
libwdummy_plugin_la_SOURCES = video_output/wdummy.c
|
||||
libwextern_plugin_la_SOURCES = video_output/wextern.c
|
||||
libyuv_plugin_la_SOURCES = video_output/yuv.c
|
||||
libvgl_plugin_la_SOURCES = video_output/vgl.c
|
||||
|
||||
|
@ -486,5 +487,6 @@ vout_LTLIBRARIES += \
|
|||
libvideo_splitter_plugin.la \
|
||||
libvmem_plugin.la \
|
||||
libwdummy_plugin.la \
|
||||
libwextern_plugin.la \
|
||||
libvgl_plugin.la \
|
||||
libyuv_plugin.la
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* @file wextern.c
|
||||
* @brief Dummy video window provider where the size is handled externally
|
||||
*/
|
||||
/*****************************************************************************
|
||||
* Copyright © 2019 VideoLabs, VideoLAN and VideoLAN Authors
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <vlc_common.h>
|
||||
#include <vlc_plugin.h>
|
||||
#include <vlc_vout_window.h>
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
// .resize: don't let the core resize us on zoom/crop/ar changes
|
||||
// the display module should do the ReportSize for us
|
||||
};
|
||||
|
||||
static int Open(vout_window_t *wnd)
|
||||
{
|
||||
wnd->type = VOUT_WINDOW_TYPE_DUMMY;
|
||||
wnd->ops = &ops;
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
vlc_module_begin()
|
||||
set_shortname(N_("Callback window"))
|
||||
set_description(N_("External callback window"))
|
||||
set_category(CAT_VIDEO)
|
||||
set_subcategory(SUBCAT_VIDEO_VOUT)
|
||||
set_capability("vout window", 0)
|
||||
set_callbacks(Open, NULL)
|
||||
add_shortcut("dummy")
|
||||
vlc_module_end()
|
Loading…
Reference in New Issue