Delete unused methods from vcm::VideoCodingModule.

Bug: None
Change-Id: Ia6871d486b507a08f4303d1f0da00829afbebb0e
Reviewed-on: https://webrtc-review.googlesource.com/62101
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22469}
This commit is contained in:
Niels Möller
2018-03-15 15:11:20 +01:00
committed by Commit Bot
parent eef09fc42d
commit af9e87b8c5
4 changed files with 0 additions and 194 deletions

View File

@ -114,18 +114,6 @@ class VideoCodingModule : public Module {
uint8_t payloadType,
bool internalSource = false) = 0;
// API to get currently configured encoder target bitrate in bits/s.
//
// Return value : 0, on success.
// < 0, on error.
virtual int Bitrate(unsigned int* bitrate) const = 0;
// API to get currently configured encoder target frame rate.
//
// Return value : 0, on success.
// < 0, on error.
virtual int FrameRate(unsigned int* framerate) const = 0;
// Sets the parameters describing the send channel. These parameters are
// inputs to the
// Media Optimization inside the VCM and also specifies the target bit rate
@ -146,27 +134,6 @@ class VideoCodingModule : public Module {
uint8_t lossRate,
int64_t rtt) = 0;
// Sets the parameters describing the receive channel. These parameters are
// inputs to the
// Media Optimization inside the VCM.
//
// Input:
// - rtt : Current round-trip time in ms.
// with the most amount available bandwidth in
// a conference
// scenario
//
// Return value : VCM_OK, on success.
// < 0, on error.
virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0;
// Deprecated: This method currently does not have any effect.
// Register a video protection callback which will be called to deliver
// the requested FEC rate and NACK status (on/off).
// TODO(perkj): Remove once no projects use it.
virtual int32_t RegisterProtectionCallback(
VCMProtectionCallback* protection) = 0;
// Enable or disable a video protection method.
//
// Input:
@ -244,21 +211,6 @@ class VideoCodingModule : public Module {
int32_t numberOfCores,
bool requireKeyFrame = false) = 0;
// Register an externally defined decoder/renderer object. Can be a decoder
// only or a
// decoder coupled with a renderer. Note that RegisterReceiveCodec must be
// called to
// be used for decoding incoming streams.
//
// Input:
// - externalDecoder : The external decoder/renderer object.
// - payloadType : The payload type which this decoder should
// be
// registered to.
//
virtual void RegisterExternalDecoder(VideoDecoder* externalDecoder,
uint8_t payloadType) = 0;
// Register a receive callback. Will be called whenever there is a new frame
// ready
// for rendering.
@ -274,20 +226,6 @@ class VideoCodingModule : public Module {
virtual int32_t RegisterReceiveCallback(
VCMReceiveCallback* receiveCallback) = 0;
// Register a receive statistics callback which will be called to deliver
// information
// about the video stream received by the receiving side of the VCM, for
// instance the
// average frame rate and bit rate.
//
// Input:
// - receiveStats : The callback object to register.
//
// Return value : VCM_OK, on success.
// < 0, on error.
virtual int32_t RegisterReceiveStatisticsCallback(
VCMReceiveStatisticsCallback* receiveStats) = 0;
// Register a frame type request callback. This callback will be called when
// the
// module needs to request specific frame types from the send side.
@ -342,35 +280,6 @@ class VideoCodingModule : public Module {
size_t payloadLength,
const WebRtcRTPHeader& rtpInfo) = 0;
// Minimum playout delay (Used for lip-sync). This is the minimum delay
// required
// to sync with audio. Not included in VideoCodingModule::Delay()
// Defaults to 0 ms.
//
// Input:
// - minPlayoutDelayMs : Additional delay in ms.
//
// Return value : VCM_OK, on success.
// < 0, on error.
virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0;
// Set the time required by the renderer to render a frame.
//
// Input:
// - timeMS : The time in ms required by the renderer to render a
// frame.
//
// Return value : VCM_OK, on success.
// < 0, on error.
virtual int32_t SetRenderDelay(uint32_t timeMS) = 0;
// The total delay desired by the VCM. Can be less than the minimum
// delay set with SetMinimumPlayoutDelay.
//
// Return value : Total delay in ms, on success.
// < 0, on error.
virtual int32_t Delay() const = 0;
// Robustness APIs
// DEPRECATED.
@ -390,13 +299,6 @@ class VideoCodingModule : public Module {
virtual int SetReceiverRobustnessMode(ReceiverRobustness robustnessMode,
VCMDecodeErrorMode errorMode) = 0;
// Set the decode error mode. The mode decides which errors (if any) are
// allowed in decodable frames. Note that setting decode_error_mode to
// anything other than kWithErrors without enabling nack will cause
// long-term freezes (resulting from frequent key frame requests) if
// packet loss occurs.
virtual void SetDecodeErrorMode(VCMDecodeErrorMode decode_error_mode) = 0;
// Sets the maximum number of sequence numbers that we are allowed to NACK
// and the oldest sequence number that we will consider to NACK. If a
// sequence number older than |max_packet_age_to_nack| is missing
@ -407,14 +309,8 @@ class VideoCodingModule : public Module {
int max_packet_age_to_nack,
int max_incomplete_time_ms) = 0;
// Setting a desired delay to the VCM receiver. Video rendering will be
// delayed by at least desired_delay_ms.
virtual int SetMinReceiverDelay(int desired_delay_ms) = 0;
virtual void RegisterPostEncodeImageCallback(
EncodedImageCallback* post_encode_callback) = 0;
// Releases pending decode calls, permitting faster thread shutdown.
virtual void TriggerDecoderShutdown() = 0;
};
} // namespace webrtc

