82 const std::string& codec_string,
83 const uint8_t* codec_config,
84 size_t codec_config_size,
85 const std::string& language,
95 virtual std::string
ToString()
const;
100 virtual std::unique_ptr<StreamInfo>
Clone()
const = 0;
102 StreamType stream_type()
const {
return stream_type_; }
103 uint32_t track_id()
const {
return track_id_; }
104 int32_t time_scale()
const {
return time_scale_; }
105 int64_t duration()
const {
return duration_; }
106 Codec codec()
const {
return codec_; }
107 const std::string& codec_string()
const {
return codec_string_; }
108 const std::vector<uint8_t>& codec_config()
const {
return codec_config_; }
109 const std::vector<uint8_t>& layered_codec_config()
const {
110 return layered_codec_config_;
112 const std::string& language()
const {
return language_; }
113 bool is_encrypted()
const {
return is_encrypted_; }
114 bool has_clear_lead()
const {
return has_clear_lead_; }
115 const EncryptionConfig& encryption_config()
const {
116 return encryption_config_;
119 void set_duration(int64_t duration) { duration_ = duration; }
120 void set_codec(Codec codec) { codec_ = codec; }
121 void set_codec_config(
const std::vector<uint8_t>& data) {
122 codec_config_ = data;
125 void set_layered_codec_config(
const std::vector<uint8_t>& data) {
126 layered_codec_config_ = data;
129 void set_codec_string(
const std::string& codec_string) {
130 codec_string_ = codec_string;
132 void set_language(
const std::string& language) { language_ = language; }
133 void set_is_encrypted(
bool is_encrypted) { is_encrypted_ = is_encrypted; }
134 void set_has_clear_lead(
bool has_clear_lead) {
135 has_clear_lead_ = has_clear_lead;
137 void set_encryption_config(
const EncryptionConfig& encryption_config) {
138 encryption_config_ = encryption_config;
143 StreamType stream_type_;
150 std::string codec_string_;
151 std::string language_;
157 bool has_clear_lead_ =
false;
158 EncryptionConfig encryption_config_;
161 std::vector<uint8_t> codec_config_;
164 std::vector<uint8_t> layered_codec_config_;