7 #ifndef MEDIA_BASE_STREAM_INFO_H_
8 #define MEDIA_BASE_STREAM_INFO_H_
53 StreamInfo(StreamType stream_type,
int track_id, uint32_t time_scale,
54 uint64_t duration, Codec codec,
const std::string& codec_string,
55 const uint8_t* codec_config,
size_t codec_config_size,
56 const std::string& language,
bool is_encrypted);
65 virtual std::string
ToString()
const;
67 StreamType stream_type()
const {
return stream_type_; }
68 uint32_t track_id()
const {
return track_id_; }
69 uint32_t time_scale()
const {
return time_scale_; }
70 uint64_t duration()
const {
return duration_; }
71 Codec codec()
const {
return codec_; }
72 const std::string& codec_string()
const {
return codec_string_; }
73 const std::vector<uint8_t>& codec_config()
const {
return codec_config_; }
74 const std::string& language()
const {
return language_; }
75 bool is_encrypted()
const {
return is_encrypted_; }
77 void set_duration(
int duration) { duration_ = duration; }
78 void set_codec(Codec codec) { codec_ = codec; }
79 void set_codec_config(
const std::vector<uint8_t>& data) { codec_config_ = data; }
80 void set_codec_string(
const std::string& codec_string) {
81 codec_string_ = codec_string;
83 void set_language(
const std::string& language) { language_ = language; }
87 StreamType stream_type_;
94 std::string codec_string_;
95 std::string language_;
102 std::vector<uint8_t> codec_config_;
112 #endif // MEDIA_BASE_STREAM_INFO_H_