Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: talk/app/webrtc/peerconnection.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/peerconnection.h ('k') | talk/app/webrtc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 observer_->OnRemoveStream(stream); 855 observer_->OnRemoveStream(stream);
856 } 856 }
857 857
858 void PeerConnection::OnAddDataChannel(DataChannelInterface* data_channel) { 858 void PeerConnection::OnAddDataChannel(DataChannelInterface* data_channel) {
859 observer_->OnDataChannel(DataChannelProxy::Create(signaling_thread(), 859 observer_->OnDataChannel(DataChannelProxy::Create(signaling_thread(),
860 data_channel)); 860 data_channel));
861 } 861 }
862 862
863 void PeerConnection::OnAddRemoteAudioTrack(MediaStreamInterface* stream, 863 void PeerConnection::OnAddRemoteAudioTrack(MediaStreamInterface* stream,
864 AudioTrackInterface* audio_track, 864 AudioTrackInterface* audio_track,
865 uint32 ssrc) { 865 uint32_t ssrc) {
866 receivers_.push_back(new AudioRtpReceiver(audio_track, ssrc, session_.get())); 866 receivers_.push_back(new AudioRtpReceiver(audio_track, ssrc, session_.get()));
867 } 867 }
868 868
869 void PeerConnection::OnAddRemoteVideoTrack(MediaStreamInterface* stream, 869 void PeerConnection::OnAddRemoteVideoTrack(MediaStreamInterface* stream,
870 VideoTrackInterface* video_track, 870 VideoTrackInterface* video_track,
871 uint32 ssrc) { 871 uint32_t ssrc) {
872 receivers_.push_back(new VideoRtpReceiver(video_track, ssrc, session_.get())); 872 receivers_.push_back(new VideoRtpReceiver(video_track, ssrc, session_.get()));
873 } 873 }
874 874
875 // TODO(deadbeef): Keep RtpReceivers around even if track goes away in remote 875 // TODO(deadbeef): Keep RtpReceivers around even if track goes away in remote
876 // description. 876 // description.
877 void PeerConnection::OnRemoveRemoteAudioTrack( 877 void PeerConnection::OnRemoveRemoteAudioTrack(
878 MediaStreamInterface* stream, 878 MediaStreamInterface* stream,
879 AudioTrackInterface* audio_track) { 879 AudioTrackInterface* audio_track) {
880 auto it = FindReceiverForTrack(audio_track); 880 auto it = FindReceiverForTrack(audio_track);
881 if (it == receivers_.end()) { 881 if (it == receivers_.end()) {
(...skipping 13 matching lines...) Expand all
895 LOG(LS_WARNING) << "RtpReceiver for track with id " << video_track->id() 895 LOG(LS_WARNING) << "RtpReceiver for track with id " << video_track->id()
896 << " doesn't exist."; 896 << " doesn't exist.";
897 } else { 897 } else {
898 (*it)->Stop(); 898 (*it)->Stop();
899 receivers_.erase(it); 899 receivers_.erase(it);
900 } 900 }
901 } 901 }
902 902
903 void PeerConnection::OnAddLocalAudioTrack(MediaStreamInterface* stream, 903 void PeerConnection::OnAddLocalAudioTrack(MediaStreamInterface* stream,
904 AudioTrackInterface* audio_track, 904 AudioTrackInterface* audio_track,
905 uint32 ssrc) { 905 uint32_t ssrc) {
906 senders_.push_back(new AudioRtpSender(audio_track, ssrc, session_.get())); 906 senders_.push_back(new AudioRtpSender(audio_track, ssrc, session_.get()));
907 stats_->AddLocalAudioTrack(audio_track, ssrc); 907 stats_->AddLocalAudioTrack(audio_track, ssrc);
908 } 908 }
909 909
910 void PeerConnection::OnAddLocalVideoTrack(MediaStreamInterface* stream, 910 void PeerConnection::OnAddLocalVideoTrack(MediaStreamInterface* stream,
911 VideoTrackInterface* video_track, 911 VideoTrackInterface* video_track,
912 uint32 ssrc) { 912 uint32_t ssrc) {
913 senders_.push_back(new VideoRtpSender(video_track, ssrc, session_.get())); 913 senders_.push_back(new VideoRtpSender(video_track, ssrc, session_.get()));
914 } 914 }
915 915
916 // TODO(deadbeef): Keep RtpSenders around even if track goes away in local 916 // TODO(deadbeef): Keep RtpSenders around even if track goes away in local
917 // description. 917 // description.
918 void PeerConnection::OnRemoveLocalAudioTrack(MediaStreamInterface* stream, 918 void PeerConnection::OnRemoveLocalAudioTrack(MediaStreamInterface* stream,
919 AudioTrackInterface* audio_track, 919 AudioTrackInterface* audio_track,
920 uint32 ssrc) { 920 uint32_t ssrc) {
921 auto it = FindSenderForTrack(audio_track); 921 auto it = FindSenderForTrack(audio_track);
922 if (it == senders_.end()) { 922 if (it == senders_.end()) {
923 LOG(LS_WARNING) << "RtpSender for track with id " << audio_track->id() 923 LOG(LS_WARNING) << "RtpSender for track with id " << audio_track->id()
924 << " doesn't exist."; 924 << " doesn't exist.";
925 return; 925 return;
926 } else { 926 } else {
927 (*it)->Stop(); 927 (*it)->Stop();
928 senders_.erase(it); 928 senders_.erase(it);
929 } 929 }
930 stats_->RemoveLocalAudioTrack(audio_track, ssrc); 930 stats_->RemoveLocalAudioTrack(audio_track, ssrc);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator 1010 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator
1011 PeerConnection::FindReceiverForTrack(MediaStreamTrackInterface* track) { 1011 PeerConnection::FindReceiverForTrack(MediaStreamTrackInterface* track) {
1012 return std::find_if( 1012 return std::find_if(
1013 receivers_.begin(), receivers_.end(), 1013 receivers_.begin(), receivers_.end(),
1014 [track](const rtc::scoped_refptr<RtpReceiverInterface>& receiver) { 1014 [track](const rtc::scoped_refptr<RtpReceiverInterface>& receiver) {
1015 return receiver->track() == track; 1015 return receiver->track() == track;
1016 }); 1016 });
1017 } 1017 }
1018 1018
1019 } // namespace webrtc 1019 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnection.h ('k') | talk/app/webrtc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698