7 #ifndef MEDIA_BASE_STREAM_INFO_H_
8 #define MEDIA_BASE_STREAM_INFO_H_
13 #include "packager/media/base/encryption_config.h"
29 kCodecH264 = kCodecVideo,
39 kCodecVideoMaxPlusOne,
42 kCodecAAC = kCodecAudio,
53 kCodecAudioMaxPlusOne,
56 kCodecWebVtt = kCodecText,
62 StreamInfo(StreamType stream_type,
int track_id, uint32_t time_scale,
63 uint64_t duration, Codec codec,
const std::string& codec_string,
64 const uint8_t* codec_config,
size_t codec_config_size,
65 const std::string& language,
bool is_encrypted);
74 virtual std::string
ToString()
const;
76 StreamType stream_type()
const {
return stream_type_; }
77 uint32_t track_id()
const {
return track_id_; }
78 uint32_t time_scale()
const {
return time_scale_; }
79 uint64_t duration()
const {
return duration_; }
80 Codec codec()
const {
return codec_; }
81 const std::string& codec_string()
const {
return codec_string_; }
82 const std::vector<uint8_t>& codec_config()
const {
return codec_config_; }
83 const std::string& language()
const {
return language_; }
84 bool is_encrypted()
const {
return is_encrypted_; }
86 return encryption_config_;
89 void set_duration(
int duration) { duration_ = duration; }
90 void set_codec(Codec codec) { codec_ = codec; }
91 void set_codec_config(
const std::vector<uint8_t>& data) { codec_config_ = data; }
92 void set_codec_string(
const std::string& codec_string) {
93 codec_string_ = codec_string;
95 void set_language(
const std::string& language) { language_ = language; }
96 void set_is_encrypted(
bool is_encrypted) { is_encrypted_ = is_encrypted; }
98 encryption_config_ = encryption_config;
103 StreamType stream_type_;
106 uint32_t time_scale_;
110 std::string codec_string_;
111 std::string language_;
119 std::vector<uint8_t> codec_config_;
129 #endif // MEDIA_BASE_STREAM_INFO_H_