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

Unified Diff: talk/app/webrtc/peerconnection.h

Issue 1351803002: Exposing RtpSenders and RtpReceivers from PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/peerconnection.h
diff --git a/talk/app/webrtc/peerconnection.h b/talk/app/webrtc/peerconnection.h
index 2160afb241c392084be3f22bea0669a1aa62769e..d4ab503c6dea4c82c1217b42bd5f0b015e52b1df 100644
--- a/talk/app/webrtc/peerconnection.h
+++ b/talk/app/webrtc/peerconnection.h
@@ -40,7 +40,6 @@
#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
-class MediaStreamHandlerContainer;
typedef std::vector<PortAllocatorFactoryInterface::StunConfiguration>
StunConfigurations;
@@ -72,6 +71,14 @@ class PeerConnection : public PeerConnectionInterface,
virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
AudioTrackInterface* track);
+ PeerConnectionInterface::RtpSenders GetSenders() override {
+ return rtp_senders_;
+ }
+
+ PeerConnectionInterface::RtpReceivers GetReceivers() override {
+ return rtp_receivers_;
+ }
+
virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
const std::string& label,
const DataChannelInit* config);
@@ -124,20 +131,24 @@ class PeerConnection : public PeerConnectionInterface,
void OnAddDataChannel(DataChannelInterface* data_channel) override;
void OnAddRemoteAudioTrack(MediaStreamInterface* stream,
AudioTrackInterface* audio_track,
- uint32 ssrc) override;
+ uint32 ssrc,
+ const std::string& mid) override;
void OnAddRemoteVideoTrack(MediaStreamInterface* stream,
VideoTrackInterface* video_track,
- uint32 ssrc) override;
+ uint32 ssrc,
+ const std::string& mid) override;
void OnRemoveRemoteAudioTrack(MediaStreamInterface* stream,
AudioTrackInterface* audio_track) override;
void OnRemoveRemoteVideoTrack(MediaStreamInterface* stream,
VideoTrackInterface* video_track) override;
void OnAddLocalAudioTrack(MediaStreamInterface* stream,
AudioTrackInterface* audio_track,
- uint32 ssrc) override;
+ uint32 ssrc,
+ const std::string& mid) override;
void OnAddLocalVideoTrack(MediaStreamInterface* stream,
VideoTrackInterface* video_track,
- uint32 ssrc) override;
+ uint32 ssrc,
+ const std::string& mid) override;
void OnRemoveLocalAudioTrack(MediaStreamInterface* stream,
AudioTrackInterface* audio_track,
uint32 ssrc) override;
@@ -168,6 +179,11 @@ class PeerConnection : public PeerConnectionInterface,
return signaling_state_ == PeerConnectionInterface::kClosed;
}
+ PeerConnectionInterface::RtpSenders::iterator FindRtpSenderForTrack(
+ MediaStreamTrackInterface* track);
+ PeerConnectionInterface::RtpReceivers::iterator FindRtpReceiverForTrack(
+ MediaStreamTrackInterface* track);
+
// Storing the factory as a scoped reference pointer ensures that the memory
// in the PeerConnectionFactoryImpl remains available as long as the
// PeerConnection is running. It is passed to PeerConnection as a raw pointer.
@@ -186,8 +202,10 @@ class PeerConnection : public PeerConnectionInterface,
rtc::scoped_ptr<cricket::PortAllocator> port_allocator_;
rtc::scoped_ptr<WebRtcSession> session_;
rtc::scoped_ptr<MediaStreamSignaling> mediastream_signaling_;
- rtc::scoped_ptr<MediaStreamHandlerContainer> stream_handler_container_;
rtc::scoped_ptr<StatsCollector> stats_;
+
+ PeerConnectionInterface::RtpSenders rtp_senders_;
+ PeerConnectionInterface::RtpReceivers rtp_receivers_;
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698