Log stream state as string

This commit is contained in:
badaix 2021-05-04 23:51:57 +02:00
parent 178888a512
commit 1725cffc6e
5 changed files with 25 additions and 5 deletions

View file

@ -46,6 +46,25 @@ enum class ReaderState
kDisabled = 3
};
static std::ostream& operator<<(std::ostream& os, const ReaderState& reader_state)
{
switch (reader_state)
{
case ReaderState::kIdle:
os << "idle";
break;
case ReaderState::kPlaying:
os << "playing";
break;
case ReaderState::kDisabled:
os << "disabled";
break;
case ReaderState::kUnknown:
default:
os << "unknown";
}
return os;
}
static constexpr auto kUriCodec = "codec";
static constexpr auto kUriName = "name";