| Message ID | 20260908073640.39654-3-barnabas.pocze@ideasonboard.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
Quoting Barnabás Pőcze (2026-09-08 08:36:40) > Adjust the formatting of how a `StreamConfiguration` is formatted to a stream. > Specifically, print the `frameSize` and `stride` members in a format similar > to how it is done for `V4L2DeviceFormat`. > > Example: > > configuring streams: (0) 640x480-YUYV[614400/1280]/Rec709/Rec709/Rec601/Limited So the previous two make this easy: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > src/libcamera/stream.cpp | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp > index be0c80cbcf..af730ff8a5 100644 > --- a/src/libcamera/stream.cpp > +++ b/src/libcamera/stream.cpp > @@ -407,8 +407,9 @@ std::string StreamConfiguration::toString() const > */ > std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg) > { > - out << cfg.size << "-" << cfg.pixelFormat << "/" > - << ColorSpace::toString(cfg.colorSpace); > + out << cfg.size << '-' << cfg.pixelFormat > + << '[' << cfg.frameSize << '/' << cfg.stride << ']' what happens on multi-planar formats here with stride though ? Or do I recall we still only have a single stride value in the StreamConfiguration ? > + << '/' << ColorSpace::toString(cfg.colorSpace); > return out; > } > > -- > 2.55.0 >
2026. 09. 08. 12:41 keltezéssel, Kieran Bingham írta: > Quoting Barnabás Pőcze (2026-09-08 08:36:40) >> Adjust the formatting of how a `StreamConfiguration` is formatted to a stream. >> Specifically, print the `frameSize` and `stride` members in a format similar >> to how it is done for `V4L2DeviceFormat`. >> >> Example: >> >> configuring streams: (0) 640x480-YUYV[614400/1280]/Rec709/Rec709/Rec601/Limited > > So the previous two make this easy: > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > >> >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >> --- >> src/libcamera/stream.cpp | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp >> index be0c80cbcf..af730ff8a5 100644 >> --- a/src/libcamera/stream.cpp >> +++ b/src/libcamera/stream.cpp >> @@ -407,8 +407,9 @@ std::string StreamConfiguration::toString() const >> */ >> std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg) >> { >> - out << cfg.size << "-" << cfg.pixelFormat << "/" >> - << ColorSpace::toString(cfg.colorSpace); >> + out << cfg.size << '-' << cfg.pixelFormat >> + << '[' << cfg.frameSize << '/' << cfg.stride << ']' > > what happens on multi-planar formats here with stride though ? Or do I > recall we still only have a single stride value in the > StreamConfiguration ? `StreamConfiguration` can only provide these details about the first plane, it's an unfortunate deficiency that should be addressed at some point. > >> + << '/' << ColorSpace::toString(cfg.colorSpace); >> return out; >> } >> >> -- >> 2.55.0 >>
Quoting Barnabás Pőcze (2026-09-08 11:43:01) > 2026. 09. 08. 12:41 keltezéssel, Kieran Bingham írta: > > Quoting Barnabás Pőcze (2026-09-08 08:36:40) > >> Adjust the formatting of how a `StreamConfiguration` is formatted to a stream. > >> Specifically, print the `frameSize` and `stride` members in a format similar > >> to how it is done for `V4L2DeviceFormat`. > >> > >> Example: > >> > >> configuring streams: (0) 640x480-YUYV[614400/1280]/Rec709/Rec709/Rec601/Limited > > > > So the previous two make this easy: > > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > >> > >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > >> --- > >> src/libcamera/stream.cpp | 5 +++-- > >> 1 file changed, 3 insertions(+), 2 deletions(-) > >> > >> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp > >> index be0c80cbcf..af730ff8a5 100644 > >> --- a/src/libcamera/stream.cpp > >> +++ b/src/libcamera/stream.cpp > >> @@ -407,8 +407,9 @@ std::string StreamConfiguration::toString() const > >> */ > >> std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg) > >> { > >> - out << cfg.size << "-" << cfg.pixelFormat << "/" > >> - << ColorSpace::toString(cfg.colorSpace); > >> + out << cfg.size << '-' << cfg.pixelFormat > >> + << '[' << cfg.frameSize << '/' << cfg.stride << ']' > > > > what happens on multi-planar formats here with stride though ? Or do I > > recall we still only have a single stride value in the > > StreamConfiguration ? > > `StreamConfiguration` can only provide these details about the first plane, > it's an unfortunate deficiency that should be addressed at some point. > Ack, well this helps make it clear :D Thanks -- Kieran > > > > >> + << '/' << ColorSpace::toString(cfg.colorSpace); > >> return out; > >> } > >> > >> -- > >> 2.55.0 > >> >
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index be0c80cbcf..af730ff8a5 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -407,8 +407,9 @@ std::string StreamConfiguration::toString() const */ std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg) { - out << cfg.size << "-" << cfg.pixelFormat << "/" - << ColorSpace::toString(cfg.colorSpace); + out << cfg.size << '-' << cfg.pixelFormat + << '[' << cfg.frameSize << '/' << cfg.stride << ']' + << '/' << ColorSpace::toString(cfg.colorSpace); return out; }
Adjust the formatting of how a `StreamConfiguration` is formatted to a stream. Specifically, print the `frameSize` and `stride` members in a format similar to how it is done for `V4L2DeviceFormat`. Example: configuring streams: (0) 640x480-YUYV[614400/1280]/Rec709/Rec709/Rec601/Limited Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/libcamera/stream.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)