7 #ifndef MEDIA_BASE_STREAM_INFO_H_
8 #define MEDIA_BASE_STREAM_INFO_H_
13 #include "packager/base/memory/ref_counted.h"
26 class StreamInfo :
public base::RefCountedThreadSafe<StreamInfo> {
32 const std::string& codec_string,
33 const std::string& language,
34 const uint8_t* codec_config,
35 size_t codec_config_size,
43 virtual std::string
ToString()
const;
45 StreamType stream_type()
const {
return stream_type_; }
46 uint32_t track_id()
const {
return track_id_; }
47 uint32_t time_scale()
const {
return time_scale_; }
48 uint64_t duration()
const {
return duration_; }
49 const std::string& codec_string()
const {
return codec_string_; }
50 const std::string& language()
const {
return language_; }
52 bool is_encrypted()
const {
return is_encrypted_; }
54 const std::vector<uint8_t>& codec_config()
const {
return codec_config_; }
56 void set_duration(
int duration) { duration_ = duration; }
58 void set_codec_config(
const std::vector<uint8_t>& data) { codec_config_ = data; }
60 void set_codec_string(
const std::string& codec_string) {
61 codec_string_ = codec_string;
64 void set_language(
const std::string& language) { language_ = language; }
67 friend class base::RefCountedThreadSafe<StreamInfo>;
68 virtual ~StreamInfo();
72 StreamType stream_type_;
78 std::string codec_string_;
79 std::string language_;
86 std::vector<uint8_t> codec_config_;
96 #endif // MEDIA_BASE_STREAM_INFO_H_