Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_API_TRACKMEDIAINFOMAP_H_ | |
| 12 #define WEBRTC_API_TRACKMEDIAINFOMAP_H_ | |
| 13 | |
| 14 #include <map> | |
| 15 #include <memory> | |
| 16 #include <vector> | |
| 17 | |
| 18 #include "webrtc/api/mediastreaminterface.h" | |
| 19 #include "webrtc/api/rtpreceiverinterface.h" | |
| 20 #include "webrtc/api/rtpsenderinterface.h" | |
| 21 #include "webrtc/base/refcount.h" | |
| 22 #include "webrtc/media/base/mediachannel.h" | |
| 23 | |
| 24 namespace webrtc { | |
| 25 | |
| 26 class TrackMediaInfoMap { | |
|
hta-webrtc
2017/01/11 12:34:24
Class comment: What is this class for, and why doe
hbos
2017/01/11 15:55:33
Done.
| |
| 27 public: | |
| 28 TrackMediaInfoMap( | |
| 29 std::unique_ptr<cricket::VoiceMediaInfo> voice_media_info, | |
| 30 std::unique_ptr<cricket::VideoMediaInfo> video_media_info, | |
| 31 const std::vector<rtc::scoped_refptr<RtpSenderInterface>>& rtp_senders, | |
| 32 const std::vector<rtc::scoped_refptr<RtpReceiverInterface>>& | |
| 33 rtp_receivers); | |
| 34 | |
| 35 const cricket::VoiceMediaInfo* voice_media_info() const { | |
| 36 return voice_media_info_.get(); | |
| 37 } | |
| 38 const cricket::VideoMediaInfo* video_media_info() const { | |
| 39 return video_media_info_.get(); | |
| 40 } | |
| 41 | |
| 42 const std::vector<cricket::VoiceSenderInfo*>* GetVoiceSenderInfos( | |
| 43 const AudioTrackInterface& local_audio_track) const; | |
| 44 const cricket::VoiceReceiverInfo* GetVoiceReceiverInfo( | |
| 45 const AudioTrackInterface& remote_audio_track) const; | |
| 46 const std::vector<cricket::VideoSenderInfo*>* GetVideoSenderInfos( | |
| 47 const VideoTrackInterface& local_video_track) const; | |
| 48 const cricket::VideoReceiverInfo* GetVideoReceiverInfo( | |
| 49 const VideoTrackInterface& remote_video_track) const; | |
| 50 | |
| 51 rtc::scoped_refptr<AudioTrackInterface> GetAudioTrack( | |
| 52 const cricket::VoiceSenderInfo& voice_sender_info) const; | |
| 53 rtc::scoped_refptr<AudioTrackInterface> GetAudioTrack( | |
| 54 const cricket::VoiceReceiverInfo& voice_receiver_info) const; | |
| 55 rtc::scoped_refptr<VideoTrackInterface> GetVideoTrack( | |
| 56 const cricket::VideoSenderInfo& video_sender_info) const; | |
| 57 rtc::scoped_refptr<VideoTrackInterface> GetVideoTrack( | |
| 58 const cricket::VideoReceiverInfo& video_receiver_info) const; | |
| 59 | |
| 60 private: | |
| 61 std::unique_ptr<cricket::VoiceMediaInfo> voice_media_info_; | |
| 62 std::unique_ptr<cricket::VideoMediaInfo> video_media_info_; | |
| 63 // Tracks to infos. | |
|
hta-webrtc
2017/01/11 12:34:24
Use complete sentences. "These maps map tracks (id
hbos
2017/01/11 15:55:33
Done.
| |
| 64 std::map<const AudioTrackInterface*, std::vector<cricket::VoiceSenderInfo*>> | |
| 65 local_audio_track_to_infos_; | |
| 66 std::map<const AudioTrackInterface*, cricket::VoiceReceiverInfo*> | |
| 67 remote_audio_track_to_info_; | |
| 68 std::map<const VideoTrackInterface*, std::vector<cricket::VideoSenderInfo*>> | |
| 69 local_video_track_to_infos_; | |
| 70 std::map<const VideoTrackInterface*, cricket::VideoReceiverInfo*> | |
| 71 remote_video_track_to_info_; | |
| 72 // Infos to tracks. | |
|
hta-webrtc
2017/01/11 12:34:24
These maps map info objects to their corresponding
hbos
2017/01/11 15:55:33
Done.
| |
| 73 std::map<const cricket::VoiceSenderInfo*, | |
| 74 rtc::scoped_refptr<AudioTrackInterface>> voice_sender_info_to_track_; | |
| 75 std::map<const cricket::VoiceReceiverInfo*, | |
| 76 rtc::scoped_refptr<AudioTrackInterface>> voice_receiver_info_to_track_; | |
| 77 std::map<const cricket::VideoSenderInfo*, | |
| 78 rtc::scoped_refptr<VideoTrackInterface>> video_sender_info_to_track_; | |
| 79 std::map<const cricket::VideoReceiverInfo*, | |
| 80 rtc::scoped_refptr<VideoTrackInterface>> video_receiver_info_to_track_; | |
| 81 }; | |
| 82 | |
| 83 } // namespace webrtc | |
| 84 | |
| 85 #endif // WEBRTC_API_TRACKMEDIAINFOMAP_H_ | |
| OLD | NEW |