Chromium Code Reviews| Index: webrtc/api/rtpreceiverinterface.h |
| diff --git a/webrtc/api/rtpreceiverinterface.h b/webrtc/api/rtpreceiverinterface.h |
| index ef4f0e113f36d297725e49ce17dcf530c0cdd3b3..710067e9b177c3b1cf3a320e455ef677a593745a 100644 |
| --- a/webrtc/api/rtpreceiverinterface.h |
| +++ b/webrtc/api/rtpreceiverinterface.h |
| @@ -20,9 +20,18 @@ |
| #include "webrtc/api/proxy.h" |
| #include "webrtc/base/refcount.h" |
| #include "webrtc/base/scoped_ref_ptr.h" |
| +#include "webrtc/pc/mediasession.h" |
| namespace webrtc { |
| +class RtpReceiverObserverInterface : public rtc::RefCountInterface { |
|
pthatcher2
2016/05/20 20:23:14
Why does it need to be refcounted?
|
| + public: |
| + virtual void onFirstPacketReceived(cricket::MediaType media_type) = 0; |
|
pthatcher2
2016/05/20 20:23:14
OnFirstPacketReceived
|
| + |
| + protected: |
| + virtual ~RtpReceiverObserverInterface() {} |
| +}; |
| + |
| class RtpReceiverInterface : public rtc::RefCountInterface { |
| public: |
| virtual rtc::scoped_refptr<MediaStreamTrackInterface> track() const = 0; |
| @@ -39,6 +48,9 @@ class RtpReceiverInterface : public rtc::RefCountInterface { |
| virtual RtpParameters GetParameters() const = 0; |
| virtual bool SetParameters(const RtpParameters& parameters) = 0; |
| + virtual void RegisterRtpReceiverObserver( |
| + RtpReceiverObserverInterface* observer) = 0; |
| + |
| protected: |
| virtual ~RtpReceiverInterface() {} |
| }; |
| @@ -50,6 +62,7 @@ PROXY_CONSTMETHOD0(std::string, id) |
| PROXY_METHOD0(void, Stop) |
| PROXY_CONSTMETHOD0(RtpParameters, GetParameters); |
| PROXY_METHOD1(bool, SetParameters, const RtpParameters&) |
| +PROXY_METHOD1(void, RegisterRtpReceiverObserver, RtpReceiverObserverInterface*); |
| END_SIGNALING_PROXY() |
| } // namespace webrtc |