Index: webrtc/api/rtpreceiver.h |
diff --git a/webrtc/api/rtpreceiver.h b/webrtc/api/rtpreceiver.h |
index 2e7339d4da448c60888fc0cba6f0bbfc1affd752..a8e3d37f26fcc7b730dd068f146c56462289787f 100644 |
--- a/webrtc/api/rtpreceiver.h |
+++ b/webrtc/api/rtpreceiver.h |
@@ -22,13 +22,15 @@ |
#include "webrtc/api/remoteaudiosource.h" |
#include "webrtc/api/videotracksource.h" |
#include "webrtc/base/basictypes.h" |
+#include "webrtc/base/sigslot.h" |
#include "webrtc/media/base/videobroadcaster.h" |
namespace webrtc { |
class AudioRtpReceiver : public ObserverInterface, |
public AudioSourceInterface::AudioObserver, |
- public rtc::RefCountedObject<RtpReceiverInterface> { |
+ public rtc::RefCountedObject<RtpReceiverInterface>, |
+ public sigslot::has_slots<> { |
public: |
AudioRtpReceiver(MediaStreamInterface* stream, |
const std::string& track_id, |
@@ -59,17 +61,23 @@ class AudioRtpReceiver : public ObserverInterface, |
RtpParameters GetParameters() const override; |
bool SetParameters(const RtpParameters& parameters) override; |
+ void RegisterRtpReceiverObserver( |
+ RtpReceiverObserverInterface* observer) override; |
+ |
private: |
void Reconfigure(); |
+ void onFirstAudioPacketReceived(); |
pthatcher2
2016/05/20 20:23:13
OnFirstAudioPacketReceived()
zhihuang1
2016/05/24 01:01:44
Done.
|
const std::string id_; |
const uint32_t ssrc_; |
AudioProviderInterface* provider_; // Set to null in Stop(). |
const rtc::scoped_refptr<AudioTrackInterface> track_; |
bool cached_track_enabled_; |
+ RtpReceiverObserverInterface* rtp_receiver_observer_; |
pthatcher2
2016/05/20 20:23:14
observer_ is probably long enough of a name.
zhihuang1
2016/05/24 01:01:44
Done.
|
}; |
-class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> { |
+class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface>, |
+ public sigslot::has_slots<> { |
public: |
VideoRtpReceiver(MediaStreamInterface* stream, |
const std::string& track_id, |
@@ -95,7 +103,12 @@ class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> { |
RtpParameters GetParameters() const override; |
bool SetParameters(const RtpParameters& parameters) override; |
+ void RegisterRtpReceiverObserver( |
+ RtpReceiverObserverInterface* observer) override; |
pthatcher2
2016/05/20 20:23:14
Since there is only one, we should call these "Set
zhihuang1
2016/05/24 01:01:44
Done.
|
+ |
private: |
+ void onFirstVideoPacketReceived(); |
pthatcher2
2016/05/20 20:23:14
Same here
zhihuang1
2016/05/24 01:01:44
Done.
|
+ |
std::string id_; |
uint32_t ssrc_; |
VideoProviderInterface* provider_; |
@@ -107,6 +120,7 @@ class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> { |
// the VideoRtpReceiver is stopped. |
rtc::scoped_refptr<VideoTrackSource> source_; |
rtc::scoped_refptr<VideoTrackInterface> track_; |
+ RtpReceiverObserverInterface* rtp_receiver_observer_; |
pthatcher2
2016/05/20 20:23:13
Same here
|
}; |
} // namespace webrtc |