stats: remove media_type which was an alias for kind
The web compat requirement that was the reason for keeping is now solved in Chromium and its stats bindings. BUG=webrtc:9674 Change-Id: Ifb722769414b2bcc5f4d36d7dff87a875336e039 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303860 Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40024}
This commit is contained in:
parent
1276ce3512
commit
e0034a800e
@ -368,9 +368,6 @@ class RTC_EXPORT RTCRtpStreamStats : public RTCStats {
|
|||||||
RTCStatsMember<std::string> transport_id;
|
RTCStatsMember<std::string> transport_id;
|
||||||
RTCStatsMember<std::string> codec_id;
|
RTCStatsMember<std::string> codec_id;
|
||||||
|
|
||||||
// Obsolete
|
|
||||||
RTCStatsMember<std::string> media_type; // renamed to kind.
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RTCRtpStreamStats(std::string id, Timestamp timestamp);
|
RTCRtpStreamStats(std::string id, Timestamp timestamp);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -463,7 +463,6 @@ std::unique_ptr<RTCInboundRtpStreamStats> CreateInboundAudioStreamStats(
|
|||||||
inbound_audio.get());
|
inbound_audio.get());
|
||||||
inbound_audio->transport_id = transport_id;
|
inbound_audio->transport_id = transport_id;
|
||||||
inbound_audio->mid = mid;
|
inbound_audio->mid = mid;
|
||||||
inbound_audio->media_type = "audio";
|
|
||||||
inbound_audio->kind = "audio";
|
inbound_audio->kind = "audio";
|
||||||
if (voice_receiver_info.codec_payload_type.has_value()) {
|
if (voice_receiver_info.codec_payload_type.has_value()) {
|
||||||
auto codec_param_it = voice_media_info.receive_codecs.find(
|
auto codec_param_it = voice_media_info.receive_codecs.find(
|
||||||
@ -609,7 +608,6 @@ CreateInboundRTPStreamStatsFromVideoReceiverInfo(
|
|||||||
inbound_video.get());
|
inbound_video.get());
|
||||||
inbound_video->transport_id = transport_id;
|
inbound_video->transport_id = transport_id;
|
||||||
inbound_video->mid = mid;
|
inbound_video->mid = mid;
|
||||||
inbound_video->media_type = "video";
|
|
||||||
inbound_video->kind = "video";
|
inbound_video->kind = "video";
|
||||||
if (video_receiver_info.codec_payload_type.has_value()) {
|
if (video_receiver_info.codec_payload_type.has_value()) {
|
||||||
auto codec_param_it = video_media_info.receive_codecs.find(
|
auto codec_param_it = video_media_info.receive_codecs.find(
|
||||||
@ -737,7 +735,6 @@ CreateOutboundRTPStreamStatsFromVoiceSenderInfo(
|
|||||||
outbound_audio.get());
|
outbound_audio.get());
|
||||||
outbound_audio->transport_id = transport_id;
|
outbound_audio->transport_id = transport_id;
|
||||||
outbound_audio->mid = mid;
|
outbound_audio->mid = mid;
|
||||||
outbound_audio->media_type = "audio";
|
|
||||||
outbound_audio->kind = "audio";
|
outbound_audio->kind = "audio";
|
||||||
if (voice_sender_info.target_bitrate.has_value() &&
|
if (voice_sender_info.target_bitrate.has_value() &&
|
||||||
*voice_sender_info.target_bitrate > 0) {
|
*voice_sender_info.target_bitrate > 0) {
|
||||||
@ -774,7 +771,6 @@ CreateOutboundRTPStreamStatsFromVideoSenderInfo(
|
|||||||
outbound_video.get());
|
outbound_video.get());
|
||||||
outbound_video->transport_id = transport_id;
|
outbound_video->transport_id = transport_id;
|
||||||
outbound_video->mid = mid;
|
outbound_video->mid = mid;
|
||||||
outbound_video->media_type = "video";
|
|
||||||
outbound_video->kind = "video";
|
outbound_video->kind = "video";
|
||||||
if (video_sender_info.codec_payload_type.has_value()) {
|
if (video_sender_info.codec_payload_type.has_value()) {
|
||||||
auto codec_param_it = video_media_info.send_codecs.find(
|
auto codec_param_it = video_media_info.send_codecs.find(
|
||||||
|
|||||||
@ -2530,7 +2530,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRtpStreamStats_Audio) {
|
|||||||
RTCInboundRtpStreamStats expected_audio("ITTransportName1A1",
|
RTCInboundRtpStreamStats expected_audio("ITTransportName1A1",
|
||||||
report->timestamp());
|
report->timestamp());
|
||||||
expected_audio.ssrc = 1;
|
expected_audio.ssrc = 1;
|
||||||
expected_audio.media_type = "audio";
|
|
||||||
expected_audio.kind = "audio";
|
expected_audio.kind = "audio";
|
||||||
expected_audio.track_identifier = "RemoteAudioTrackID";
|
expected_audio.track_identifier = "RemoteAudioTrackID";
|
||||||
expected_audio.mid = "AudioMid";
|
expected_audio.mid = "AudioMid";
|
||||||
@ -2701,7 +2700,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRtpStreamStats_Video) {
|
|||||||
RTCInboundRtpStreamStats expected_video("ITTransportName1V1",
|
RTCInboundRtpStreamStats expected_video("ITTransportName1V1",
|
||||||
report->timestamp());
|
report->timestamp());
|
||||||
expected_video.ssrc = 1;
|
expected_video.ssrc = 1;
|
||||||
expected_video.media_type = "video";
|
|
||||||
expected_video.kind = "video";
|
expected_video.kind = "video";
|
||||||
expected_video.track_identifier = "RemoteVideoTrackID";
|
expected_video.track_identifier = "RemoteVideoTrackID";
|
||||||
expected_video.mid = "VideoMid";
|
expected_video.mid = "VideoMid";
|
||||||
@ -2877,7 +2875,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCOutboundRtpStreamStats_Audio) {
|
|||||||
// `expected_audio.remote_id` should be undefined.
|
// `expected_audio.remote_id` should be undefined.
|
||||||
expected_audio.mid = "AudioMid";
|
expected_audio.mid = "AudioMid";
|
||||||
expected_audio.ssrc = 1;
|
expected_audio.ssrc = 1;
|
||||||
expected_audio.media_type = "audio";
|
|
||||||
expected_audio.kind = "audio";
|
expected_audio.kind = "audio";
|
||||||
expected_audio.track_id =
|
expected_audio.track_id =
|
||||||
IdForType<DEPRECATED_RTCMediaStreamTrackStats>(report.get());
|
IdForType<DEPRECATED_RTCMediaStreamTrackStats>(report.get());
|
||||||
@ -2973,7 +2970,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCOutboundRtpStreamStats_Video) {
|
|||||||
// `expected_video.remote_id` should be undefined.
|
// `expected_video.remote_id` should be undefined.
|
||||||
expected_video.mid = "VideoMid";
|
expected_video.mid = "VideoMid";
|
||||||
expected_video.ssrc = 1;
|
expected_video.ssrc = 1;
|
||||||
expected_video.media_type = "video";
|
|
||||||
expected_video.kind = "video";
|
expected_video.kind = "video";
|
||||||
expected_video.track_id = stats_of_track_type[0]->id();
|
expected_video.track_id = stats_of_track_type[0]->id();
|
||||||
expected_video.transport_id = "TTransportName1";
|
expected_video.transport_id = "TTransportName1";
|
||||||
@ -3319,7 +3315,6 @@ TEST_F(RTCStatsCollectorTest, CollectNoStreamRTCOutboundRtpStreamStats_Audio) {
|
|||||||
expected_audio.media_source_id = "SA50";
|
expected_audio.media_source_id = "SA50";
|
||||||
expected_audio.mid = "AudioMid";
|
expected_audio.mid = "AudioMid";
|
||||||
expected_audio.ssrc = 1;
|
expected_audio.ssrc = 1;
|
||||||
expected_audio.media_type = "audio";
|
|
||||||
expected_audio.kind = "audio";
|
expected_audio.kind = "audio";
|
||||||
expected_audio.track_id =
|
expected_audio.track_id =
|
||||||
IdForType<DEPRECATED_RTCMediaStreamTrackStats>(report.get());
|
IdForType<DEPRECATED_RTCMediaStreamTrackStats>(report.get());
|
||||||
|
|||||||
@ -723,11 +723,9 @@ class RTCStatsReportVerifier {
|
|||||||
// hierarcy.
|
// hierarcy.
|
||||||
if (stream.type() == RTCInboundRtpStreamStats::kType ||
|
if (stream.type() == RTCInboundRtpStreamStats::kType ||
|
||||||
stream.type() == RTCOutboundRtpStreamStats::kType) {
|
stream.type() == RTCOutboundRtpStreamStats::kType) {
|
||||||
verifier.TestMemberIsDefined(stream.media_type);
|
|
||||||
verifier.TestMemberIsIDReference(
|
verifier.TestMemberIsIDReference(
|
||||||
stream.track_id, DEPRECATED_RTCMediaStreamTrackStats::kType);
|
stream.track_id, DEPRECATED_RTCMediaStreamTrackStats::kType);
|
||||||
} else {
|
} else {
|
||||||
verifier.TestMemberIsUndefined(stream.media_type);
|
|
||||||
verifier.TestMemberIsUndefined(stream.track_id);
|
verifier.TestMemberIsUndefined(stream.track_id);
|
||||||
}
|
}
|
||||||
verifier.TestMemberIsIDReference(stream.transport_id,
|
verifier.TestMemberIsIDReference(stream.transport_id,
|
||||||
|
|||||||
@ -401,8 +401,7 @@ WEBRTC_RTCSTATS_IMPL(RTCRtpStreamStats, RTCStats, "rtp",
|
|||||||
&kind,
|
&kind,
|
||||||
&track_id,
|
&track_id,
|
||||||
&transport_id,
|
&transport_id,
|
||||||
&codec_id,
|
&codec_id)
|
||||||
&media_type)
|
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
RTCRtpStreamStats::RTCRtpStreamStats(std::string id, Timestamp timestamp)
|
RTCRtpStreamStats::RTCRtpStreamStats(std::string id, Timestamp timestamp)
|
||||||
@ -411,8 +410,7 @@ RTCRtpStreamStats::RTCRtpStreamStats(std::string id, Timestamp timestamp)
|
|||||||
kind("kind"),
|
kind("kind"),
|
||||||
track_id("trackId"),
|
track_id("trackId"),
|
||||||
transport_id("transportId"),
|
transport_id("transportId"),
|
||||||
codec_id("codecId"),
|
codec_id("codecId") {}
|
||||||
media_type("mediaType") {}
|
|
||||||
|
|
||||||
RTCRtpStreamStats::RTCRtpStreamStats(const RTCRtpStreamStats& other) = default;
|
RTCRtpStreamStats::RTCRtpStreamStats(const RTCRtpStreamStats& other) = default;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user