d3d11: Run indent
authorSeungha Yang <seungha@centricular.com>
Fri, 21 Oct 2022 17:48:23 +0000 (02:48 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 24 Oct 2022 12:42:51 +0000 (12:42 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>

subprojects/gst-plugins-bad/sys/d3d11/gstd3d11screencapturesrc.cpp
subprojects/gst-plugins-bad/sys/d3d11/gstd3d11winrtcapture.cpp

index 815a77c..c2d17d1 100644 (file)
@@ -276,8 +276,7 @@ gst_d3d11_screen_capture_src_class_init (GstD3D11ScreenCaptureSrcClass * klass)
 
   gst_element_class_set_static_metadata (element_class,
       "Direct3D11 screen capture src", "Source/Video",
-      "Captures desktop screen",
-      "Seungha Yang <seungha@centricular.com>");
+      "Captures desktop screen", "Seungha Yang <seungha@centricular.com>");
 
   caps = gst_d3d11_get_updated_template_caps (&template_caps);
   gst_element_class_add_pad_template (element_class,
@@ -911,21 +910,22 @@ gst_d3d11_screen_capture_src_start (GstBaseSrc * bsrc)
       break;
     case GST_D3D11_SCREEN_CAPTURE_FLOW_UNSUPPORTED:
 #ifdef HAVE_WINRT_CAPTURE
-    /* Try WinRT capture if DXGI capture does not work */
-    if (self->capture_api == GST_D3D11_SCREEN_CAPTURE_API_DXGI) {
-      self->capture_api = GST_D3D11_SCREEN_CAPTURE_API_WGC;
-      gst_clear_object (&capture);
-      GST_WARNING_OBJECT (self, "DXGI capture is not available");
-      capture = gst_d3d11_winrt_capture_new (self->device, monitor, nullptr);
-      if (capture && gst_d3d11_screen_capture_prepare (capture) == GST_FLOW_OK) {
-        GST_INFO_OBJECT (self, "Fallback to Windows Graphics Capture");
-        break;
+      /* Try WinRT capture if DXGI capture does not work */
+      if (self->capture_api == GST_D3D11_SCREEN_CAPTURE_API_DXGI) {
+        self->capture_api = GST_D3D11_SCREEN_CAPTURE_API_WGC;
+        gst_clear_object (&capture);
+        GST_WARNING_OBJECT (self, "DXGI capture is not available");
+        capture = gst_d3d11_winrt_capture_new (self->device, monitor, nullptr);
+        if (capture
+            && gst_d3d11_screen_capture_prepare (capture) == GST_FLOW_OK) {
+          GST_INFO_OBJECT (self, "Fallback to Windows Graphics Capture");
+          break;
+        }
       }
-    }
 #endif
-    goto unsupported;
-  default:
-    goto error;
+      goto unsupported;
+    default:
+      goto error;
   }
 
   if (self->capture_api == GST_D3D11_SCREEN_CAPTURE_API_DXGI &&
index 7d6f0d1..3c2c2cb 100644 (file)
@@ -683,8 +683,8 @@ gst_d3d11_winrt_capture_thread_func (GstD3D11WinRTCapture * self)
     /* hold list of capture objects to send target window closed event */
     AcquireSRWLockExclusive (&capture_list_lock);
     g_object_weak_ref (G_OBJECT (self),
-      (GWeakNotify) gst_d3d11_winrt_capture_weak_ref_notify, nullptr);
-      capture_list = g_list_append (capture_list, self);
+        (GWeakNotify) gst_d3d11_winrt_capture_weak_ref_notify, nullptr);
+    capture_list = g_list_append (capture_list, self);
     ReleaseSRWLockExclusive (&capture_list_lock);
 
     self->hidden_window = gst_d3d11_winrt_create_hidden_window (self);
@@ -908,8 +908,7 @@ again:
   if (size.Width != self->pool_size.Width ||
       size.Height != self->pool_size.Height) {
     GST_DEBUG_OBJECT (self, "Size changed %dx%d -> %dx%d",
-        self->pool_size.Width, self->pool_size.Height,
-        size.Width, size.Height);
+        self->pool_size.Width, self->pool_size.Height, size.Width, size.Height);
     self->pool_size = size;
     frame = nullptr;
     hr = inner->pool->Recreate (inner->d3d_device.Get (),
@@ -989,4 +988,3 @@ gst_d3d11_winrt_capture_new (GstD3D11Device * device, HMONITOR monitor_handle,
 
   return GST_D3D11_SCREEN_CAPTURE_CAST (self);
 }
-