Index: talk/app/webrtc/rtpsenderinterface.h |
diff --git a/talk/app/webrtc/mediastreamproxy.h b/talk/app/webrtc/rtpsenderinterface.h |
similarity index 63% |
copy from talk/app/webrtc/mediastreamproxy.h |
copy to talk/app/webrtc/rtpsenderinterface.h |
index bde7dcfe2d5f9dbba9dc6ebe956ff4dea4cb354f..66a633ce30d994ce2241ff2c884fd3737f1763a0 100644 |
--- a/talk/app/webrtc/mediastreamproxy.h |
+++ b/talk/app/webrtc/rtpsenderinterface.h |
@@ -1,6 +1,6 @@ |
/* |
* libjingle |
- * Copyright 2011 Google Inc. |
+ * Copyright 2015 Google Inc. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are met: |
@@ -25,30 +25,36 @@ |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef TALK_APP_WEBRTC_MEDIASTREAMPROXY_H_ |
-#define TALK_APP_WEBRTC_MEDIASTREAMPROXY_H_ |
+// This file contains interfaces for RtpSenders |
+// http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface |
+ |
+#ifndef TALK_APP_WEBRTC_RTPSENDERINTERFACE_H_ |
+#define TALK_APP_WEBRTC_RTPSENDERINTERFACE_H_ |
+ |
+#include <string> |
-#include "talk/app/webrtc/mediastreaminterface.h" |
#include "talk/app/webrtc/proxy.h" |
+#include "talk/app/webrtc/mediastreaminterface.h" |
+#include "webrtc/base/refcount.h" |
+#include "webrtc/base/scoped_ref_ptr.h" |
namespace webrtc { |
-BEGIN_PROXY_MAP(MediaStream) |
- PROXY_CONSTMETHOD0(std::string, label) |
- PROXY_METHOD0(AudioTrackVector, GetAudioTracks) |
- PROXY_METHOD0(VideoTrackVector, GetVideoTracks) |
- PROXY_METHOD1(rtc::scoped_refptr<AudioTrackInterface>, |
- FindAudioTrack, const std::string&) |
- PROXY_METHOD1(rtc::scoped_refptr<VideoTrackInterface>, |
- FindVideoTrack, const std::string&) |
- PROXY_METHOD1(bool, AddTrack, AudioTrackInterface*) |
- PROXY_METHOD1(bool, AddTrack, VideoTrackInterface*) |
- PROXY_METHOD1(bool, RemoveTrack, AudioTrackInterface*) |
- PROXY_METHOD1(bool, RemoveTrack, VideoTrackInterface*) |
- PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) |
- PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) |
+class RtpSenderInterface : public rtc::RefCountInterface { |
+ public: |
+ virtual void SetTrack(MediaStreamTrackInterface* track) = 0; |
+ virtual rtc::scoped_refptr<MediaStreamTrackInterface> track() const = 0; |
+ |
+ protected: |
+ virtual ~RtpSenderInterface() {} |
+}; |
+ |
+// Define proxy for RtpSenderInterface. |
+BEGIN_PROXY_MAP(RtpSender) |
+PROXY_METHOD1(void, SetTrack, MediaStreamTrackInterface*) |
+PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) |
END_PROXY() |
} // namespace webrtc |
-#endif // TALK_APP_WEBRTC_MEDIASTREAMPROXY_H_ |
+#endif // TALK_APP_WEBRTC_RTPSENDERINTERFACE_H_ |