vlc | branch: master | Steve Lhomme <[email protected]> | Fri May 24 15:22:35 2019 +0200| [7a796c310fd68e038695111d1f14db486d6f3354] | committer: Steve Lhomme
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. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a796c310fd68e038695111d1f14db486d6f3354 --- modules/video_output/Makefile.am | 2 ++ modules/video_output/wextern.c | 53 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am index d9a2488ad4..7983d3637b 100644 --- a/modules/video_output/Makefile.am +++ b/modules/video_output/Makefile.am @@ -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 diff --git a/modules/video_output/wextern.c b/modules/video_output/wextern.c new file mode 100644 index 0000000000..eab44854cd --- /dev/null +++ b/modules/video_output/wextern.c @@ -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() _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
