mediafoundation: Disable querying supprted maximum resolution
authorSeungha Yang <seungha@centricular.com>
Tue, 21 Apr 2020 11:49:38 +0000 (20:49 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 28 Apr 2020 14:37:31 +0000 (14:37 +0000)
Initializing MFT for checking supported maximum resolution is too
slow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/760>

sys/mediafoundation/gstmfh264enc.cpp
sys/mediafoundation/gstmfh265enc.cpp

index 0eb3586622ae67de9e704bafd9806a1b026ded80..da5d4f58d006f5acbfd06847b30e56063863e9e2 100644 (file)
@@ -1232,6 +1232,10 @@ gst_mf_h264_enc_plugin_init_internal (GstPlugin * plugin, guint rank,
 
   GST_DEBUG_OBJECT (transform, "Check supported resolutions of %s",
       device_name);
+
+  /* FIXME: This would take so long time.
+   * Need to find smart way to find supported resolution*/
+#if 0
   for (i = 0; i < G_N_ELEMENTS (resolutions_to_check); i++) {
     guint width, height;
 
@@ -1259,6 +1263,10 @@ gst_mf_h264_enc_plugin_init_internal (GstPlugin * plugin, guint rank,
     GST_WARNING_OBJECT (transform, "Couldn't query supported resolution");
     goto done;
   }
+#else
+  /* FIXME: don't hardcode supported resolution */
+  max_width = max_height = 8192;
+#endif
 
   /* high profile supported since windows8 */
   src_caps = gst_caps_from_string ("video/x-h264, "
index a0d0d4aba831475924a9e6336acaa3b980cf16c5..ed11eda1ebc3480a6491b2c8df3e18582d0b50ea 100644 (file)
@@ -1003,6 +1003,9 @@ gst_mf_h265_enc_plugin_init_internal (GstPlugin * plugin, guint rank,
   if (!gst_mf_result (hr))
     goto done;
 
+  /* FIXME: This would take so long time.
+   * Need to find smart way to find supported resolution*/
+#if 0
   for (i = 0; i < G_N_ELEMENTS (resolutions_to_check); i++) {
     guint width, height;
 
@@ -1030,6 +1033,10 @@ gst_mf_h265_enc_plugin_init_internal (GstPlugin * plugin, guint rank,
     GST_WARNING_OBJECT (transform, "Couldn't query supported resolution");
     goto done;
   }
+#else
+  /* FIXME: don't hardcode supported resolution */
+  max_width = max_height = 8192;
+#endif
 
   src_caps = gst_caps_from_string ("video/x-h265, "
       "stream-format=(string) byte-stream, "