const VideoSendStream::Config& config,
SendStatisticsProxy::StatsProvider* stats_provider)
: config_(config),
- lock_(CriticalSectionWrapper::CreateCriticalSection()),
- stats_provider_(stats_provider) {}
+ stats_provider_(stats_provider),
+ crit_(CriticalSectionWrapper::CreateCriticalSection()) {
+}
SendStatisticsProxy::~SendStatisticsProxy() {}
void SendStatisticsProxy::OutgoingRate(const int video_channel,
const unsigned int framerate,
const unsigned int bitrate) {
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
stats_.encode_frame_rate = framerate;
}
void SendStatisticsProxy::SuspendChange(int video_channel, bool is_suspended) {
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
stats_.suspended = is_suspended;
}
void SendStatisticsProxy::CapturedFrameRate(const int capture_id,
const unsigned char frame_rate) {
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
stats_.input_frame_rate = frame_rate;
}
VideoSendStream::Stats SendStatisticsProxy::GetStats() const {
VideoSendStream::Stats stats;
{
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
stats = stats_;
}
stats_provider_->GetSendSideDelay(&stats);
void SendStatisticsProxy::StatisticsUpdated(const RtcpStatistics& statistics,
uint32_t ssrc) {
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
StreamStats* stats = GetStatsEntry(ssrc);
if (stats == NULL)
return;
void SendStatisticsProxy::DataCountersUpdated(
const StreamDataCounters& counters,
uint32_t ssrc) {
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
StreamStats* stats = GetStatsEntry(ssrc);
if (stats == NULL)
return;
void SendStatisticsProxy::Notify(const BitrateStatistics& bitrate,
uint32_t ssrc) {
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
StreamStats* stats = GetStatsEntry(ssrc);
if (stats == NULL)
return;
void SendStatisticsProxy::FrameCountUpdated(FrameType frame_type,
uint32_t frame_count,
const unsigned int ssrc) {
- CriticalSectionScoped cs(lock_.get());
+ CriticalSectionScoped lock(crit_.get());
StreamStats* stats = GetStatsEntry(ssrc);
if (stats == NULL)
return;