| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 // This file contains interfaces for RtpSenders | 11 // This file contains interfaces for RtpSenders |
| 12 // http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface | 12 // http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface |
| 13 | 13 |
| 14 #ifndef WEBRTC_API_RTPSENDERINTERFACE_H_ | 14 #ifndef WEBRTC_API_RTPSENDERINTERFACE_H_ |
| 15 #define WEBRTC_API_RTPSENDERINTERFACE_H_ | 15 #define WEBRTC_API_RTPSENDERINTERFACE_H_ |
| 16 | 16 |
| 17 #include <string> | 17 #include <string> |
| 18 #include <vector> | 18 #include <vector> |
| 19 | 19 |
| 20 #include "webrtc/api/dtmfsenderinterface.h" |
| 20 #include "webrtc/api/mediatypes.h" | 21 #include "webrtc/api/mediatypes.h" |
| 21 #include "webrtc/api/mediastreaminterface.h" | 22 #include "webrtc/api/mediastreaminterface.h" |
| 22 #include "webrtc/api/proxy.h" | 23 #include "webrtc/api/proxy.h" |
| 23 #include "webrtc/api/rtpparameters.h" | 24 #include "webrtc/api/rtpparameters.h" |
| 24 #include "webrtc/base/refcount.h" | 25 #include "webrtc/base/refcount.h" |
| 25 #include "webrtc/base/scoped_ref_ptr.h" | 26 #include "webrtc/base/scoped_ref_ptr.h" |
| 26 | 27 |
| 27 namespace webrtc { | 28 namespace webrtc { |
| 28 | 29 |
| 29 class RtpSenderInterface : public rtc::RefCountInterface { | 30 class RtpSenderInterface : public rtc::RefCountInterface { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 44 | 45 |
| 45 // Not to be confused with "mid", this is a field we can temporarily use | 46 // Not to be confused with "mid", this is a field we can temporarily use |
| 46 // to uniquely identify a receiver until we implement Unified Plan SDP. | 47 // to uniquely identify a receiver until we implement Unified Plan SDP. |
| 47 virtual std::string id() const = 0; | 48 virtual std::string id() const = 0; |
| 48 | 49 |
| 49 virtual std::vector<std::string> stream_ids() const = 0; | 50 virtual std::vector<std::string> stream_ids() const = 0; |
| 50 | 51 |
| 51 virtual RtpParameters GetParameters() const = 0; | 52 virtual RtpParameters GetParameters() const = 0; |
| 52 virtual bool SetParameters(const RtpParameters& parameters) = 0; | 53 virtual bool SetParameters(const RtpParameters& parameters) = 0; |
| 53 | 54 |
| 55 // Returns null for a video sender. |
| 56 virtual rtc::scoped_refptr<DtmfSenderInterface> GetDtmfSender() const = 0; |
| 57 |
| 54 protected: | 58 protected: |
| 55 virtual ~RtpSenderInterface() {} | 59 virtual ~RtpSenderInterface() {} |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 // Define proxy for RtpSenderInterface. | 62 // Define proxy for RtpSenderInterface. |
| 59 BEGIN_SIGNALING_PROXY_MAP(RtpSender) | 63 BEGIN_SIGNALING_PROXY_MAP(RtpSender) |
| 60 PROXY_SIGNALING_THREAD_DESTRUCTOR() | 64 PROXY_SIGNALING_THREAD_DESTRUCTOR() |
| 61 PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) | 65 PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) |
| 62 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) | 66 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) |
| 63 PROXY_CONSTMETHOD0(uint32_t, ssrc) | 67 PROXY_CONSTMETHOD0(uint32_t, ssrc) |
| 64 PROXY_CONSTMETHOD0(cricket::MediaType, media_type) | 68 PROXY_CONSTMETHOD0(cricket::MediaType, media_type) |
| 65 PROXY_CONSTMETHOD0(std::string, id) | 69 PROXY_CONSTMETHOD0(std::string, id) |
| 66 PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids) | 70 PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids) |
| 67 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); | 71 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); |
| 68 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) | 72 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) |
| 73 PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender); |
| 69 END_PROXY_MAP() | 74 END_PROXY_MAP() |
| 70 | 75 |
| 71 } // namespace webrtc | 76 } // namespace webrtc |
| 72 | 77 |
| 73 #endif // WEBRTC_API_RTPSENDERINTERFACE_H_ | 78 #endif // WEBRTC_API_RTPSENDERINTERFACE_H_ |
| OLD | NEW |