зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1766646 - Vendor libwebrtc from efe46b6bee
Upstream commit: https://webrtc.googlesource.com/src/+/efe46b6beea9c1f31d3e6686bb1fd0c7d5f35375 Change the type of RTCVideoSourceStats.framesPerSecond Spec: https://w3c.github.io/webrtc-stats/#dom-rtcvideosourcestats-framespersecond Bug: webrtc:12905 Change-Id: If53e2e480e2d6f687c3f8bb95a9e1d1e386fe9c2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237420 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com> Cr-Commit-Position: refs/heads/main@{#35352}
This commit is contained in:
Родитель
ba190cf9f6
Коммит
7f31ae016c
|
@ -9594,3 +9594,6 @@ f0f474373c
|
|||
# MOZ_LIBWEBRTC_SRC=/home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src MOZ_LIBWEBRTC_COMMIT=mjfdev bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
|
||||
# base of lastest vendoring
|
||||
45448e9c1c
|
||||
# MOZ_LIBWEBRTC_SRC=/home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src MOZ_LIBWEBRTC_COMMIT=mjfdev bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
|
||||
# base of lastest vendoring
|
||||
efe46b6bee
|
||||
|
|
|
@ -6404,3 +6404,5 @@ libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwe
|
|||
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-06-12T02:23:48.859823.
|
||||
# python3 vendor-libwebrtc.py --from-local /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src --commit mjfdev libwebrtc
|
||||
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-06-12T02:27:51.453505.
|
||||
# python3 vendor-libwebrtc.py --from-local /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src --commit mjfdev libwebrtc
|
||||
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-06-12T02:31:59.658828.
|
||||
|
|
|
@ -649,7 +649,7 @@ class RTC_EXPORT RTCVideoSourceStats final : public RTCMediaSourceStats {
|
|||
RTCStatsMember<uint32_t> width;
|
||||
RTCStatsMember<uint32_t> height;
|
||||
RTCStatsMember<uint32_t> frames;
|
||||
RTCStatsMember<uint32_t> frames_per_second;
|
||||
RTCStatsMember<double> frames_per_second;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webrtc-stats/#transportstats-dict*
|
||||
|
|
|
@ -362,6 +362,7 @@ rtc_library("video_stream_api") {
|
|||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:stringutils",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "api/crypto/frame_encryptor_interface.h"
|
||||
#include "rtc_base/strings/string_builder.h"
|
||||
#include "rtc_base/strings/string_format.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
|
@ -71,7 +72,7 @@ std::string VideoSendStream::Stats::ToString(int64_t time_ms) const {
|
|||
char buf[2048];
|
||||
rtc::SimpleStringBuilder ss(buf);
|
||||
ss << "VideoSendStream stats: " << time_ms << ", {";
|
||||
ss << "input_fps: " << input_frame_rate << ", ";
|
||||
ss << "input_fps: " << rtc::StringFormat("%.1f", input_frame_rate) << ", ";
|
||||
ss << "encode_fps: " << encode_frame_rate << ", ";
|
||||
ss << "encode_ms: " << avg_encode_time_ms << ", ";
|
||||
ss << "encode_usage_perc: " << encode_usage_percent << ", ";
|
||||
|
|
|
@ -98,7 +98,7 @@ class VideoSendStream {
|
|||
~Stats();
|
||||
std::string ToString(int64_t time_ms) const;
|
||||
std::string encoder_implementation_name = "unknown";
|
||||
int input_frame_rate = 0;
|
||||
double input_frame_rate = 0;
|
||||
int encode_frame_rate = 0;
|
||||
int avg_encode_time_ms = 0;
|
||||
int encode_usage_percent = 0;
|
||||
|
|
|
@ -549,7 +549,7 @@ struct VideoSenderInfo : public MediaSenderInfo {
|
|||
int send_frame_width = 0;
|
||||
int send_frame_height = 0;
|
||||
int frames = 0;
|
||||
int framerate_input = 0;
|
||||
double framerate_input = 0;
|
||||
int framerate_sent = 0;
|
||||
int aggregated_framerate_sent = 0;
|
||||
int nominal_bitrate = 0;
|
||||
|
|
|
@ -5479,7 +5479,7 @@ TEST_F(WebRtcVideoChannelTest, GetStatsReportsPerLayerQpSum) {
|
|||
webrtc::VideoSendStream::Stats GetInitialisedStats() {
|
||||
webrtc::VideoSendStream::Stats stats;
|
||||
stats.encoder_implementation_name = "vp";
|
||||
stats.input_frame_rate = 1;
|
||||
stats.input_frame_rate = 1.0;
|
||||
stats.encode_frame_rate = 2;
|
||||
stats.avg_encode_time_ms = 3;
|
||||
stats.encode_usage_percent = 4;
|
||||
|
|
|
@ -2701,11 +2701,11 @@ TEST_F(RTCStatsCollectorTest, RTCVideoSourceStatsCollectedForSenderWithTrack) {
|
|||
video_media_info.senders.push_back(cricket::VideoSenderInfo());
|
||||
video_media_info.senders[0].local_stats.push_back(cricket::SsrcSenderInfo());
|
||||
video_media_info.senders[0].local_stats[0].ssrc = kSsrc;
|
||||
video_media_info.senders[0].framerate_input = 29;
|
||||
video_media_info.senders[0].framerate_input = 29.0;
|
||||
video_media_info.aggregated_senders[0].local_stats.push_back(
|
||||
cricket::SsrcSenderInfo());
|
||||
video_media_info.aggregated_senders[0].local_stats[0].ssrc = kSsrc;
|
||||
video_media_info.aggregated_senders[0].framerate_input = 29;
|
||||
video_media_info.aggregated_senders[0].framerate_input = 29.0;
|
||||
video_media_info.aggregated_senders[0].frames = 10001;
|
||||
auto* video_media_channel = pc_->AddVideoChannel("VideoMid", "TransportName");
|
||||
video_media_channel->SetStats(video_media_info);
|
||||
|
@ -2726,7 +2726,7 @@ TEST_F(RTCStatsCollectorTest, RTCVideoSourceStatsCollectedForSenderWithTrack) {
|
|||
expected_video.kind = "video";
|
||||
expected_video.width = kVideoSourceWidth;
|
||||
expected_video.height = kVideoSourceHeight;
|
||||
expected_video.frames_per_second = 29;
|
||||
expected_video.frames_per_second = 29.0;
|
||||
expected_video.frames = 10001;
|
||||
|
||||
ASSERT_TRUE(report->Get(expected_video.id()));
|
||||
|
@ -2750,7 +2750,7 @@ TEST_F(RTCStatsCollectorTest,
|
|||
cricket::VideoMediaInfo video_media_info;
|
||||
video_media_info.senders.push_back(cricket::VideoSenderInfo());
|
||||
video_media_info.senders[0].local_stats.push_back(cricket::SsrcSenderInfo());
|
||||
video_media_info.senders[0].framerate_input = 29;
|
||||
video_media_info.senders[0].framerate_input = 29.0;
|
||||
auto* video_media_channel = pc_->AddVideoChannel("VideoMid", "TransportName");
|
||||
video_media_channel->SetStats(video_media_info);
|
||||
|
||||
|
@ -2781,7 +2781,7 @@ TEST_F(RTCStatsCollectorTest,
|
|||
video_media_info.senders.push_back(cricket::VideoSenderInfo());
|
||||
video_media_info.senders[0].local_stats.push_back(cricket::SsrcSenderInfo());
|
||||
video_media_info.senders[0].local_stats[0].ssrc = kSsrc;
|
||||
video_media_info.senders[0].framerate_input = 29;
|
||||
video_media_info.senders[0].framerate_input = 29.0;
|
||||
auto* video_media_channel = pc_->AddVideoChannel("VideoMid", "TransportName");
|
||||
video_media_channel->SetStats(video_media_info);
|
||||
|
||||
|
@ -3133,7 +3133,7 @@ TEST_F(RTCStatsCollectorTest,
|
|||
video_media_info.senders.push_back(cricket::VideoSenderInfo());
|
||||
video_media_info.senders[0].local_stats.push_back(cricket::SsrcSenderInfo());
|
||||
video_media_info.senders[0].local_stats[0].ssrc = kSsrc;
|
||||
video_media_info.senders[0].framerate_input = 29;
|
||||
video_media_info.senders[0].framerate_input = 29.0;
|
||||
auto* video_media_channel = pc_->AddVideoChannel("VideoMid", "TransportName");
|
||||
video_media_channel->SetStats(video_media_info);
|
||||
|
||||
|
|
|
@ -1112,7 +1112,7 @@ class RTCStatsReportVerifier {
|
|||
verifier.TestMemberIsUndefined(video_source.width);
|
||||
verifier.TestMemberIsUndefined(video_source.height);
|
||||
verifier.TestMemberIsNonNegative<uint32_t>(video_source.frames);
|
||||
verifier.TestMemberIsNonNegative<uint32_t>(video_source.frames_per_second);
|
||||
verifier.TestMemberIsNonNegative<double>(video_source.frames_per_second);
|
||||
return verifier.ExpectAllMembersSuccessfullyTested();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
|
@ -385,7 +386,7 @@ void ExtractStats(const cricket::VideoSenderInfo& info,
|
|||
info.encode_usage_percent},
|
||||
{StatsReport::kStatsValueNameFirsReceived, info.firs_rcvd},
|
||||
{StatsReport::kStatsValueNameFrameHeightSent, info.send_frame_height},
|
||||
{StatsReport::kStatsValueNameFrameRateInput, info.framerate_input},
|
||||
{StatsReport::kStatsValueNameFrameRateInput, round(info.framerate_input)},
|
||||
{StatsReport::kStatsValueNameFrameRateSent, info.framerate_sent},
|
||||
{StatsReport::kStatsValueNameFrameWidthSent, info.send_frame_width},
|
||||
{StatsReport::kStatsValueNameNacksReceived, info.nacks_rcvd},
|
||||
|
|
|
@ -737,7 +737,7 @@ VideoSendStream::Stats SendStatisticsProxy::GetStats() {
|
|||
MutexLock lock(&mutex_);
|
||||
PurgeOldStats();
|
||||
stats_.input_frame_rate =
|
||||
round(uma_container_->input_frame_rate_tracker_.ComputeRate());
|
||||
uma_container_->input_frame_rate_tracker_.ComputeRate();
|
||||
stats_.frames =
|
||||
uma_container_->input_frame_rate_tracker_.TotalSampleCount();
|
||||
stats_.content_type =
|
||||
|
|
Загрузка…
Ссылка в новой задаче