Message ID | 20210316155211.6679-7-m.cichy@pengutronix.de |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Le mardi 16 mars 2021 à 16:52 +0100, Marian Cichy a écrit : > The framerate of a stream is the inverse of the frame interval from the > stream configuration. > > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de> > --- > src/gstreamer/gstlibcamera-utils.cpp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/gstreamer/gstlibcamera-utils.cpp > b/src/gstreamer/gstlibcamera-utils.cpp > index 61370d5f..7516f84a 100644 > --- a/src/gstreamer/gstlibcamera-utils.cpp > +++ b/src/gstreamer/gstlibcamera-utils.cpp > @@ -125,6 +125,8 @@ gst_libcamera_stream_configuration_to_caps(const > StreamConfiguration &stream_cfg > gst_structure_set(s, > "width", G_TYPE_INT, stream_cfg.size.width, > "height", G_TYPE_INT, stream_cfg.size.height, > + "framerate", GST_TYPE_FRACTION, > stream_cfg.frameInterval.denominator, > + stream_cfg.frameInterv > al.numerator, So only fixed sizes can have a framerate ? What about the size ranges ? Do we expect backend to repeat the sizes in order to offer multiple rate ? > nullptr); > gst_caps_append_structure(caps, s); >
diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp index 61370d5f..7516f84a 100644 --- a/src/gstreamer/gstlibcamera-utils.cpp +++ b/src/gstreamer/gstlibcamera-utils.cpp @@ -125,6 +125,8 @@ gst_libcamera_stream_configuration_to_caps(const StreamConfiguration &stream_cfg gst_structure_set(s, "width", G_TYPE_INT, stream_cfg.size.width, "height", G_TYPE_INT, stream_cfg.size.height, + "framerate", GST_TYPE_FRACTION, stream_cfg.frameInterval.denominator, + stream_cfg.frameInterval.numerator, nullptr); gst_caps_append_structure(caps, s);
The framerate of a stream is the inverse of the frame interval from the stream configuration. Signed-off-by: Marian Cichy <m.cichy@pengutronix.de> --- src/gstreamer/gstlibcamera-utils.cpp | 2 ++ 1 file changed, 2 insertions(+)