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,
32 H26xStreamFormat h26x_stream_format,
33 const std::string& codec_string,
34 const uint8_t* codec_config,
35 size_t codec_config_size,
40 int16_t trick_play_rate,
41 uint8_t nalu_length_size,
42 const std::string& language,
50 std::string
ToString()
const override;
53 H26xStreamFormat h26x_stream_format()
const {
return h26x_stream_format_; }
54 uint16_t width()
const {
return width_; }
55 uint16_t height()
const {
return height_; }
62 uint8_t nalu_length_size()
const {
return nalu_length_size_; }
63 int16_t trick_play_rate()
const {
return trick_play_rate_; }
64 const std::vector<uint8_t>& eme_init_data()
const {
return eme_init_data_; }
66 void set_width(uint32_t width) { width_ = width; }
67 void set_height(uint32_t height) { height_ = height; }
68 void set_pixel_width(uint32_t pixel_width) { pixel_width_ =
pixel_width; }
69 void set_pixel_height(uint32_t pixel_height) { pixel_height_ =
pixel_height; }
70 void set_eme_init_data(
const uint8_t* eme_init_data,
71 size_t eme_init_data_size) {
72 eme_init_data_.assign(eme_init_data, eme_init_data + eme_init_data_size);
76 H26xStreamFormat h26x_stream_format_;
82 uint32_t pixel_width_;
83 uint32_t pixel_height_;
84 int16_t trick_play_rate_;
89 uint8_t nalu_length_size_;
93 std::vector<uint8_t> eme_init_data_;
103 #endif // MEDIA_BASE_VIDEO_STREAM_INFO_H_