7 #ifndef PACKAGER_MEDIA_BASE_VIDEO_STREAM_INFO_H_
8 #define PACKAGER_MEDIA_BASE_VIDEO_STREAM_INFO_H_
10 #include "packager/media/base/stream_info.h"
15 enum class H26xStreamFormat {
18 kNalUnitStreamWithParameterSetNalus,
19 kNalUnitStreamWithoutParameterSetNalus,
34 H26xStreamFormat h26x_stream_format,
35 const std::string& codec_string,
36 const uint8_t* codec_config,
37 size_t codec_config_size,
42 uint8_t transfer_characteristics,
43 uint32_t trick_play_factor,
44 uint8_t nalu_length_size,
45 const std::string& language,
53 std::string
ToString()
const override;
54 std::unique_ptr<StreamInfo>
Clone()
const override;
57 const std::vector<uint8_t>& extra_config()
const {
return extra_config_; }
58 H26xStreamFormat h26x_stream_format()
const {
return h26x_stream_format_; }
59 uint16_t width()
const {
return width_; }
60 uint16_t height()
const {
return height_; }
67 uint8_t transfer_characteristics()
const {
return transfer_characteristics_; }
68 uint8_t nalu_length_size()
const {
return nalu_length_size_; }
69 uint32_t trick_play_factor()
const {
return trick_play_factor_; }
70 uint32_t playback_rate()
const {
return playback_rate_; }
71 const std::vector<uint8_t>& eme_init_data()
const {
return eme_init_data_; }
73 void set_extra_config(
const std::vector<uint8_t>& extra_config) {
74 extra_config_ = extra_config;
76 void set_width(uint32_t width) { width_ = width; }
77 void set_height(uint32_t height) { height_ = height; }
80 void set_transfer_characteristics(uint8_t transfer_characteristics) {
81 transfer_characteristics_ = transfer_characteristics;
83 void set_trick_play_factor(uint32_t trick_play_factor) {
84 trick_play_factor_ = trick_play_factor;
86 void set_playback_rate(uint32_t playback_rate) {
87 playback_rate_ = playback_rate;
89 void set_eme_init_data(
const uint8_t* eme_init_data,
90 size_t eme_init_data_size) {
91 eme_init_data_.assign(eme_init_data, eme_init_data + eme_init_data_size);
97 std::vector<uint8_t> extra_config_;
98 H26xStreamFormat h26x_stream_format_;
104 uint32_t pixel_width_;
105 uint32_t pixel_height_;
106 uint8_t transfer_characteristics_ = 0;
107 uint32_t trick_play_factor_ = 0;
120 uint32_t playback_rate_ = 0;
125 uint8_t nalu_length_size_;
129 std::vector<uint8_t> eme_init_data_;
All the methods that are virtual are virtual for mocking.