7 #include "packager/media/base/video_stream_info.h"
9 #include "packager/base/logging.h"
10 #include "packager/base/stl_util.h"
11 #include "packager/base/strings/string_number_conversions.h"
12 #include "packager/base/strings/string_util.h"
13 #include "packager/base/strings/stringprintf.h"
14 #include "packager/media/base/limits.h"
16 namespace edash_packager {
20 std::string VideoCodecToString(VideoCodec video_codec) {
21 switch (video_codec) {
43 NOTIMPLEMENTED() <<
"Unknown Video Codec: " << video_codec;
44 return "UnknownVideoCodec";
54 const std::string& codec_string,
55 const std::string& language,
59 uint32_t pixel_height,
60 int16_t trick_play_rate,
61 uint8_t nalu_length_size,
62 const uint8_t* extra_data,
63 size_t extra_data_size,
77 pixel_width_(pixel_width),
78 pixel_height_(pixel_height),
79 trick_play_rate_(trick_play_rate),
80 nalu_length_size_(nalu_length_size) {
83 VideoStreamInfo::~VideoStreamInfo() {}
86 return codec_ != kUnknownVideoCodec &&
87 width_ > 0 && width_ <= limits::kMaxDimension &&
88 height_ > 0 && height_ <= limits::kMaxDimension &&
89 (nalu_length_size_ <= 2 || nalu_length_size_ == 4);
93 return base::StringPrintf(
94 "%s codec: %s\n width: %d\n height: %d\n pixel aspect ratio: %d:%d\n "
95 "trick_play_rate: %d\n nalu_length_size: %d\n",
97 width_, height_, pixel_width_, pixel_height_, trick_play_rate_,