7 #ifndef MEDIA_BASE_VIDEO_STREAM_INFO_H_
8 #define 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 uint32_t trick_play_rate,
43 uint8_t nalu_length_size,
44 const std::string& language,
52 std::string
ToString()
const override;
55 H26xStreamFormat h26x_stream_format()
const {
return h26x_stream_format_; }
56 uint16_t width()
const {
return width_; }
57 uint16_t height()
const {
return height_; }
64 uint8_t nalu_length_size()
const {
return nalu_length_size_; }
65 uint32_t trick_play_rate()
const {
return trick_play_rate_; }
66 uint32_t playback_rate()
const {
return playback_rate_; }
67 const std::vector<uint8_t>& eme_init_data()
const {
return eme_init_data_; }
69 void set_width(uint32_t width) { width_ = width; }
70 void set_height(uint32_t height) { height_ = height; }
71 void set_pixel_width(uint32_t pixel_width) { pixel_width_ =
pixel_width; }
72 void set_pixel_height(uint32_t pixel_height) { pixel_height_ =
pixel_height; }
73 void set_trick_play_rate(uint32_t trick_play_rate) {
74 trick_play_rate_ = trick_play_rate;
76 void set_playback_rate(uint32_t playback_rate) {
77 playback_rate_ = playback_rate;
79 void set_eme_init_data(
const uint8_t* eme_init_data,
80 size_t eme_init_data_size) {
81 eme_init_data_.assign(eme_init_data, eme_init_data + eme_init_data_size);
85 H26xStreamFormat h26x_stream_format_;
91 uint32_t pixel_width_;
92 uint32_t pixel_height_;
93 uint32_t trick_play_rate_ = 0;
105 uint32_t playback_rate_;
110 uint8_t nalu_length_size_;
114 std::vector<uint8_t> eme_init_data_;
124 #endif // MEDIA_BASE_VIDEO_STREAM_INFO_H_