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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // TODO(deadbeef): Remove? With GetParameters this should be redundant. | 40 // TODO(deadbeef): Remove? With GetParameters this should be redundant. |
41 virtual uint32_t ssrc() const = 0; | 41 virtual uint32_t ssrc() const = 0; |
42 | 42 |
43 // Audio or video sender? | 43 // Audio or video sender? |
44 virtual cricket::MediaType media_type() const = 0; | 44 virtual cricket::MediaType media_type() const = 0; |
45 | 45 |
46 // 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 |
47 // to uniquely identify a receiver until we implement Unified Plan SDP. | 47 // to uniquely identify a receiver until we implement Unified Plan SDP. |
48 virtual std::string id() const = 0; | 48 virtual std::string id() const = 0; |
49 | 49 |
| 50 // Returns a list of streams associated with this sender's track. Although we |
| 51 // only support one track per stream, in theory the API allows for multiple. |
50 virtual std::vector<std::string> stream_ids() const = 0; | 52 virtual std::vector<std::string> stream_ids() const = 0; |
51 | 53 |
52 virtual RtpParameters GetParameters() const = 0; | 54 virtual RtpParameters GetParameters() const = 0; |
| 55 // Note that only a subset of the parameters can currently be changed. See |
| 56 // rtpparameters.h |
53 virtual bool SetParameters(const RtpParameters& parameters) = 0; | 57 virtual bool SetParameters(const RtpParameters& parameters) = 0; |
54 | 58 |
55 // Returns null for a video sender. | 59 // Returns null for a video sender. |
56 virtual rtc::scoped_refptr<DtmfSenderInterface> GetDtmfSender() const = 0; | 60 virtual rtc::scoped_refptr<DtmfSenderInterface> GetDtmfSender() const = 0; |
57 | 61 |
58 protected: | 62 protected: |
59 virtual ~RtpSenderInterface() {} | 63 virtual ~RtpSenderInterface() {} |
60 }; | 64 }; |
61 | 65 |
62 // Define proxy for RtpSenderInterface. | 66 // Define proxy for RtpSenderInterface. |
| 67 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods |
| 68 // are called on is an implementation detail. |
63 BEGIN_SIGNALING_PROXY_MAP(RtpSender) | 69 BEGIN_SIGNALING_PROXY_MAP(RtpSender) |
64 PROXY_SIGNALING_THREAD_DESTRUCTOR() | 70 PROXY_SIGNALING_THREAD_DESTRUCTOR() |
65 PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) | 71 PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) |
66 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) | 72 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) |
67 PROXY_CONSTMETHOD0(uint32_t, ssrc) | 73 PROXY_CONSTMETHOD0(uint32_t, ssrc) |
68 PROXY_CONSTMETHOD0(cricket::MediaType, media_type) | 74 PROXY_CONSTMETHOD0(cricket::MediaType, media_type) |
69 PROXY_CONSTMETHOD0(std::string, id) | 75 PROXY_CONSTMETHOD0(std::string, id) |
70 PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids) | 76 PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids) |
71 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); | 77 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); |
72 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) | 78 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) |
73 PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender); | 79 PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender); |
74 END_PROXY_MAP() | 80 END_PROXY_MAP() |
75 | 81 |
76 } // namespace webrtc | 82 } // namespace webrtc |
77 | 83 |
78 #endif // WEBRTC_API_RTPSENDERINTERFACE_H_ | 84 #endif // WEBRTC_API_RTPSENDERINTERFACE_H_ |
OLD | NEW |