Removing DropDeltaAfterKey functionality which is unused.

R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4939004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5214 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andresp@webrtc.org 2013-12-04 15:53:24 +00:00
parent 71f055fb41
commit 5b51ebc179
2 changed files with 0 additions and 52 deletions

View File

@ -153,8 +153,6 @@ ViEEncoder::ViEEncoder(int32_t engine_id,
network_is_transmitting_(true),
encoder_paused_(false),
encoder_paused_and_dropped_frame_(false),
channels_dropping_delta_frames_(0),
drop_next_frame_(false),
fec_enabled_(false),
nack_enabled_(false),
codec_observer_(NULL),
@ -315,27 +313,6 @@ void ViEEncoder::Restart() {
encoder_paused_ = false;
}
int32_t ViEEncoder::DropDeltaAfterKey(bool enable) {
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo,
ViEId(engine_id_, channel_id_),
"%s(%d)", __FUNCTION__, enable);
CriticalSectionScoped cs(data_cs_.get());
if (enable) {
channels_dropping_delta_frames_++;
} else {
channels_dropping_delta_frames_--;
if (channels_dropping_delta_frames_ < 0) {
channels_dropping_delta_frames_ = 0;
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo,
ViEId(engine_id_, channel_id_),
"%s: Called too many times", __FUNCTION__);
return -1;
}
}
return 0;
}
uint8_t ViEEncoder::NumberOfCodecs() {
return vcm_.NumberOfCodecs();
}
@ -589,20 +566,6 @@ void ViEEncoder::DeliverFrame(int id,
TRACE_EVENT_ASYNC_END0("webrtc", "EncoderPaused", this);
}
encoder_paused_and_dropped_frame_ = false;
if (drop_next_frame_) {
// Drop this frame.
WEBRTC_TRACE(webrtc::kTraceStream,
webrtc::kTraceVideo,
ViEId(engine_id_, channel_id_),
"%s: Dropping frame %llu after a key fame", __FUNCTION__,
video_frame->timestamp());
TRACE_EVENT_INSTANT1("webrtc", "VE::EncoderDropFrame",
"timestamp", video_frame->timestamp());
drop_next_frame_ = false;
return;
}
}
// Convert render time, in ms, to RTP timestamp.
@ -867,17 +830,6 @@ int32_t ViEEncoder::SendData(
const uint32_t payload_size,
const webrtc::RTPFragmentationHeader& fragmentation_header,
const RTPVideoHeader* rtp_video_hdr) {
{
CriticalSectionScoped cs(data_cs_.get());
if (channels_dropping_delta_frames_ &&
frame_type == webrtc::kVideoFrameKey) {
WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceVideo,
ViEId(engine_id_, channel_id_),
"%s: Sending key frame, drop next frame", __FUNCTION__);
drop_next_frame_ = true;
}
}
// New encoded data, hand over to the rtp module.
return default_rtp_rtcp_->SendOutgoingData(frame_type,
payload_type,

View File

@ -69,8 +69,6 @@ class ViEEncoder
void Pause();
void Restart();
int32_t DropDeltaAfterKey(bool enable);
// Codec settings.
uint8_t NumberOfCodecs();
int32_t GetCodec(uint8_t list_index, VideoCodec* video_codec);
@ -213,8 +211,6 @@ class ViEEncoder
bool encoder_paused_;
bool encoder_paused_and_dropped_frame_;
std::map<unsigned int, int64_t> time_last_intra_request_ms_;
int32_t channels_dropping_delta_frames_;
bool drop_next_frame_;
bool fec_enabled_;
bool nack_enabled_;