Implement the NackModule as part of the new jitter buffer.

Things done/implemented in this CL:
  - An interface that can send Nack (VCMNackSender).
  - An interface that can request KeyFrames (VCMKeyFrameRequestSender).
  - The nack module (NackModule).
  - A set of convenience functions for modular numbers (mod_ops.h).

BUG=webrtc:5514

Review URL: https://codereview.webrtc.org/1715673002

Cr-Commit-Position: refs/heads/master@{#11882}
This commit is contained in:
philipel
2016-03-05 03:56:39 -08:00
committed by Commit bot
parent b624d8c852
commit f472c5b672
13 changed files with 1157 additions and 0 deletions

View File

@ -11,6 +11,8 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_
#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_
#include <vector>
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/typedefs.h"
#include "webrtc/video_frame.h"
@ -160,6 +162,8 @@ class VCMFrameTypeCallback {
// Callback class used for telling the user about which packet sequence numbers
// are currently
// missing and need to be resent.
// TODO(philipel): Deprecate VCMPacketRequestCallback
// and use NackSender instead.
class VCMPacketRequestCallback {
public:
virtual int32_t ResendPackets(const uint16_t* sequenceNumbers,
@ -169,6 +173,22 @@ class VCMPacketRequestCallback {
virtual ~VCMPacketRequestCallback() {}
};
class NackSender {
public:
virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0;
protected:
virtual ~NackSender() {}
};
class KeyFrameRequestSender {
public:
virtual void RequestKeyFrame() = 0;
protected:
virtual ~KeyFrameRequestSender() {}
};
// Callback used to inform the user of the the desired resolution
// as subscribed by Media Optimization (Quality Modes)
class VCMQMSettingsCallback {