| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 new RTCInboundRTPStreamStats( | 923 new RTCInboundRTPStreamStats( |
| 924 RTCInboundRTPStreamStatsIDFromSSRC( | 924 RTCInboundRTPStreamStatsIDFromSSRC( |
| 925 true, voice_receiver_info.ssrc()), | 925 true, voice_receiver_info.ssrc()), |
| 926 timestamp_us)); | 926 timestamp_us)); |
| 927 SetInboundRTPStreamStatsFromVoiceReceiverInfo( | 927 SetInboundRTPStreamStatsFromVoiceReceiverInfo( |
| 928 voice_receiver_info, inbound_audio.get()); | 928 voice_receiver_info, inbound_audio.get()); |
| 929 rtc::scoped_refptr<AudioTrackInterface> audio_track = | 929 rtc::scoped_refptr<AudioTrackInterface> audio_track = |
| 930 track_media_info_map_->GetAudioTrack(voice_receiver_info); | 930 track_media_info_map_->GetAudioTrack(voice_receiver_info); |
| 931 if (audio_track) { | 931 if (audio_track) { |
| 932 RTC_DCHECK(track_to_id_.find(audio_track.get()) != track_to_id_.end()); | 932 RTC_DCHECK(track_to_id_.find(audio_track.get()) != track_to_id_.end()); |
| 933 inbound_audio->media_track_id = | 933 inbound_audio->track_id = |
| 934 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( | 934 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( |
| 935 false, | 935 false, |
| 936 MediaStreamTrackInterface::kAudioKind, | 936 MediaStreamTrackInterface::kAudioKind, |
| 937 track_to_id_.find(audio_track.get())->second, | 937 track_to_id_.find(audio_track.get())->second, |
| 938 voice_receiver_info.ssrc()); | 938 voice_receiver_info.ssrc()); |
| 939 } | 939 } |
| 940 inbound_audio->transport_id = transport_id; | 940 inbound_audio->transport_id = transport_id; |
| 941 if (voice_receiver_info.codec_payload_type) { | 941 if (voice_receiver_info.codec_payload_type) { |
| 942 inbound_audio->codec_id = | 942 inbound_audio->codec_id = |
| 943 RTCCodecStatsIDFromDirectionMediaAndPayload( | 943 RTCCodecStatsIDFromDirectionMediaAndPayload( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 956 new RTCOutboundRTPStreamStats( | 956 new RTCOutboundRTPStreamStats( |
| 957 RTCOutboundRTPStreamStatsIDFromSSRC( | 957 RTCOutboundRTPStreamStatsIDFromSSRC( |
| 958 true, voice_sender_info.ssrc()), | 958 true, voice_sender_info.ssrc()), |
| 959 timestamp_us)); | 959 timestamp_us)); |
| 960 SetOutboundRTPStreamStatsFromVoiceSenderInfo( | 960 SetOutboundRTPStreamStatsFromVoiceSenderInfo( |
| 961 voice_sender_info, outbound_audio.get()); | 961 voice_sender_info, outbound_audio.get()); |
| 962 rtc::scoped_refptr<AudioTrackInterface> audio_track = | 962 rtc::scoped_refptr<AudioTrackInterface> audio_track = |
| 963 track_media_info_map_->GetAudioTrack(voice_sender_info); | 963 track_media_info_map_->GetAudioTrack(voice_sender_info); |
| 964 if (audio_track) { | 964 if (audio_track) { |
| 965 RTC_DCHECK(track_to_id_.find(audio_track.get()) != track_to_id_.end()); | 965 RTC_DCHECK(track_to_id_.find(audio_track.get()) != track_to_id_.end()); |
| 966 outbound_audio->media_track_id = | 966 outbound_audio->track_id = |
| 967 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( | 967 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( |
| 968 true, | 968 true, |
| 969 MediaStreamTrackInterface::kAudioKind, | 969 MediaStreamTrackInterface::kAudioKind, |
| 970 track_to_id_.find(audio_track.get())->second, | 970 track_to_id_.find(audio_track.get())->second, |
| 971 voice_sender_info.ssrc()); | 971 voice_sender_info.ssrc()); |
| 972 } | 972 } |
| 973 outbound_audio->transport_id = transport_id; | 973 outbound_audio->transport_id = transport_id; |
| 974 if (voice_sender_info.codec_payload_type) { | 974 if (voice_sender_info.codec_payload_type) { |
| 975 outbound_audio->codec_id = | 975 outbound_audio->codec_id = |
| 976 RTCCodecStatsIDFromDirectionMediaAndPayload( | 976 RTCCodecStatsIDFromDirectionMediaAndPayload( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 995 new RTCInboundRTPStreamStats( | 995 new RTCInboundRTPStreamStats( |
| 996 RTCInboundRTPStreamStatsIDFromSSRC( | 996 RTCInboundRTPStreamStatsIDFromSSRC( |
| 997 false, video_receiver_info.ssrc()), | 997 false, video_receiver_info.ssrc()), |
| 998 timestamp_us)); | 998 timestamp_us)); |
| 999 SetInboundRTPStreamStatsFromVideoReceiverInfo( | 999 SetInboundRTPStreamStatsFromVideoReceiverInfo( |
| 1000 video_receiver_info, inbound_video.get()); | 1000 video_receiver_info, inbound_video.get()); |
| 1001 rtc::scoped_refptr<VideoTrackInterface> video_track = | 1001 rtc::scoped_refptr<VideoTrackInterface> video_track = |
| 1002 track_media_info_map_->GetVideoTrack(video_receiver_info); | 1002 track_media_info_map_->GetVideoTrack(video_receiver_info); |
| 1003 if (video_track) { | 1003 if (video_track) { |
| 1004 RTC_DCHECK(track_to_id_.find(video_track.get()) != track_to_id_.end()); | 1004 RTC_DCHECK(track_to_id_.find(video_track.get()) != track_to_id_.end()); |
| 1005 inbound_video->media_track_id = | 1005 inbound_video->track_id = |
| 1006 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( | 1006 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( |
| 1007 false, | 1007 false, |
| 1008 MediaStreamTrackInterface::kVideoKind, | 1008 MediaStreamTrackInterface::kVideoKind, |
| 1009 track_to_id_.find(video_track.get())->second, | 1009 track_to_id_.find(video_track.get())->second, |
| 1010 video_receiver_info.ssrc()); | 1010 video_receiver_info.ssrc()); |
| 1011 } | 1011 } |
| 1012 inbound_video->transport_id = transport_id; | 1012 inbound_video->transport_id = transport_id; |
| 1013 if (video_receiver_info.codec_payload_type) { | 1013 if (video_receiver_info.codec_payload_type) { |
| 1014 inbound_video->codec_id = | 1014 inbound_video->codec_id = |
| 1015 RTCCodecStatsIDFromDirectionMediaAndPayload( | 1015 RTCCodecStatsIDFromDirectionMediaAndPayload( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1028 new RTCOutboundRTPStreamStats( | 1028 new RTCOutboundRTPStreamStats( |
| 1029 RTCOutboundRTPStreamStatsIDFromSSRC( | 1029 RTCOutboundRTPStreamStatsIDFromSSRC( |
| 1030 false, video_sender_info.ssrc()), | 1030 false, video_sender_info.ssrc()), |
| 1031 timestamp_us)); | 1031 timestamp_us)); |
| 1032 SetOutboundRTPStreamStatsFromVideoSenderInfo( | 1032 SetOutboundRTPStreamStatsFromVideoSenderInfo( |
| 1033 video_sender_info, outbound_video.get()); | 1033 video_sender_info, outbound_video.get()); |
| 1034 rtc::scoped_refptr<VideoTrackInterface> video_track = | 1034 rtc::scoped_refptr<VideoTrackInterface> video_track = |
| 1035 track_media_info_map_->GetVideoTrack(video_sender_info); | 1035 track_media_info_map_->GetVideoTrack(video_sender_info); |
| 1036 if (video_track) { | 1036 if (video_track) { |
| 1037 RTC_DCHECK(track_to_id_.find(video_track.get()) != track_to_id_.end()); | 1037 RTC_DCHECK(track_to_id_.find(video_track.get()) != track_to_id_.end()); |
| 1038 outbound_video->media_track_id = | 1038 outbound_video->track_id = |
| 1039 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( | 1039 RTCMediaStreamTrackStatsIDFromTrackKindIDAndSsrc( |
| 1040 true, | 1040 true, |
| 1041 MediaStreamTrackInterface::kVideoKind, | 1041 MediaStreamTrackInterface::kVideoKind, |
| 1042 track_to_id_.find(video_track.get())->second, | 1042 track_to_id_.find(video_track.get())->second, |
| 1043 video_sender_info.ssrc()); | 1043 video_sender_info.ssrc()); |
| 1044 } | 1044 } |
| 1045 outbound_video->transport_id = transport_id; | 1045 outbound_video->transport_id = transport_id; |
| 1046 if (video_sender_info.codec_payload_type) { | 1046 if (video_sender_info.codec_payload_type) { |
| 1047 outbound_video->codec_id = | 1047 outbound_video->codec_id = |
| 1048 RTCCodecStatsIDFromDirectionMediaAndPayload( | 1048 RTCCodecStatsIDFromDirectionMediaAndPayload( |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 const std::string& type) { | 1222 const std::string& type) { |
| 1223 return CandidateTypeToRTCIceCandidateType(type); | 1223 return CandidateTypeToRTCIceCandidateType(type); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 const char* DataStateToRTCDataChannelStateForTesting( | 1226 const char* DataStateToRTCDataChannelStateForTesting( |
| 1227 DataChannelInterface::DataState state) { | 1227 DataChannelInterface::DataState state) { |
| 1228 return DataStateToRTCDataChannelState(state); | 1228 return DataStateToRTCDataChannelState(state); |
| 1229 } | 1229 } |
| 1230 | 1230 |
| 1231 } // namespace webrtc | 1231 } // namespace webrtc |
| OLD | NEW |