rpicamsrc: Add define and increase reported maximum FPS from 90 to 1000

This commit is contained in:
Jan Schmidt 2018-03-28 22:00:10 +11:00 committed by Tim-Philipp Müller
parent cab6585378
commit 93bd8c34ed
3 changed files with 5 additions and 3 deletions

View file

@ -54,6 +54,8 @@
#include "RaspiCamControl.h" #include "RaspiCamControl.h"
#include "RaspiPreview.h" #include "RaspiPreview.h"
#define RPICAMSRC_MAX_FPS 1000
GST_DEBUG_CATEGORY_EXTERN (gst_rpi_cam_src_debug); GST_DEBUG_CATEGORY_EXTERN (gst_rpi_cam_src_debug);
#define GST_CAT_DEFAULT gst_rpi_cam_src_debug #define GST_CAT_DEFAULT gst_rpi_cam_src_debug

View file

@ -1285,12 +1285,12 @@ gst_rpi_cam_src_get_caps (GstBaseSrc * bsrc, GstCaps * filter)
if (gst_structure_has_name (s, "video/x-h264")) { if (gst_structure_has_name (s, "video/x-h264")) {
gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 1, 1920, "height", 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, GST_TYPE_INT_RANGE, 1, 1080, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
90, 1, NULL); RPICAMSRC_MAX_FPS, 1, NULL);
} }
else { else {
gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 1, 3240, "height", 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, GST_TYPE_INT_RANGE, 1, 2464, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
90, 1, NULL); RPICAMSRC_MAX_FPS, 1, NULL);
} }
} }
done: done:

View file

@ -120,7 +120,7 @@ gst_rpi_cam_src_device_new (void)
s = gst_structure_new ("video/x-h264", s = gst_structure_new ("video/x-h264",
"width", GST_TYPE_INT_RANGE, 1, 1920, "width", GST_TYPE_INT_RANGE, 1, 1920,
"height", GST_TYPE_INT_RANGE, 1, 1080, "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", "stream-format", G_TYPE_STRING, "byte-stream",
"alignment", G_TYPE_STRING, "au", "alignment", G_TYPE_STRING, "au",
NULL); NULL);