excludes videosink glimagesink from using ZOOMFIX (if present)

This commit is contained in:
fduncanh
2021-09-30 15:54:57 -04:00
parent 8dbbb96bed
commit a74a8f8a31
2 changed files with 25 additions and 9 deletions

View File

@@ -180,15 +180,22 @@ plugin for Intel graphics is *NOT* installed (**uninstall it** if it is installe
"-vs ximagesink" or "-vs xvimagesink", to see if this fixes the problem, or "-vs vaapisink" to see if this
reproduces the problem.)
If you ran cmake with "-DZOOMFIX=ON", check if the problem is still there without ZOOMFIX.
ZOOMFIX does not fix the Zoom recognition issue for the OpenGL plugin glimagesink when it is running under X11,
and is specifically not used if uxplay is invoked using "-vs glimagesink". Please report, as an "issue" at
[https://github.com/FDH2/UxPlay](https://github.com/FDH2/UxPlay) ,
any plugins that are broken
by ZOOMFIX, but work without it, so they can be added to the list of videosinks that don't use ZOOMFIX when it is available.
If your mirror window has no title showing, the "ZOOMFIX" will not work.
The window is created by GStreamer, using a videosink that the default "autovideosink"
has chosen for you. Maybe an unusual videosink was chosen. Fix: use the -vs option to make your own choice of videosink:
"-vs xvimagesink" or "-vs ximagesink" will create windows with titles on displays managed by X11. Note that ZOOMFIX is a fix for a
problem specific to X11 windows (or possibly other window types (Wayland ?) in an X11-compatibility mode). Non-X11 windows (such
as OpenGL windows created by the videosink glimagesink) may be visible on Zoom without any fix (note that glimagesink has some
problems, and may or may not work on your system).
problem specific to X11 windows (or possibly other window types (Wayland ?) in an X11-compatibility mode).
The "OpenGL renderer" window created by glimagesink sometimes does not close properly when its "close" button is clicked.
(this is a GStreamer issue). You may need to terminate uxplay with Ctrl-C to close a "zombie" OpenGl window.
# **Usage:**

View File

@@ -152,9 +152,18 @@ video_renderer_t *video_renderer_init(logger_t *logger, const char *server_name,
#ifdef X_DISPLAY_FIX
renderer->server_name = server_name;
renderer->gst_window = calloc(1, sizeof(X11_Window_t));
assert(renderer->gst_window);
get_X11_Display(renderer->gst_window);
bool x_display_fix = true;
if (videosink) {
/* X_DISPLAY_FIX doesn't work with glimagesink*/
/* list excluded videosinks: */
if (strcmp(videosink,"0") == 0) x_display_fix = false;
if (strcmp(videosink,"glimagesink") == 0) x_display_fix = false;
}
if (x_display_fix) {
renderer->gst_window = calloc(1, sizeof(X11_Window_t));
assert(renderer->gst_window);
get_X11_Display(renderer->gst_window);
}
#endif
return renderer;
}
@@ -177,7 +186,7 @@ void video_renderer_render_buffer(video_renderer_t *renderer, raop_ntp_t *ntp, u
gst_app_src_push_buffer (GST_APP_SRC(renderer->appsrc), buffer);
#ifdef X_DISPLAY_FIX
if(!(renderer->gst_window->window)) {
if(renderer->gst_window && !(renderer->gst_window->window)) {
fix_x_window_name(renderer->gst_window, renderer->server_name);
}
#endif
@@ -192,7 +201,7 @@ void video_renderer_destroy(video_renderer_t *renderer) {
gst_element_set_state (renderer->pipeline, GST_STATE_NULL);
if(renderer->pipeline) gst_object_unref (renderer->pipeline);
#ifdef X_DISPLAY_FIX
free(renderer->gst_window);
if(renderer->gst_window) free(renderer->gst_window);
#endif
if (renderer) {
free(renderer);