Added StreamTypeToString
Added a StreamTypeToString function in StreamInfo (where stream type is defined) so that we can print the type in a more readable way. Change-Id: Icb1d10f5a72dca314d9bdf07e9cd0c0a185bd791
This commit is contained in:
parent
740724f8cf
commit
26bb50640c
|
@ -14,6 +14,22 @@
|
||||||
namespace shaka {
|
namespace shaka {
|
||||||
namespace media {
|
namespace media {
|
||||||
|
|
||||||
|
std::string StreamTypeToString(StreamType type) {
|
||||||
|
switch (type) {
|
||||||
|
case kStreamUnknown:
|
||||||
|
return "Unknown";
|
||||||
|
case kStreamVideo:
|
||||||
|
return "Video";
|
||||||
|
case kStreamAudio:
|
||||||
|
return "Audio";
|
||||||
|
case kStreamText:
|
||||||
|
return "Text";
|
||||||
|
}
|
||||||
|
|
||||||
|
NOTREACHED() << "Unhandled StreamType with value " << static_cast<int>(type);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
StreamInfo::StreamInfo(StreamType stream_type,
|
StreamInfo::StreamInfo(StreamType stream_type,
|
||||||
int track_id,
|
int track_id,
|
||||||
uint32_t time_scale,
|
uint32_t time_scale,
|
||||||
|
|
|
@ -23,6 +23,8 @@ enum StreamType {
|
||||||
kStreamText,
|
kStreamText,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::string StreamTypeToString(StreamType type);
|
||||||
|
|
||||||
enum Codec {
|
enum Codec {
|
||||||
kUnknownCodec = 0,
|
kUnknownCodec = 0,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue