Revert "Revert of Use sps and pps to determine decodability of H.264 frames. (patchset #4 id:60001 of https://codereview.webrtc.org/2341713002/ )"

This reverts commit 3cdfcd88a14449a9b116cb6149e1348d3a1e4cb2.

NOPRESUBMIT=true
BUG=webrtc:6208

Review-Url: https://codereview.webrtc.org/2385143002
Cr-Commit-Position: refs/heads/master@{#14551}
diff --git a/webrtc/modules/video_coding/decoding_state.h b/webrtc/modules/video_coding/decoding_state.h
index f4ea8ae..c734080 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 @@
   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 @@
   // 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