Eliminate need for stats to know of channel.h
Also eliminate FillBitrateInfo from the Channel object. Bug: webrtc:13931 Change-Id: I5265b7629413a1ed04898272adf26708e2ee9b8d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260469 Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36744}
This commit is contained in:
parent
a429ad06bc
commit
9a743179cf
@ -969,12 +969,6 @@ void VideoChannel::UpdateMediaSendRecvState_w() {
|
||||
<< ToString();
|
||||
}
|
||||
|
||||
void VideoChannel::FillBitrateInfo(BandwidthEstimationInfo* bwe_info) {
|
||||
RTC_DCHECK_RUN_ON(worker_thread());
|
||||
VideoMediaChannel* mc = media_channel();
|
||||
mc->FillBitrateInfo(bwe_info);
|
||||
}
|
||||
|
||||
bool VideoChannel::SetLocalContent_w(const MediaContentDescription* content,
|
||||
SdpType type,
|
||||
std::string& error_desc) {
|
||||
|
||||
@ -410,8 +410,6 @@ class VideoChannel : public BaseChannel {
|
||||
return cricket::MEDIA_TYPE_VIDEO;
|
||||
}
|
||||
|
||||
void FillBitrateInfo(BandwidthEstimationInfo* bwe_info);
|
||||
|
||||
private:
|
||||
// overrides from BaseChannel
|
||||
void UpdateMediaSendRecvState_w() RTC_RUN_ON(worker_thread()) override;
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
#include "modules/audio_processing/include/audio_processing_statistics.h"
|
||||
#include "p2p/base/ice_transport_internal.h"
|
||||
#include "p2p/base/p2p_constants.h"
|
||||
#include "pc/channel.h"
|
||||
#include "pc/channel_interface.h"
|
||||
#include "pc/data_channel_utils.h"
|
||||
#include "pc/rtp_receiver.h"
|
||||
@ -1035,21 +1034,21 @@ void StatsCollector::ExtractBweInfo() {
|
||||
// Fill in target encoder bitrate, actual encoder bitrate, rtx bitrate, etc.
|
||||
// TODO(holmer): Also fill this in for audio.
|
||||
auto transceivers = pc_->GetTransceiversInternal();
|
||||
std::vector<cricket::VideoChannel*> video_channels;
|
||||
std::vector<cricket::VideoMediaChannel*> video_media_channels;
|
||||
for (const auto& transceiver : transceivers) {
|
||||
if (transceiver->media_type() != cricket::MEDIA_TYPE_VIDEO) {
|
||||
continue;
|
||||
}
|
||||
auto* video_channel =
|
||||
static_cast<cricket::VideoChannel*>(transceiver->internal()->channel());
|
||||
auto* video_channel = transceiver->internal()->channel();
|
||||
if (video_channel) {
|
||||
video_channels.push_back(video_channel);
|
||||
video_media_channels.push_back(static_cast<cricket::VideoMediaChannel*>(
|
||||
video_channel->media_channel()));
|
||||
}
|
||||
}
|
||||
|
||||
if (!video_channels.empty()) {
|
||||
if (!video_media_channels.empty()) {
|
||||
pc_->worker_thread()->Invoke<void>(RTC_FROM_HERE, [&] {
|
||||
for (const auto& channel : video_channels) {
|
||||
for (const auto& channel : video_media_channels) {
|
||||
channel->FillBitrateInfo(&bwe_info);
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user