Index: webrtc/api/trackmediainfomap.h |
diff --git a/webrtc/api/trackmediainfomap.h b/webrtc/api/trackmediainfomap.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..51551107f48d4cf5752d45d354fd01ed193886ee |
--- /dev/null |
+++ b/webrtc/api/trackmediainfomap.h |
@@ -0,0 +1,85 @@ |
+/* |
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_API_TRACKMEDIAINFOMAP_H_ |
+#define WEBRTC_API_TRACKMEDIAINFOMAP_H_ |
+ |
+#include <map> |
+#include <memory> |
+#include <vector> |
+ |
+#include "webrtc/api/mediastreaminterface.h" |
+#include "webrtc/api/rtpreceiverinterface.h" |
+#include "webrtc/api/rtpsenderinterface.h" |
+#include "webrtc/base/refcount.h" |
+#include "webrtc/media/base/mediachannel.h" |
+ |
+namespace webrtc { |
+ |
+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.
|
+ public: |
+ TrackMediaInfoMap( |
+ std::unique_ptr<cricket::VoiceMediaInfo> voice_media_info, |
+ std::unique_ptr<cricket::VideoMediaInfo> video_media_info, |
+ const std::vector<rtc::scoped_refptr<RtpSenderInterface>>& rtp_senders, |
+ const std::vector<rtc::scoped_refptr<RtpReceiverInterface>>& |
+ rtp_receivers); |
+ |
+ const cricket::VoiceMediaInfo* voice_media_info() const { |
+ return voice_media_info_.get(); |
+ } |
+ const cricket::VideoMediaInfo* video_media_info() const { |
+ return video_media_info_.get(); |
+ } |
+ |
+ const std::vector<cricket::VoiceSenderInfo*>* GetVoiceSenderInfos( |
+ const AudioTrackInterface& local_audio_track) const; |
+ const cricket::VoiceReceiverInfo* GetVoiceReceiverInfo( |
+ const AudioTrackInterface& remote_audio_track) const; |
+ const std::vector<cricket::VideoSenderInfo*>* GetVideoSenderInfos( |
+ const VideoTrackInterface& local_video_track) const; |
+ const cricket::VideoReceiverInfo* GetVideoReceiverInfo( |
+ const VideoTrackInterface& remote_video_track) const; |
+ |
+ rtc::scoped_refptr<AudioTrackInterface> GetAudioTrack( |
+ const cricket::VoiceSenderInfo& voice_sender_info) const; |
+ rtc::scoped_refptr<AudioTrackInterface> GetAudioTrack( |
+ const cricket::VoiceReceiverInfo& voice_receiver_info) const; |
+ rtc::scoped_refptr<VideoTrackInterface> GetVideoTrack( |
+ const cricket::VideoSenderInfo& video_sender_info) const; |
+ rtc::scoped_refptr<VideoTrackInterface> GetVideoTrack( |
+ const cricket::VideoReceiverInfo& video_receiver_info) const; |
+ |
+ private: |
+ std::unique_ptr<cricket::VoiceMediaInfo> voice_media_info_; |
+ std::unique_ptr<cricket::VideoMediaInfo> video_media_info_; |
+ // 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.
|
+ std::map<const AudioTrackInterface*, std::vector<cricket::VoiceSenderInfo*>> |
+ local_audio_track_to_infos_; |
+ std::map<const AudioTrackInterface*, cricket::VoiceReceiverInfo*> |
+ remote_audio_track_to_info_; |
+ std::map<const VideoTrackInterface*, std::vector<cricket::VideoSenderInfo*>> |
+ local_video_track_to_infos_; |
+ std::map<const VideoTrackInterface*, cricket::VideoReceiverInfo*> |
+ remote_video_track_to_info_; |
+ // 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.
|
+ std::map<const cricket::VoiceSenderInfo*, |
+ rtc::scoped_refptr<AudioTrackInterface>> voice_sender_info_to_track_; |
+ std::map<const cricket::VoiceReceiverInfo*, |
+ rtc::scoped_refptr<AudioTrackInterface>> voice_receiver_info_to_track_; |
+ std::map<const cricket::VideoSenderInfo*, |
+ rtc::scoped_refptr<VideoTrackInterface>> video_sender_info_to_track_; |
+ std::map<const cricket::VideoReceiverInfo*, |
+ rtc::scoped_refptr<VideoTrackInterface>> video_receiver_info_to_track_; |
+}; |
+ |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_API_TRACKMEDIAINFOMAP_H_ |