Skip to content

Commit

Permalink
Remove VCM debug recordings.
Browse files Browse the repository at this point in the history
BUG=1695
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9233}
  • Loading branch information
Peter Boström committed May 20, 2015
1 parent 831c558 commit ca667db
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 82 deletions.
6 changes: 0 additions & 6 deletions webrtc/modules/video_coding/main/interface/video_coding.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,6 @@ class VideoCodingModule : public Module
// delayed by at least desired_delay_ms.
virtual int SetMinReceiverDelay(int desired_delay_ms) = 0;

// Enables recording of debugging information.
virtual int StartDebugRecording(const char* file_name_utf8) = 0;

// Disables recording of debugging information.
virtual int StopDebugRecording() = 0;

// Lets the sender suspend video when the rate drops below
// |threshold_bps|, and turns back on when the rate goes back up above
// |threshold_bps| + |window_bps|.
Expand Down
9 changes: 0 additions & 9 deletions webrtc/modules/video_coding/main/source/video_coding_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,6 @@ class VideoCodingModuleImpl : public VideoCodingModule {
return sender_->SentFrameCount(&frameCount);
}

int StartDebugRecording(const char* file_name_utf8) override {
return sender_->StartDebugRecording(file_name_utf8);
}

int StopDebugRecording() override {
sender_->StopDebugRecording();
return VCM_OK;
}

void SuspendBelowMinBitrate() override {
return sender_->SuspendBelowMinBitrate();
}
Expand Down
7 changes: 0 additions & 7 deletions webrtc/modules/video_coding/main/source/video_coding_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class EncodedFrameObserver;

namespace vcm {

class DebugRecorder;

class VCMProcessTimer {
public:
VCMProcessTimer(int64_t periodMs, Clock* clock)
Expand Down Expand Up @@ -108,9 +106,6 @@ class VideoSender {
int32_t IntraFrameRequest(int stream_index);
int32_t EnableFrameDropper(bool enable);

int StartDebugRecording(const char* file_name_utf8);
void StopDebugRecording();

void SuspendBelowMinBitrate();
bool VideoSuspended() const;

Expand All @@ -120,8 +115,6 @@ class VideoSender {
private:
Clock* clock_;

rtc::scoped_ptr<DebugRecorder> recorder_;

rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
CriticalSectionWrapper* _sendCritSect;
VCMGenericEncoder* _encoder;
Expand Down
46 changes: 0 additions & 46 deletions webrtc/modules/video_coding/main/source/video_sender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions webrtc/video_engine/vie_encoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -854,14 +854,6 @@ void ViEEncoder::OnNetworkChanged(uint32_t bitrate_bps,
}
}

int ViEEncoder::StartDebugRecording(const char* fileNameUTF8) {
return vcm_->StartDebugRecording(fileNameUTF8);
}

int ViEEncoder::StopDebugRecording() {
return vcm_->StopDebugRecording();
}

void ViEEncoder::SuspendBelowMinBitrate() {
vcm_->SuspendBelowMinBitrate();
bitrate_allocator_->EnforceMinBitrate(false);
Expand Down
6 changes: 0 additions & 6 deletions webrtc/video_engine/vie_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@ class ViEEncoder

void SetMinTransmitBitrate(int min_transmit_bitrate_kbps);

// Enables recording of debugging information.
int StartDebugRecording(const char* fileNameUTF8);

// Disables recording of debugging information.
int StopDebugRecording();

// Lets the sender suspend video when the rate drops below
// |threshold_bps|, and turns back on when the rate goes back up above
// |threshold_bps| + |window_bps|.
Expand Down

0 comments on commit ca667db

Please sign in to comment.