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:
parent
831c5585c7
commit
ca667dbfdd
@ -534,12 +534,6 @@ public:
|
|||||||
// delayed by at least desired_delay_ms.
|
// delayed by at least desired_delay_ms.
|
||||||
virtual int SetMinReceiverDelay(int desired_delay_ms) = 0;
|
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
|
// 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|, and turns back on when the rate goes back up above
|
||||||
// |threshold_bps| + |window_bps|.
|
// |threshold_bps| + |window_bps|.
|
||||||
|
@ -191,15 +191,6 @@ class VideoCodingModuleImpl : public VideoCodingModule {
|
|||||||
return sender_->SentFrameCount(&frameCount);
|
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 {
|
void SuspendBelowMinBitrate() override {
|
||||||
return sender_->SuspendBelowMinBitrate();
|
return sender_->SuspendBelowMinBitrate();
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,6 @@ class EncodedFrameObserver;
|
|||||||
|
|
||||||
namespace vcm {
|
namespace vcm {
|
||||||
|
|
||||||
class DebugRecorder;
|
|
||||||
|
|
||||||
class VCMProcessTimer {
|
class VCMProcessTimer {
|
||||||
public:
|
public:
|
||||||
VCMProcessTimer(int64_t periodMs, Clock* clock)
|
VCMProcessTimer(int64_t periodMs, Clock* clock)
|
||||||
@ -108,9 +106,6 @@ class VideoSender {
|
|||||||
int32_t IntraFrameRequest(int stream_index);
|
int32_t IntraFrameRequest(int stream_index);
|
||||||
int32_t EnableFrameDropper(bool enable);
|
int32_t EnableFrameDropper(bool enable);
|
||||||
|
|
||||||
int StartDebugRecording(const char* file_name_utf8);
|
|
||||||
void StopDebugRecording();
|
|
||||||
|
|
||||||
void SuspendBelowMinBitrate();
|
void SuspendBelowMinBitrate();
|
||||||
bool VideoSuspended() const;
|
bool VideoSuspended() const;
|
||||||
|
|
||||||
@ -120,8 +115,6 @@ class VideoSender {
|
|||||||
private:
|
private:
|
||||||
Clock* clock_;
|
Clock* clock_;
|
||||||
|
|
||||||
rtc::scoped_ptr<DebugRecorder> recorder_;
|
|
||||||
|
|
||||||
rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
|
rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
|
||||||
CriticalSectionWrapper* _sendCritSect;
|
CriticalSectionWrapper* _sendCritSect;
|
||||||
VCMGenericEncoder* _encoder;
|
VCMGenericEncoder* _encoder;
|
||||||
|
@ -24,48 +24,11 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace vcm {
|
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,
|
VideoSender::VideoSender(Clock* clock,
|
||||||
EncodedImageCallback* post_encode_callback,
|
EncodedImageCallback* post_encode_callback,
|
||||||
VideoEncoderRateObserver* encoder_rate_observer,
|
VideoEncoderRateObserver* encoder_rate_observer,
|
||||||
VCMQMSettingsCallback* qm_settings_callback)
|
VCMQMSettingsCallback* qm_settings_callback)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
recorder_(new DebugRecorder()),
|
|
||||||
process_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
process_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_sendCritSect(CriticalSectionWrapper::CreateCriticalSection()),
|
_sendCritSect(CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_encoder(nullptr),
|
_encoder(nullptr),
|
||||||
@ -360,7 +323,6 @@ int32_t VideoSender::AddVideoFrame(const I420VideoFrame& videoFrame,
|
|||||||
}
|
}
|
||||||
int32_t ret =
|
int32_t ret =
|
||||||
_encoder->Encode(videoFrame, codecSpecificInfo, _nextFrameTypes);
|
_encoder->Encode(videoFrame, codecSpecificInfo, _nextFrameTypes);
|
||||||
recorder_->Add(videoFrame);
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
LOG(LS_ERROR) << "Failed to encode frame. Error code: " << ret;
|
LOG(LS_ERROR) << "Failed to encode frame. Error code: " << ret;
|
||||||
return ret;
|
return ret;
|
||||||
@ -395,14 +357,6 @@ int32_t VideoSender::EnableFrameDropper(bool enable) {
|
|||||||
return VCM_OK;
|
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() {
|
void VideoSender::SuspendBelowMinBitrate() {
|
||||||
DCHECK(main_thread_.CalledOnValidThread());
|
DCHECK(main_thread_.CalledOnValidThread());
|
||||||
int threshold_bps;
|
int threshold_bps;
|
||||||
|
@ -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() {
|
void ViEEncoder::SuspendBelowMinBitrate() {
|
||||||
vcm_->SuspendBelowMinBitrate();
|
vcm_->SuspendBelowMinBitrate();
|
||||||
bitrate_allocator_->EnforceMinBitrate(false);
|
bitrate_allocator_->EnforceMinBitrate(false);
|
||||||
|
@ -172,12 +172,6 @@ class ViEEncoder
|
|||||||
|
|
||||||
void SetMinTransmitBitrate(int min_transmit_bitrate_kbps);
|
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
|
// 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|, and turns back on when the rate goes back up above
|
||||||
// |threshold_bps| + |window_bps|.
|
// |threshold_bps| + |window_bps|.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user