Index: webrtc/modules/video_coding/main/source/jitter_buffer.h |
diff --git a/webrtc/modules/video_coding/main/source/jitter_buffer.h b/webrtc/modules/video_coding/main/source/jitter_buffer.h |
index 8a05f1ff178097b8dff7ab2a725045ef063d8da5..521960d19409ffdbcd7ab7bf72e83ac91ad7b626 100644 |
--- a/webrtc/modules/video_coding/main/source/jitter_buffer.h |
+++ b/webrtc/modules/video_coding/main/source/jitter_buffer.h |
@@ -74,6 +74,29 @@ class FrameList |
void Reset(UnorderedFrameList* free_frames); |
}; |
+class Vp9SsMap { |
+ public: |
+ typedef std::map<uint32_t, GofInfoVP9, TimestampLessThan> SsMap; |
+ bool Insert(const VCMPacket& packet); |
+ void Reset(); |
+ |
+ // Removes SS data that are older than |timestamp|. |
+ void RemoveOld(uint32_t timestamp); |
+ |
+ bool UpdatePacket(VCMPacket* packet) const; |
+ void UpdateFrames(FrameList* frames) const; |
+ |
+ // Public for testing. |
+ // Returns an iterator to the corresponding SS data for the input |timestamp|. |
+ bool Find(uint32_t timestamp, SsMap::const_iterator* it) const; |
+ |
+ private: |
+ bool TimeForCleanup(uint32_t timestamp) const; |
+ void AdvanceFront(uint32_t timestamp); |
+ |
+ SsMap ss_map_; |
+}; |
+ |
class VCMJitterBuffer { |
public: |
VCMJitterBuffer(Clock* clock, rtc::scoped_ptr<EventWrapper> event); |
@@ -307,10 +330,8 @@ class VCMJitterBuffer { |
FrameList incomplete_frames_ GUARDED_BY(crit_sect_); |
VCMDecodingState last_decoded_state_ GUARDED_BY(crit_sect_); |
bool first_packet_since_reset_; |
- // Contains last received frame's temporal information for non-flexible mode. |
- GofInfoVP9 last_gof_; |
- uint32_t last_gof_timestamp_; |
- bool last_gof_valid_; |
+ // Contains scalability structure data for VP9. |
+ Vp9SsMap vp9_ss_map_ GUARDED_BY(crit_sect_); |
// Statistics. |
VCMReceiveStatisticsCallback* stats_callback_ GUARDED_BY(crit_sect_); |