OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 |
11 #ifndef WEBRTC_API_PEERCONNECTION_H_ | 11 #ifndef WEBRTC_API_PEERCONNECTION_H_ |
12 #define WEBRTC_API_PEERCONNECTION_H_ | 12 #define WEBRTC_API_PEERCONNECTION_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "webrtc/api/dtlsidentitystore.h" | 16 #include "webrtc/api/dtlsidentitystore.h" |
17 #include "webrtc/api/peerconnectionfactory.h" | 17 #include "webrtc/api/peerconnectionfactory.h" |
18 #include "webrtc/api/peerconnectioninterface.h" | 18 #include "webrtc/api/peerconnectioninterface.h" |
19 #include "webrtc/api/rtpreceiverinterface.h" | 19 #include "webrtc/api/rtpreceiverinterface.h" |
20 #include "webrtc/api/rtpsenderinterface.h" | 20 #include "webrtc/api/rtpsenderinterface.h" |
21 #include "webrtc/api/statscollector.h" | 21 #include "webrtc/api/statscollector.h" |
22 #include "webrtc/api/streamcollection.h" | 22 #include "webrtc/api/streamcollection.h" |
23 #include "webrtc/api/webrtcsession.h" | 23 #include "webrtc/api/webrtcsession.h" |
24 #include "webrtc/base/scoped_ptr.h" | 24 #include "webrtc/base/scoped_ptr.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 | 27 |
28 class MediaStreamObserver; | 28 class MediaStreamObserver; |
29 class RemoteMediaStreamFactory; | 29 class RemoteMediaStreamFactory; |
30 class VideoRtpReceiver; | |
30 | 31 |
31 // Populates |session_options| from |rtc_options|, and returns true if options | 32 // Populates |session_options| from |rtc_options|, and returns true if options |
32 // are valid. | 33 // are valid. |
33 // |session_options|->transport_options map entries must exist in order for | 34 // |session_options|->transport_options map entries must exist in order for |
34 // them to be populated from |rtc_options|. | 35 // them to be populated from |rtc_options|. |
35 bool ExtractMediaSessionOptions( | 36 bool ExtractMediaSessionOptions( |
36 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, | 37 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, |
37 cricket::MediaSessionOptions* session_options); | 38 cricket::MediaSessionOptions* session_options); |
38 | 39 |
39 // Populates |session_options| from |constraints|, and returns true if all | 40 // Populates |session_options| from |constraints|, and returns true if all |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 uint32_t ssrc; | 161 uint32_t ssrc; |
161 }; | 162 }; |
162 typedef std::vector<TrackInfo> TrackInfos; | 163 typedef std::vector<TrackInfo> TrackInfos; |
163 | 164 |
164 // Implements MessageHandler. | 165 // Implements MessageHandler. |
165 void OnMessage(rtc::Message* msg) override; | 166 void OnMessage(rtc::Message* msg) override; |
166 | 167 |
167 void CreateAudioReceiver(MediaStreamInterface* stream, | 168 void CreateAudioReceiver(MediaStreamInterface* stream, |
168 AudioTrackInterface* audio_track, | 169 AudioTrackInterface* audio_track, |
169 uint32_t ssrc); | 170 uint32_t ssrc); |
170 void CreateVideoReceiver(MediaStreamInterface* stream, | 171 // Creates a VideoRtpReceiver and a proxy that implements |
171 VideoTrackInterface* video_track, | 172 // RtpReceierInterface. Returns the VideoRtpReceiver, not the proxy. |
pthatcher1
2016/03/09 21:29:03
RtpReceiverInterface
| |
172 uint32_t ssrc); | 173 VideoRtpReceiver* CreateVideoReceiver(const std::string& track_id, |
174 uint32_t ssrc); | |
173 void DestroyAudioReceiver(MediaStreamInterface* stream, | 175 void DestroyAudioReceiver(MediaStreamInterface* stream, |
174 AudioTrackInterface* audio_track); | 176 AudioTrackInterface* audio_track); |
175 void DestroyVideoReceiver(MediaStreamInterface* stream, | 177 void DestroyVideoReceiver(MediaStreamInterface* stream, |
176 VideoTrackInterface* video_track); | 178 VideoTrackInterface* video_track); |
177 void DestroyAudioSender(MediaStreamInterface* stream, | 179 void DestroyAudioSender(MediaStreamInterface* stream, |
178 AudioTrackInterface* audio_track, | 180 AudioTrackInterface* audio_track, |
179 uint32_t ssrc); | 181 uint32_t ssrc); |
180 void DestroyVideoSender(MediaStreamInterface* stream, | 182 void DestroyVideoSender(MediaStreamInterface* stream, |
181 VideoTrackInterface* video_track); | 183 VideoTrackInterface* video_track); |
182 | 184 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
396 // because its destruction fires signals (such as VoiceChannelDestroyed) | 398 // because its destruction fires signals (such as VoiceChannelDestroyed) |
397 // which will trigger some final actions in PeerConnection... | 399 // which will trigger some final actions in PeerConnection... |
398 rtc::scoped_ptr<WebRtcSession> session_; | 400 rtc::scoped_ptr<WebRtcSession> session_; |
399 // ... But stats_ depends on session_ so it should be destroyed even earlier. | 401 // ... But stats_ depends on session_ so it should be destroyed even earlier. |
400 rtc::scoped_ptr<StatsCollector> stats_; | 402 rtc::scoped_ptr<StatsCollector> stats_; |
401 }; | 403 }; |
402 | 404 |
403 } // namespace webrtc | 405 } // namespace webrtc |
404 | 406 |
405 #endif // WEBRTC_API_PEERCONNECTION_H_ | 407 #endif // WEBRTC_API_PEERCONNECTION_H_ |
OLD | NEW |