Experiment for the nack module.
Testing the nack module by implementing it into the current jitter buffer
under the experiment WebRTC-NewVideoJitterBuffer.
BUG=webrtc:5514
Review URL: https://codereview.webrtc.org/1778503002
Cr-Commit-Position: refs/heads/master@{#11969}
diff --git a/webrtc/modules/video_coding/jitter_buffer.h b/webrtc/modules/video_coding/jitter_buffer.h
index 8ba338f..0cc03dd 100644
--- a/webrtc/modules/video_coding/jitter_buffer.h
+++ b/webrtc/modules/video_coding/jitter_buffer.h
@@ -20,12 +20,14 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/include/module_common_types.h"
+#include "webrtc/modules/utility/include/process_thread.h"
#include "webrtc/modules/video_coding/include/video_coding.h"
#include "webrtc/modules/video_coding/include/video_coding_defines.h"
#include "webrtc/modules/video_coding/decoding_state.h"
#include "webrtc/modules/video_coding/inter_frame_delay.h"
#include "webrtc/modules/video_coding/jitter_buffer_common.h"
#include "webrtc/modules/video_coding/jitter_estimator.h"
+#include "webrtc/modules/video_coding/nack_module.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/typedefs.h"
@@ -104,7 +106,10 @@
class VCMJitterBuffer {
public:
- VCMJitterBuffer(Clock* clock, std::unique_ptr<EventWrapper> event);
+ VCMJitterBuffer(Clock* clock,
+ std::unique_ptr<EventWrapper> event,
+ NackSender* nack_sender = nullptr,
+ KeyFrameRequestSender* keyframe_request_sender = nullptr);
~VCMJitterBuffer();
@@ -213,6 +218,9 @@
void RegisterStatsCallback(VCMReceiveStatisticsCallback* callback);
+ int64_t TimeUntilNextProcess();
+ void Process();
+
private:
class SequenceNumberLessThan {
public:
@@ -383,6 +391,9 @@
// average_packets_per_frame converges fast if we have fewer than this many
// frames.
int frame_counter_;
+
+ std::unique_ptr<NackModule> nack_module_;
+
RTC_DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer);
};
} // namespace webrtc