diff options
Diffstat (limited to 'src/libcamera/stream.cpp')
-rw-r--r-- | src/libcamera/stream.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index 686e693b..540a428e 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -311,7 +311,8 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats) * The stride value reports the number of bytes between the beginning of * successive lines in an image buffer for this stream. The value is * valid after successfully validating the configuration with a call to - * CameraConfiguration::validate(). + * CameraConfiguration::validate(). For compressed formats (such as MJPEG), + * this value will be zero. */ /** @@ -418,9 +419,23 @@ std::string StreamConfiguration::toString() const */ /** - * \typedef StreamRoles - * \brief A vector of StreamRole + * \brief Insert a text representation of a StreamRole into an output stream + * \param[in] out The output stream + * \param[in] role The StreamRole + * \return The output stream \a out */ +std::ostream &operator<<(std::ostream &out, StreamRole role) +{ + static constexpr std::array<const char *, 4> names{ + "Raw", + "StillCapture", + "VideoRecording", + "Viewfinder", + }; + + out << names[utils::to_underlying(role)]; + return out; +} /** * \class Stream |