[libcamera-devel] [RFC PATCH 6/6] gst: utils: Add framerate to caps

Nicolas Dufresne nicolas at ndufresne.ca
Tue Mar 16 22:04:21 CET 2021


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 at 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);
>  




More information about the libcamera-devel mailing list