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