View File

@ -133,14 +133,6 @@ class VideoCodingModuleImpl : public VideoCodingModule {
return 0;
}
int Bitrate(unsigned int* bitrate) const override {
return sender_.Bitrate(bitrate);
}
int FrameRate(unsigned int* framerate) const override {
return sender_.FrameRate(framerate);
}
int32_t SetChannelParameters(uint32_t target_bitrate, // bits/s.
uint8_t lossRate,
int64_t rtt) override {
@ -148,11 +140,6 @@ class VideoCodingModuleImpl : public VideoCodingModule {
rate_allocator_.get(), nullptr);
}
int32_t RegisterProtectionCallback(
VCMProtectionCallback* protection) override {
return sender_.RegisterProtectionCallback(protection);
}
int32_t SetVideoProtection(VCMVideoProtection videoProtection,
bool enable) override {
// TODO(pbos): Remove enable from receive-side protection modes as well.
@ -179,22 +166,12 @@ class VideoCodingModuleImpl : public VideoCodingModule {
requireKeyFrame);
}
void RegisterExternalDecoder(VideoDecoder* externalDecoder,
uint8_t payloadType) override {
receiver_.RegisterExternalDecoder(externalDecoder, payloadType);
}
int32_t RegisterReceiveCallback(
VCMReceiveCallback* receiveCallback) override {
RTC_DCHECK(construction_thread_.CalledOnValidThread());
return receiver_.RegisterReceiveCallback(receiveCallback);
}
int32_t RegisterReceiveStatisticsCallback(
VCMReceiveStatisticsCallback* receiveStats) override {
return receiver_.RegisterReceiveStatisticsCallback(receiveStats);
}
int32_t RegisterFrameTypeCallback(
VCMFrameTypeCallback* frameTypeCallback) override {
return receiver_.RegisterFrameTypeCallback(frameTypeCallback);
@ -216,16 +193,6 @@ class VideoCodingModuleImpl : public VideoCodingModule {
return receiver_.IncomingPacket(incomingPayload, payloadLength, rtpInfo);
}
int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) override {
return receiver_.SetMinimumPlayoutDelay(minPlayoutDelayMs);
}
int32_t SetRenderDelay(uint32_t timeMS) override {
return receiver_.SetRenderDelay(timeMS);
}
int32_t Delay() const override { return receiver_.Delay(); }
int SetReceiverRobustnessMode(ReceiverRobustness robustnessMode,
VCMDecodeErrorMode errorMode) override {
return receiver_.SetReceiverRobustnessMode(robustnessMode, errorMode);
@ -238,25 +205,11 @@ class VideoCodingModuleImpl : public VideoCodingModule {
max_incomplete_time_ms);
}
void SetDecodeErrorMode(VCMDecodeErrorMode decode_error_mode) override {
return receiver_.SetDecodeErrorMode(decode_error_mode);
}
int SetMinReceiverDelay(int desired_delay_ms) override {
return receiver_.SetMinReceiverDelay(desired_delay_ms);
}
int32_t SetReceiveChannelParameters(int64_t rtt) override {
return receiver_.SetReceiveChannelParameters(rtt);
}
void RegisterPostEncodeImageCallback(
EncodedImageCallback* observer) override {
post_encode_callback_.Register(observer);
}
void TriggerDecoderShutdown() override { receiver_.TriggerDecoderShutdown(); }
private:
rtc::ThreadChecker construction_thread_;
EncodedImageCallbackWrapper post_encode_callback_;

