Remove VCM debug recordings.

BUG=1695
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9233}
This commit is contained in:
Peter Boström
2015-05-20 13:47:41 +02:00
parent 831c5585c7
commit ca667dbfdd
6 changed files with 0 additions and 82 deletions

View File

@ -24,48 +24,11 @@
namespace webrtc {
namespace vcm {
class DebugRecorder {
public:
DebugRecorder()
: cs_(CriticalSectionWrapper::CreateCriticalSection()), file_(nullptr) {}
~DebugRecorder() { Stop(); }
int Start(const char* file_name_utf8) {
CriticalSectionScoped cs(cs_.get());
if (file_)
fclose(file_);
file_ = fopen(file_name_utf8, "wb");
if (!file_)
return VCM_GENERAL_ERROR;
return VCM_OK;
}
void Stop() {
CriticalSectionScoped cs(cs_.get());
if (file_) {
fclose(file_);
file_ = nullptr;
}
}
void Add(const I420VideoFrame& frame) {
CriticalSectionScoped cs(cs_.get());
if (file_)
PrintI420VideoFrame(frame, file_);
}
private:
rtc::scoped_ptr<CriticalSectionWrapper> cs_;
FILE* file_ GUARDED_BY(cs_);
};
VideoSender::VideoSender(Clock* clock,
EncodedImageCallback* post_encode_callback,
VideoEncoderRateObserver* encoder_rate_observer,
VCMQMSettingsCallback* qm_settings_callback)
: clock_(clock),
recorder_(new DebugRecorder()),
process_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
_sendCritSect(CriticalSectionWrapper::CreateCriticalSection()),
_encoder(nullptr),
@ -360,7 +323,6 @@ int32_t VideoSender::AddVideoFrame(const I420VideoFrame& videoFrame,
}
int32_t ret =
_encoder->Encode(videoFrame, codecSpecificInfo, _nextFrameTypes);
recorder_->Add(videoFrame);
if (ret < 0) {
LOG(LS_ERROR) << "Failed to encode frame. Error code: " << ret;
return ret;
@ -395,14 +357,6 @@ int32_t VideoSender::EnableFrameDropper(bool enable) {
return VCM_OK;
}
int VideoSender::StartDebugRecording(const char* file_name_utf8) {
return recorder_->Start(file_name_utf8);
}
void VideoSender::StopDebugRecording() {
recorder_->Stop();
}
void VideoSender::SuspendBelowMinBitrate() {
DCHECK(main_thread_.CalledOnValidThread());
int threshold_bps;