/* FIXME: The order of setting property and display is important when 'use-tbm' is true. The reverse does not work */
gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(videosink), sink->display->overlay_surface_id);
- RET_VAL_IF(!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "display-geometry-method"),
- WEBRTC_ERROR_INVALID_OPERATION, "could not find 'display-geometry-method' property");
- RET_VAL_IF(!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "visible"),
- WEBRTC_ERROR_INVALID_OPERATION, "could not find 'visible' property");
+ if (!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "display-geometry-method")) {
+ LOG_ERROR("could not find 'display-geometry-method' property");
+ goto exit;
+ }
+ if (!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "visible")) {
+ LOG_ERROR("could not find 'visible' property");
+ goto exit;
+ }
} else if (sink->display->type == WEBRTC_DISPLAY_TYPE_EVAS) {
GstCaps *caps;
if (source->display->type == WEBRTC_DISPLAY_TYPE_OVERLAY ||
source->display->type == WEBRTC_DISPLAY_TYPE_ECORE_WL) {
gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(videosink), source->display->overlay_surface_id);
- RET_VAL_IF(!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "display-geometry-method"),
- WEBRTC_ERROR_INVALID_OPERATION, "could not find 'display-geometry-method' property");
- RET_VAL_IF(!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "visible"),
- WEBRTC_ERROR_INVALID_OPERATION, "could not find 'visible' property");
+ if (!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "display-geometry-method")) {
+ LOG_ERROR("could not find 'display-geometry-method' property");
+ goto exit;
+ }
+ if (!g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(videosink)), "visible")) {
+ LOG_ERROR("could not find 'visible' property");
+ goto exit;
+ }
g_object_set(G_OBJECT(videosink),
"display-geometry-method", (gint)source->display->mode, /* 0: letter box, 1: origin size, 2: full screen */
"visible", (gboolean)source->display->visible,