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

Unified Diff: webrtc/modules/video_coding/decoding_state.h

Issue 2341713002: Use sps and pps to determine decodability of H.264 frames. (Closed)
Patch Set: comments addressed. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/decoding_state.h
diff --git a/webrtc/modules/video_coding/decoding_state.h b/webrtc/modules/video_coding/decoding_state.h
index f4ea8ae0811542f16974427acaf17b92dead33e2..c7340809a7fe7efa81b863d89589af6bc86ca361 100644
--- a/webrtc/modules/video_coding/decoding_state.h
+++ b/webrtc/modules/video_coding/decoding_state.h
@@ -11,11 +11,16 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_DECODING_STATE_H_
#define WEBRTC_MODULES_VIDEO_CODING_DECODING_STATE_H_
+#include <map>
+#include <set>
+#include <vector>
+
#include "webrtc/typedefs.h"
namespace webrtc {
// Forward declarations
+struct NaluInfo;
class VCMFrameBuffer;
class VCMPacket;
@@ -61,6 +66,7 @@ class VCMDecodingState {
bool UsingPictureId(const VCMFrameBuffer* frame) const;
bool UsingFlexibleMode(const VCMFrameBuffer* frame) const;
bool AheadOfFramesDecodedClearedTo(uint16_t index) const;
+ bool HaveSpsAndPps(const std::vector<NaluInfo>& nalus) const;
// Keep state of last decoded frame.
// TODO(mikhal/stefan): create designated classes to handle these types.
@@ -75,6 +81,8 @@ class VCMDecodingState {
// Used to check references in flexible mode.
bool frame_decoded_[kFrameDecodedLength];
uint16_t frame_decoded_cleared_to_;
+ std::set<int> received_sps_;
+ std::map<int, int> received_pps_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc ('k') | webrtc/modules/video_coding/decoding_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698