Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/include/rtp_receiver.h |
| diff --git a/webrtc/modules/rtp_rtcp/include/rtp_receiver.h b/webrtc/modules/rtp_rtcp/include/rtp_receiver.h |
| index 54a99c93a1de5fc4dbb62a08536d529242ca9572..462458ddb1defc7aa5569fcfe0b343ec7004a869 100644 |
| --- a/webrtc/modules/rtp_rtcp/include/rtp_receiver.h |
| +++ b/webrtc/modules/rtp_rtcp/include/rtp_receiver.h |
| @@ -11,6 +11,9 @@ |
| #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ |
| #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ |
| +#include <vector> |
| + |
| +#include "webrtc/api/rtpreceiverinterface.h" |
| #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| #include "webrtc/typedefs.h" |
| @@ -20,6 +23,28 @@ struct CodecInst; |
| class RTPPayloadRegistry; |
| class VideoCodec; |
| +class RtpContributingSource : public RtpContributingSourceInterface { |
| + public: |
| + RtpContributingSource() : timestamp_(0), source_(0) {} |
| + |
| + explicit RtpContributingSource(int64_t timestamp, uint32_t source) |
| + : timestamp_(timestamp), source_(source) {} |
| + |
| + int64_t timestamp() const override { return timestamp_; } |
| + |
| + uint32_t source() const override { return source_; } |
| + |
| + // Always return 0 in the current implementation. |
| + // TODO(zhihuang): Implement this method to return real audio level. |
| + int8_t audio_level() const override { return 0; } |
|
hbos
2017/03/30 09:51:54
Return a value that doesn't map to a meaningful va
Zhi Huang
2017/03/31 06:44:04
Done.
|
| + |
| + void set_timestamp(int64_t timestamp) { timestamp_ = timestamp; } |
| + |
| + private: |
| + int64_t timestamp_; |
| + uint32_t source_; |
| +}; |
| + |
| class TelephoneEventHandler { |
| public: |
| virtual ~TelephoneEventHandler() {} |
| @@ -89,6 +114,9 @@ class RtpReceiver { |
| // Returns the current energy of the RTP stream received. |
| virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; |
| + |
| + virtual const std::vector<RtpContributingSource*>& |
| + GetContributingSources() = 0; |
| }; |
| } // namespace webrtc |