Chromium Code Reviews| 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..a60d074a94a8531f3b9d4c760e52f18b78dc9610 100644 |
| --- a/webrtc/modules/video_coding/main/source/jitter_buffer.h |
| +++ b/webrtc/modules/video_coding/main/source/jitter_buffer.h |
| @@ -74,6 +74,32 @@ class FrameList |
| void Reset(UnorderedFrameList* free_frames); |
| }; |
| +class Vp9SsMap { |
| + public: |
| + Vp9SsMap() {} |
| + ~Vp9SsMap() {} |
|
stefan-webrtc
2015/10/13 13:49:43
No need for these constructors, right?
åsapersson
2015/10/14 15:13:51
Done.
|
| + |
| + bool Insert(const VCMPacket& packet); |
| + void Reset(); |
| + |
| + // Removes SS data that are older than |timestamp|. |
| + void RemoveOld(uint32_t timestamp); |
| + |
| + bool UpdatePacket(const VCMPacket* packet); |
| + void UpdateFrames(FrameList* frames); |
| + |
| + // Public for testing. |
| + // Finds the corresponding |ss_timestamp| for the input |timestamp|. |
| + bool Find(uint32_t timestamp, uint32_t* ss_timestamp) const; |
|
stefan-webrtc
2015/10/13 13:49:43
Not a big fan of this type of testing. Isn't it po
|
| + |
| + private: |
| + bool TimeForPeriodicUpdate(uint32_t timestamp) const; |
| + void RemoveOlderThan(uint32_t timestamp); |
| + void AdvanceFront(uint32_t timestamp); |
| + |
| + std::map<uint32_t, GofInfoVP9, TimestampLessThan> ss_map_; |
| +}; |
| + |
| class VCMJitterBuffer { |
| public: |
| VCMJitterBuffer(Clock* clock, rtc::scoped_ptr<EventWrapper> event); |
| @@ -308,9 +334,7 @@ class VCMJitterBuffer { |
| 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_; |
| + Vp9SsMap vp9_ss_map_; // GUARDED_BY(crit_sect_) |
| // Statistics. |
| VCMReceiveStatisticsCallback* stats_callback_ GUARDED_BY(crit_sect_); |