Rename RTCCodecStats.codec -> mimeType, parameters -> sdpFmtpLine.
As per https://github.com/w3c/webrtc-stats/pull/168. NOTRY due to broken linux_ubsan_vptr, all other tests passed. BUG=webrtc:7061 NOTRY=True Review-Url: https://codereview.webrtc.org/2718383002 Cr-Commit-Position: refs/heads/master@{#16907}
This commit is contained in:
parent
7562fc8adb
commit
13f54b2c56
@ -87,12 +87,12 @@ class RTCCodecStats final : public RTCStats {
|
||||
~RTCCodecStats() override;
|
||||
|
||||
RTCStatsMember<uint32_t> payload_type;
|
||||
RTCStatsMember<std::string> codec;
|
||||
RTCStatsMember<std::string> mime_type;
|
||||
RTCStatsMember<uint32_t> clock_rate;
|
||||
// TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061
|
||||
RTCStatsMember<uint32_t> channels;
|
||||
// TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061
|
||||
RTCStatsMember<std::string> parameters;
|
||||
RTCStatsMember<std::string> sdp_fmtp_line;
|
||||
// TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061
|
||||
RTCStatsMember<std::string> implementation;
|
||||
};
|
||||
|
||||
@ -334,10 +334,10 @@ class RTCStatsReportVerifier {
|
||||
const RTCCodecStats& codec) {
|
||||
RTCStatsVerifier verifier(report_, &codec);
|
||||
verifier.TestMemberIsDefined(codec.payload_type);
|
||||
verifier.TestMemberIsDefined(codec.codec);
|
||||
verifier.TestMemberIsDefined(codec.mime_type);
|
||||
verifier.TestMemberIsPositive<uint32_t>(codec.clock_rate);
|
||||
verifier.TestMemberIsUndefined(codec.channels);
|
||||
verifier.TestMemberIsUndefined(codec.parameters);
|
||||
verifier.TestMemberIsUndefined(codec.sdp_fmtp_line);
|
||||
verifier.TestMemberIsUndefined(codec.implementation);
|
||||
return verifier.ExpectAllMembersSuccessfullyTested();
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ std::unique_ptr<RTCCodecStats> CodecStatsFromRtpCodecParameters(
|
||||
RTCCodecStatsIDFromDirectionMediaAndPayload(inbound, audio, payload_type),
|
||||
timestamp_us));
|
||||
codec_stats->payload_type = payload_type;
|
||||
codec_stats->codec = codec_params.mime_type();
|
||||
codec_stats->mime_type = codec_params.mime_type();
|
||||
if (codec_params.clock_rate) {
|
||||
codec_stats->clock_rate = static_cast<uint32_t>(*codec_params.clock_rate);
|
||||
}
|
||||
|
||||
@ -826,25 +826,25 @@ TEST_F(RTCStatsCollectorTest, CollectRTCCodecStats) {
|
||||
RTCCodecStats expected_inbound_audio_codec(
|
||||
"RTCCodec_InboundAudio_1", report->timestamp_us());
|
||||
expected_inbound_audio_codec.payload_type = 1;
|
||||
expected_inbound_audio_codec.codec = "audio/opus";
|
||||
expected_inbound_audio_codec.mime_type = "audio/opus";
|
||||
expected_inbound_audio_codec.clock_rate = 1337;
|
||||
|
||||
RTCCodecStats expected_outbound_audio_codec(
|
||||
"RTCCodec_OutboundAudio_2", report->timestamp_us());
|
||||
expected_outbound_audio_codec.payload_type = 2;
|
||||
expected_outbound_audio_codec.codec = "audio/isac";
|
||||
expected_outbound_audio_codec.mime_type = "audio/isac";
|
||||
expected_outbound_audio_codec.clock_rate = 1338;
|
||||
|
||||
RTCCodecStats expected_inbound_video_codec(
|
||||
"RTCCodec_InboundVideo_3", report->timestamp_us());
|
||||
expected_inbound_video_codec.payload_type = 3;
|
||||
expected_inbound_video_codec.codec = "video/H264";
|
||||
expected_inbound_video_codec.mime_type = "video/H264";
|
||||
expected_inbound_video_codec.clock_rate = 1339;
|
||||
|
||||
RTCCodecStats expected_outbound_video_codec(
|
||||
"RTCCodec_OutboundVideo_4", report->timestamp_us());
|
||||
expected_outbound_video_codec.payload_type = 4;
|
||||
expected_outbound_video_codec.codec = "video/VP8";
|
||||
expected_outbound_video_codec.mime_type = "video/VP8";
|
||||
expected_outbound_video_codec.clock_rate = 1340;
|
||||
|
||||
ASSERT_TRUE(report->Get(expected_inbound_audio_codec.id()));
|
||||
|
||||
@ -72,10 +72,10 @@ RTCCertificateStats::~RTCCertificateStats() {
|
||||
|
||||
WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec",
|
||||
&payload_type,
|
||||
&codec,
|
||||
&mime_type,
|
||||
&clock_rate,
|
||||
&channels,
|
||||
¶meters,
|
||||
&sdp_fmtp_line,
|
||||
&implementation);
|
||||
|
||||
RTCCodecStats::RTCCodecStats(
|
||||
@ -87,10 +87,10 @@ RTCCodecStats::RTCCodecStats(
|
||||
std::string&& id, int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
payload_type("payloadType"),
|
||||
codec("codec"),
|
||||
mime_type("mimeType"),
|
||||
clock_rate("clockRate"),
|
||||
channels("channels"),
|
||||
parameters("parameters"),
|
||||
sdp_fmtp_line("sdpFmtpLine"),
|
||||
implementation("implementation") {
|
||||
}
|
||||
|
||||
@ -98,10 +98,10 @@ RTCCodecStats::RTCCodecStats(
|
||||
const RTCCodecStats& other)
|
||||
: RTCStats(other.id(), other.timestamp_us()),
|
||||
payload_type(other.payload_type),
|
||||
codec(other.codec),
|
||||
mime_type(other.mime_type),
|
||||
clock_rate(other.clock_rate),
|
||||
channels(other.channels),
|
||||
parameters(other.parameters),
|
||||
sdp_fmtp_line(other.sdp_fmtp_line),
|
||||
implementation(other.implementation) {
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user