Delete unused method SetPeriodicKeyFrames.
Keyframe interval is configurable in codec settings, with no need for a setter method to toggle it on or off. Bug: webrtc:8830 Change-Id: Ic20d8829884ed22588f8f8c0cceddd76144a9858 Reviewed-on: https://webrtc-review.googlesource.com/56040 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22280}
This commit is contained in:
@ -95,10 +95,6 @@ VideoEncoder::ScalingSettings VideoEncoder::GetScalingSettings() const {
|
|||||||
return ScalingSettings::kOff;
|
return ScalingSettings::kOff;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t VideoEncoder::SetPeriodicKeyFrames(bool enable) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool VideoEncoder::SupportsNativeHandle() const {
|
bool VideoEncoder::SupportsNativeHandle() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,6 @@ class VideoEncoder {
|
|||||||
// quality scaler must implement this method.
|
// quality scaler must implement this method.
|
||||||
virtual ScalingSettings GetScalingSettings() const;
|
virtual ScalingSettings GetScalingSettings() const;
|
||||||
|
|
||||||
virtual int32_t SetPeriodicKeyFrames(bool enable);
|
|
||||||
virtual bool SupportsNativeHandle() const;
|
virtual bool SupportsNativeHandle() const;
|
||||||
virtual const char* ImplementationName() const;
|
virtual const char* ImplementationName() const;
|
||||||
};
|
};
|
||||||
|
@ -37,7 +37,6 @@ class ScopedVideoEncoder : public webrtc::VideoEncoder {
|
|||||||
int32_t SetRateAllocation(const webrtc::BitrateAllocation& allocation,
|
int32_t SetRateAllocation(const webrtc::BitrateAllocation& allocation,
|
||||||
uint32_t framerate) override;
|
uint32_t framerate) override;
|
||||||
ScalingSettings GetScalingSettings() const override;
|
ScalingSettings GetScalingSettings() const override;
|
||||||
int32_t SetPeriodicKeyFrames(bool enable) override;
|
|
||||||
bool SupportsNativeHandle() const override;
|
bool SupportsNativeHandle() const override;
|
||||||
const char* ImplementationName() const override;
|
const char* ImplementationName() const override;
|
||||||
|
|
||||||
@ -95,10 +94,6 @@ webrtc::VideoEncoder::ScalingSettings ScopedVideoEncoder::GetScalingSettings()
|
|||||||
return encoder_->GetScalingSettings();
|
return encoder_->GetScalingSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ScopedVideoEncoder::SetPeriodicKeyFrames(bool enable) {
|
|
||||||
return encoder_->SetPeriodicKeyFrames(enable);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ScopedVideoEncoder::SupportsNativeHandle() const {
|
bool ScopedVideoEncoder::SupportsNativeHandle() const {
|
||||||
return encoder_->SupportsNativeHandle();
|
return encoder_->SupportsNativeHandle();
|
||||||
}
|
}
|
||||||
|
@ -69,10 +69,6 @@ VideoEncoder::ScalingSettings VP8EncoderSimulcastProxy::GetScalingSettings()
|
|||||||
return encoder_->GetScalingSettings();
|
return encoder_->GetScalingSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t VP8EncoderSimulcastProxy::SetPeriodicKeyFrames(bool enable) {
|
|
||||||
return encoder_->SetPeriodicKeyFrames(enable);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool VP8EncoderSimulcastProxy::SupportsNativeHandle() const {
|
bool VP8EncoderSimulcastProxy::SupportsNativeHandle() const {
|
||||||
return encoder_->SupportsNativeHandle();
|
return encoder_->SupportsNativeHandle();
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,6 @@ class VP8EncoderSimulcastProxy : public VP8Encoder {
|
|||||||
|
|
||||||
VideoEncoder::ScalingSettings GetScalingSettings() const override;
|
VideoEncoder::ScalingSettings GetScalingSettings() const override;
|
||||||
|
|
||||||
int32_t SetPeriodicKeyFrames(bool enable) override;
|
|
||||||
bool SupportsNativeHandle() const override;
|
bool SupportsNativeHandle() const override;
|
||||||
const char* ImplementationName() const override;
|
const char* ImplementationName() const override;
|
||||||
|
|
||||||
|
@ -502,10 +502,6 @@ int32_t H264EncoderImpl::SetChannelParameters(
|
|||||||
return WEBRTC_VIDEO_CODEC_OK;
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) {
|
|
||||||
return WEBRTC_VIDEO_CODEC_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
VideoEncoder::ScalingSettings H264EncoderImpl::GetScalingSettings() const {
|
VideoEncoder::ScalingSettings H264EncoderImpl::GetScalingSettings() const {
|
||||||
return VideoEncoder::ScalingSettings(kLowH264QpThreshold,
|
return VideoEncoder::ScalingSettings(kLowH264QpThreshold,
|
||||||
kHighH264QpThreshold);
|
kHighH264QpThreshold);
|
||||||
|
@ -59,7 +59,6 @@ class H264EncoderImpl : public H264Encoder {
|
|||||||
|
|
||||||
// Unsupported / Do nothing.
|
// Unsupported / Do nothing.
|
||||||
int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
|
int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
|
||||||
int32_t SetPeriodicKeyFrames(bool enable) override;
|
|
||||||
|
|
||||||
// Exposed for testing.
|
// Exposed for testing.
|
||||||
H264PacketizationMode PacketizationModeForTesting() const {
|
H264PacketizationMode PacketizationModeForTesting() const {
|
||||||
|
@ -23,7 +23,6 @@ VCMEncoderDataBase::VCMEncoderDataBase(
|
|||||||
VCMEncodedFrameCallback* encoded_frame_callback)
|
VCMEncodedFrameCallback* encoded_frame_callback)
|
||||||
: number_of_cores_(0),
|
: number_of_cores_(0),
|
||||||
max_payload_size_(kDefaultPayloadSize),
|
max_payload_size_(kDefaultPayloadSize),
|
||||||
periodic_key_frames_(false),
|
|
||||||
pending_encoder_reset_(true),
|
pending_encoder_reset_(true),
|
||||||
send_codec_(),
|
send_codec_(),
|
||||||
encoder_payload_type_(0),
|
encoder_payload_type_(0),
|
||||||
@ -101,11 +100,6 @@ bool VCMEncoderDataBase::SetSendCodec(const VideoCodec* send_codec,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intentionally don't check return value since the encoder registration
|
|
||||||
// shouldn't fail because the codec doesn't support changing the periodic key
|
|
||||||
// frame setting.
|
|
||||||
ptr_encoder_->SetPeriodicKeyFrames(periodic_key_frames_);
|
|
||||||
|
|
||||||
pending_encoder_reset_ = false;
|
pending_encoder_reset_ = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -211,14 +205,6 @@ VCMGenericEncoder* VCMEncoderDataBase::GetEncoder() {
|
|||||||
return ptr_encoder_.get();
|
return ptr_encoder_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VCMEncoderDataBase::SetPeriodicKeyFrames(bool enable) {
|
|
||||||
periodic_key_frames_ = enable;
|
|
||||||
if (ptr_encoder_) {
|
|
||||||
return (ptr_encoder_->SetPeriodicKeyFrames(periodic_key_frames_) == 0);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VCMEncoderDataBase::DeleteEncoder() {
|
void VCMEncoderDataBase::DeleteEncoder() {
|
||||||
if (!ptr_encoder_)
|
if (!ptr_encoder_)
|
||||||
return;
|
return;
|
||||||
|
@ -44,8 +44,6 @@ class VCMEncoderDataBase {
|
|||||||
|
|
||||||
VCMGenericEncoder* GetEncoder();
|
VCMGenericEncoder* GetEncoder();
|
||||||
|
|
||||||
bool SetPeriodicKeyFrames(bool enable);
|
|
||||||
|
|
||||||
bool MatchesCurrentResolution(int width, int height) const;
|
bool MatchesCurrentResolution(int width, int height) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -57,7 +55,6 @@ class VCMEncoderDataBase {
|
|||||||
|
|
||||||
int number_of_cores_;
|
int number_of_cores_;
|
||||||
size_t max_payload_size_;
|
size_t max_payload_size_;
|
||||||
bool periodic_key_frames_;
|
|
||||||
bool pending_encoder_reset_;
|
bool pending_encoder_reset_;
|
||||||
VideoCodec send_codec_;
|
VideoCodec send_codec_;
|
||||||
uint8_t encoder_payload_type_;
|
uint8_t encoder_payload_type_;
|
||||||
|
@ -151,11 +151,6 @@ EncoderParameters VCMGenericEncoder::GetEncoderParameters() const {
|
|||||||
return encoder_params_;
|
return encoder_params_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t VCMGenericEncoder::SetPeriodicKeyFrames(bool enable) {
|
|
||||||
RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
|
|
||||||
return encoder_->SetPeriodicKeyFrames(enable);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t VCMGenericEncoder::RequestFrame(
|
int32_t VCMGenericEncoder::RequestFrame(
|
||||||
const std::vector<FrameType>& frame_types) {
|
const std::vector<FrameType>& frame_types) {
|
||||||
RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
|
RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
|
||||||
|
@ -134,7 +134,6 @@ class VCMGenericEncoder {
|
|||||||
void SetEncoderParameters(const EncoderParameters& params);
|
void SetEncoderParameters(const EncoderParameters& params);
|
||||||
EncoderParameters GetEncoderParameters() const;
|
EncoderParameters GetEncoderParameters() const;
|
||||||
|
|
||||||
int32_t SetPeriodicKeyFrames(bool enable);
|
|
||||||
int32_t RequestFrame(const std::vector<FrameType>& frame_types);
|
int32_t RequestFrame(const std::vector<FrameType>& frame_types);
|
||||||
bool InternalSource() const;
|
bool InternalSource() const;
|
||||||
bool SupportsNativeHandle() const;
|
bool SupportsNativeHandle() const;
|
||||||
|
@ -48,7 +48,6 @@ class MockVideoEncoder : public VideoEncoder {
|
|||||||
MOCK_METHOD2(SetRateAllocation,
|
MOCK_METHOD2(SetRateAllocation,
|
||||||
int32_t(const BitrateAllocation& newBitRate,
|
int32_t(const BitrateAllocation& newBitRate,
|
||||||
uint32_t frameRate));
|
uint32_t frameRate));
|
||||||
MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MockDecodedImageCallback : public DecodedImageCallback {
|
class MockDecodedImageCallback : public DecodedImageCallback {
|
||||||
|
@ -79,10 +79,6 @@ int32_t ConfigurableFrameSizeEncoder::SetRateAllocation(
|
|||||||
return WEBRTC_VIDEO_CODEC_OK;
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ConfigurableFrameSizeEncoder::SetPeriodicKeyFrames(bool enable) {
|
|
||||||
return WEBRTC_VIDEO_CODEC_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t ConfigurableFrameSizeEncoder::SetFrameSize(size_t size) {
|
int32_t ConfigurableFrameSizeEncoder::SetFrameSize(size_t size) {
|
||||||
RTC_DCHECK_LE(size, max_frame_size_);
|
RTC_DCHECK_LE(size, max_frame_size_);
|
||||||
current_frame_size_ = size;
|
current_frame_size_ = size;
|
||||||
|
@ -42,8 +42,6 @@ class ConfigurableFrameSizeEncoder : public VideoEncoder {
|
|||||||
int32_t SetRateAllocation(const BitrateAllocation& allocation,
|
int32_t SetRateAllocation(const BitrateAllocation& allocation,
|
||||||
uint32_t framerate) override;
|
uint32_t framerate) override;
|
||||||
|
|
||||||
int32_t SetPeriodicKeyFrames(bool enable) override;
|
|
||||||
|
|
||||||
int32_t SetFrameSize(size_t size);
|
int32_t SetFrameSize(size_t size);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user