rpicamsrc: Add define and increase reported maximum FPS from 90 to 1000
authorJan Schmidt <jan@centricular.com>
Wed, 28 Mar 2018 11:00:10 +0000 (22:00 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 10 Jul 2020 15:46:18 +0000 (16:46 +0100)
sys/rpicamsrc/RaspiCapture.h
sys/rpicamsrc/gstrpicamsrc.c
sys/rpicamsrc/gstrpicamsrcdeviceprovider.c

index 053ae1c..571d3b7 100644 (file)
@@ -54,6 +54,8 @@
 #include "RaspiCamControl.h"
 #include "RaspiPreview.h"
 
+#define RPICAMSRC_MAX_FPS 1000
+
 GST_DEBUG_CATEGORY_EXTERN (gst_rpi_cam_src_debug);
 #define GST_CAT_DEFAULT gst_rpi_cam_src_debug
 
index 7cd369e..5b2532d 100644 (file)
@@ -1285,12 +1285,12 @@ gst_rpi_cam_src_get_caps (GstBaseSrc * bsrc, GstCaps * filter)
     if (gst_structure_has_name (s, "video/x-h264")) {
        gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 1, 1920, "height",
            GST_TYPE_INT_RANGE, 1, 1080, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
-           90, 1, NULL);
+           RPICAMSRC_MAX_FPS, 1, NULL);
     }
     else {
        gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 1, 3240, "height",
            GST_TYPE_INT_RANGE, 1, 2464, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
-           90, 1, NULL);
+           RPICAMSRC_MAX_FPS, 1, NULL);
     }
   }
 done:
index 387ee61..ff80832 100644 (file)
@@ -120,7 +120,7 @@ gst_rpi_cam_src_device_new (void)
   s = gst_structure_new ("video/x-h264",
       "width", GST_TYPE_INT_RANGE, 1, 1920,
       "height", GST_TYPE_INT_RANGE, 1, 1080,
-      "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 90, 1,
+      "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, RPICAMSRC_MAX_FPS, 1,
       "stream-format", G_TYPE_STRING, "byte-stream",
       "alignment", G_TYPE_STRING, "au",
       NULL);