7 #ifndef MEDIA_BASE_STREAM_INFO_H_
8 #define MEDIA_BASE_STREAM_INFO_H_
27 kCodecH264 = kCodecVideo,
37 kCodecVideoMaxPlusOne,
40 kCodecAAC = kCodecAudio,
51 kCodecAudioMaxPlusOne,
54 kCodecWebVtt = kCodecText,
60 StreamInfo(StreamType stream_type,
int track_id, uint32_t time_scale,
61 uint64_t duration, Codec codec,
const std::string& codec_string,
62 const uint8_t* codec_config,
size_t codec_config_size,
63 const std::string& language,
bool is_encrypted);
72 virtual std::string
ToString()
const;
74 StreamType stream_type()
const {
return stream_type_; }
75 uint32_t track_id()
const {
return track_id_; }
76 uint32_t time_scale()
const {
return time_scale_; }
77 uint64_t duration()
const {
return duration_; }
78 Codec codec()
const {
return codec_; }
79 const std::string& codec_string()
const {
return codec_string_; }
80 const std::vector<uint8_t>& codec_config()
const {
return codec_config_; }
81 const std::string& language()
const {
return language_; }
82 bool is_encrypted()
const {
return is_encrypted_; }
84 void set_duration(
int duration) { duration_ = duration; }
85 void set_codec(Codec codec) { codec_ = codec; }
86 void set_codec_config(
const std::vector<uint8_t>& data) { codec_config_ = data; }
87 void set_codec_string(
const std::string& codec_string) {
88 codec_string_ = codec_string;
90 void set_language(
const std::string& language) { language_ = language; }
91 void set_is_encrypted(
bool is_encrypted) { is_encrypted_ = is_encrypted; }
95 StreamType stream_type_;
102 std::string codec_string_;
103 std::string language_;
110 std::vector<uint8_t> codec_config_;
120 #endif // MEDIA_BASE_STREAM_INFO_H_