Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/h264/pps_parser.h

Issue 1979443004: Add H264 bitstream rewriting to limit frame reordering marker in header (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rewriting on the receiver side as well Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_PPS_PARSER_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_PPS_PARSER_H_
13
14 #include "webrtc/base/common.h"
15 #include "webrtc/base/optional.h"
16
17 namespace webrtc {
18
19 // A class for parsing out picture parameter set (PPS) data from a H264 NALU.
20 class PpsParser {
21 public:
22 PpsParser(const uint8_t* buffer, size_t buffer_length);
23
24 // Parses the PPS to completion. Returns true if the SPS was parsed correctly.
25 bool Parse();
noahric 2016/05/18 01:35:07 I know this is unrelated, but this class would be
sprang_webrtc 2016/05/20 16:11:00 Acknowledged.
26
27 // The parsed state of the PPS. Only some select values are stored.
28 // Add more as they are actually needed.
29 struct PpsState {
30 PpsState() = default;
31
32 bool bottom_field_pic_order_in_frame_present_flag = false;
33 bool weighted_pred_flag = false;
34 uint32_t weighted_bipred_idc = false;
35 uint32_t redundant_pic_cnt_present_flag = 0;
36 int pic_init_qp_minus26 = 0;
37 };
38
39 // Get the parsed PPS state.
40 const rtc::Optional<PpsState>& GetState() const;
41
42 private:
43 const uint8_t* const buffer_;
44 const size_t buffer_length_;
45 rtc::Optional<PpsState> state_;
46 };
47
48 } // namespace webrtc
49
50 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_PPS_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698