View File

@ -78,9 +78,6 @@ class VideoSender {
uint8_t payloadType,
bool internalSource);
int Bitrate(unsigned int* bitrate) const;
int FrameRate(unsigned int* framerate) const;
// Update the channel parameters based on new rates and rtt. This will also
// cause an immediate call to VideoEncoder::SetRateAllocation().
int32_t SetChannelParameters(
@ -99,10 +96,6 @@ class VideoSender {
VideoBitrateAllocator* bitrate_allocator,
VideoBitrateAllocationObserver* bitrate_updated_callback);
// Deprecated:
// TODO(perkj): Remove once no projects use it.
int32_t RegisterProtectionCallback(VCMProtectionCallback* protection);
int32_t AddVideoFrame(const VideoFrame& videoFrame,
const CodecSpecificInfo* codecSpecificInfo);

View File

@ -144,31 +144,6 @@ void VideoSender::RegisterExternalEncoder(VideoEncoder* externalEncoder,
internalSource);
}
// Get encode bitrate
int VideoSender::Bitrate(unsigned int* bitrate) const {
RTC_DCHECK(sequenced_checker_.CalledSequentially());
// Since we're running on the thread that's the only thread known to modify
// the value of _encoder, we don't need to grab the lock here.
if (!_encoder)
return VCM_UNINITIALIZED;
*bitrate = _encoder->GetEncoderParameters().target_bitrate.get_sum_bps();
return 0;
}
// Get encode frame rate
int VideoSender::FrameRate(unsigned int* framerate) const {
RTC_DCHECK(sequenced_checker_.CalledSequentially());
// Since we're running on the thread that's the only thread known to modify
// the value of _encoder, we don't need to grab the lock here.
if (!_encoder)
return VCM_UNINITIALIZED;
*framerate = _encoder->GetEncoderParameters().input_frame_rate;
return 0;
}
EncoderParameters VideoSender::UpdateEncoderParameters(
const EncoderParameters& params,
VideoBitrateAllocator* bitrate_allocator,
@ -267,17 +242,6 @@ void VideoSender::SetEncoderParameters(EncoderParameters params,
_encoder->SetEncoderParameters(params);
}
// Deprecated:
// TODO(perkj): Remove once no projects call this method. It currently do
// nothing.
int32_t VideoSender::RegisterProtectionCallback(
VCMProtectionCallback* protection_callback) {
// Deprecated:
// TODO(perkj): Remove once no projects call this method. It currently do
// nothing.
return VCM_OK;
}
// Add one raw video frame to the encoder, blocking.
int32_t VideoSender::AddVideoFrame(const VideoFrame& videoFrame,
const CodecSpecificInfo* codecSpecificInfo) {