12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #ifndef COMMON_VIDEO_H264_SPS_PARSER_H_
- #define COMMON_VIDEO_H264_SPS_PARSER_H_
- #include "absl/types/optional.h"
- namespace rtc {
- class BitBuffer;
- }
- namespace webrtc {
- class SpsParser {
- public:
-
-
- struct SpsState {
- SpsState();
- SpsState(const SpsState&);
- ~SpsState();
- uint32_t width = 0;
- uint32_t height = 0;
- uint32_t delta_pic_order_always_zero_flag = 0;
- uint32_t separate_colour_plane_flag = 0;
- uint32_t frame_mbs_only_flag = 0;
- uint32_t log2_max_frame_num = 4;
- uint32_t log2_max_pic_order_cnt_lsb = 4;
- uint32_t pic_order_cnt_type = 0;
- uint32_t max_num_ref_frames = 0;
- uint32_t vui_params_present = 0;
- uint32_t id = 0;
- };
-
- static absl::optional<SpsState> ParseSps(const uint8_t* data, size_t length);
- protected:
-
-
- static absl::optional<SpsState> ParseSpsUpToVui(rtc::BitBuffer* buffer);
- };
- }
- #endif
|