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

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

Issue 1351803002: Exposing RtpSenders and RtpReceivers from PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding some stubs so that Chromium build won't break. 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
« no previous file with comments | « talk/app/webrtc/peerconnectionproxy.h ('k') | talk/app/webrtc/rtpreceiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/rtpreceiver.h
diff --git a/talk/app/webrtc/rtpreceiver.h b/talk/app/webrtc/rtpreceiver.h
index aee77e173c9c438fed345afcd68adc0e7331e955..f5bcb2e286faeaaf1d6c5e9ff12770a5ee75ee97 100644
--- a/talk/app/webrtc/rtpreceiver.h
+++ b/talk/app/webrtc/rtpreceiver.h
@@ -25,4 +25,80 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// This file is currently stubbed so that Chromium's build files can be updated.
+// This file contains classes that implement RtpReceiverInterface.
+// An RtpReceiver associates a MediaStreamTrackInterface with an underlying
+// transport (provided by AudioProviderInterface/VideoProviderInterface)
+
+#ifndef TALK_APP_WEBRTC_RTPRECEIVER_H_
+#define TALK_APP_WEBRTC_RTPRECEIVER_H_
+
+#include <string>
+
+#include "talk/app/webrtc/mediastreamprovider.h"
+#include "talk/app/webrtc/rtpreceiverinterface.h"
+#include "webrtc/base/basictypes.h"
+
+namespace webrtc {
+
+class AudioRtpReceiver : public ObserverInterface,
+ public AudioSourceInterface::AudioObserver,
+ public rtc::RefCountedObject<RtpReceiverInterface> {
+ public:
+ AudioRtpReceiver(AudioTrackInterface* track,
+ uint32 ssrc,
+ AudioProviderInterface* provider);
+
+ virtual ~AudioRtpReceiver();
+
+ // ObserverInterface implementation
+ void OnChanged() override;
+
+ // AudioSourceInterface::AudioObserver implementation
+ void OnSetVolume(double volume) override;
+
+ // RtpReceiverInterface implementation
+ rtc::scoped_refptr<MediaStreamTrackInterface> track() const override {
+ return track_.get();
+ }
+
+ std::string id() const override { return id_; }
+
+ void Stop() override;
+
+ private:
+ void Reconfigure();
+
+ std::string id_;
+ rtc::scoped_refptr<AudioTrackInterface> track_;
+ uint32 ssrc_;
+ AudioProviderInterface* provider_;
+ bool cached_track_enabled_;
+};
+
+class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> {
+ public:
+ VideoRtpReceiver(VideoTrackInterface* track,
+ uint32 ssrc,
+ VideoProviderInterface* provider);
+
+ virtual ~VideoRtpReceiver();
+
+ // RtpReceiverInterface implementation
+ rtc::scoped_refptr<MediaStreamTrackInterface> track() const override {
+ return track_.get();
+ }
+
+ std::string id() const override { return id_; }
+
+ void Stop() override;
+
+ private:
+ std::string id_;
+ rtc::scoped_refptr<VideoTrackInterface> track_;
+ uint32 ssrc_;
+ VideoProviderInterface* provider_;
+};
+
+} // namespace webrtc
+
+#endif // TALK_APP_WEBRTC_RTPRECEIVER_H_
« no previous file with comments | « talk/app/webrtc/peerconnectionproxy.h ('k') | talk/app/webrtc/rtpreceiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698