libcamera: media_object: Add MediaLink string representations
Various parts of libcamera print the representation of a MediaLink by inline joining the parts to make a string representation. This repeated use case can be supported with a common helper to print the MediaLink in a common manner using the existing toString() and operator<< overload style to make it easier to report on MediaLink types. This implementation will report in the following style: 'imx283 1-001a'[0] -> 'video-mux'[0] Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
6837607ca3
commit
a783562a34
2 changed files with 29 additions and 0 deletions
|
@ -48,6 +48,8 @@ public:
|
|||
unsigned int flags() const { return flags_; }
|
||||
int setEnabled(bool enable);
|
||||
|
||||
std::string toString() const;
|
||||
|
||||
private:
|
||||
LIBCAMERA_DISABLE_COPY_AND_MOVE(MediaLink)
|
||||
|
||||
|
@ -61,6 +63,8 @@ private:
|
|||
unsigned int flags_;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const MediaLink &link);
|
||||
|
||||
class MediaPad : public MediaObject
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue