81 const std::string& codec_string,
82 const uint8_t* codec_config,
83 size_t codec_config_size,
84 const std::string& language,
94 virtual std::string
ToString()
const;
99 virtual std::unique_ptr<StreamInfo>
Clone()
const = 0;
101 StreamType stream_type()
const {
return stream_type_; }
102 uint32_t track_id()
const {
return track_id_; }
103 int32_t time_scale()
const {
return time_scale_; }
104 int64_t duration()
const {
return duration_; }
105 Codec codec()
const {
return codec_; }
106 const std::string& codec_string()
const {
return codec_string_; }
107 const std::vector<uint8_t>& codec_config()
const {
return codec_config_; }
108 const std::vector<uint8_t>& layered_codec_config()
const {
109 return layered_codec_config_;
111 const std::string& language()
const {
return language_; }
112 bool is_encrypted()
const {
return is_encrypted_; }
113 bool has_clear_lead()
const {
return has_clear_lead_; }
114 const EncryptionConfig& encryption_config()
const {
115 return encryption_config_;
118 void set_duration(int64_t duration) { duration_ = duration; }
119 void set_codec(Codec codec) { codec_ = codec; }
120 void set_codec_config(
const std::vector<uint8_t>& data) {
121 codec_config_ = data;
124 void set_layered_codec_config(
const std::vector<uint8_t>& data) {
125 layered_codec_config_ = data;
128 void set_codec_string(
const std::string& codec_string) {
129 codec_string_ = codec_string;
131 void set_language(
const std::string& language) { language_ = language; }
132 void set_is_encrypted(
bool is_encrypted) { is_encrypted_ = is_encrypted; }
133 void set_has_clear_lead(
bool has_clear_lead) {
134 has_clear_lead_ = has_clear_lead;
136 void set_encryption_config(
const EncryptionConfig& encryption_config) {
137 encryption_config_ = encryption_config;
142 StreamType stream_type_;
149 std::string codec_string_;
150 std::string language_;
156 bool has_clear_lead_ =
false;
157 EncryptionConfig encryption_config_;
160 std::vector<uint8_t> codec_config_;
163 std::vector<uint8_t> layered_codec_config_;