Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: webrtc/api/ortc/ortcrtpreceiverinterface.h

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: Add memcheck suppression for end-to-end tests. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/ortc/ortcfactoryinterface.h ('k') | webrtc/api/ortc/ortcrtpsenderinterface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 // This file contains interfaces for RtpReceivers:
12 // http://publications.ortc.org/2016/20161202/#rtcrtpreceiver*
13 //
14 // However, underneath the RtpReceiver is an RtpTransport, rather than a
15 // DtlsTransport. This is to allow different types of RTP transports (besides
16 // DTLS-SRTP) to be used.
17
18 #ifndef WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
19 #define WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
20
21 #include "webrtc/api/mediastreaminterface.h"
22 #include "webrtc/api/mediatypes.h"
23 #include "webrtc/api/ortc/rtptransportinterface.h"
24 #include "webrtc/api/rtcerror.h"
25 #include "webrtc/api/rtpparameters.h"
26
27 namespace webrtc {
28
29 // Note: Since receiver capabilities may depend on how the OrtcFactory was
30 // created, instead of a static "GetCapabilities" method on this interface,
31 // there is a "GetRtpReceiverCapabilities" method on the OrtcFactory.
32 class OrtcRtpReceiverInterface {
33 public:
34 virtual ~OrtcRtpReceiverInterface() {}
35
36 // Returns a track representing the media received by this receiver.
37 //
38 // Currently, this will return null until Receive has been successfully
39 // called. Also, a new track will be created every time the primary SSRC
40 // changes.
41 //
42 // If encodings are removed, GetTrack will return null. Though deactivating
43 // an encoding (setting |active| to false) will not do this.
44 //
45 // In the future, these limitations will be fixed, and GetTrack will return
46 // the same track for the lifetime of the RtpReceiver. So it's not
47 // recommended to write code that depends on this non-standard behavior.
48 virtual rtc::scoped_refptr<MediaStreamTrackInterface> GetTrack() const = 0;
49
50 // Once supported, will switch to receiving media on a new transport.
51 // However, this is not currently supported and will always return an error.
52 virtual RTCError SetTransport(RtpTransportInterface* transport) = 0;
53 // Returns previously set (or constructed-with) transport.
54 virtual RtpTransportInterface* GetTransport() const = 0;
55
56 // Start receiving media with |parameters| (if |parameters| contains an
57 // active encoding).
58 //
59 // There are no limitations to how the parameters can be changed after the
60 // initial call to Receive, as long as they're valid (for example, they can't
61 // use the same payload type for two codecs).
62 virtual RTCError Receive(const RtpParameters& parameters) = 0;
63 // Returns parameters that were last successfully passed into Receive, or
64 // empty parameters if that hasn't yet occurred.
65 //
66 // Note that for parameters that are described as having an "implementation
67 // default" value chosen, GetParameters() will return those chosen defaults,
68 // with the exception of SSRCs which have special behavior. See
69 // rtpparameters.h for more details.
70 virtual RtpParameters GetParameters() const = 0;
71
72 // Audio or video receiver?
73 //
74 // Once GetTrack() starts always returning a track, this method will be
75 // redundant, as one can call "GetTrack()->kind()". However, it's still a
76 // nice convenience, and is symmetric with OrtcRtpSenderInterface::GetKind.
77 virtual cricket::MediaType GetKind() const = 0;
78
79 // TODO(deadbeef): GetContributingSources
80 };
81
82 } // namespace webrtc
83
84 #endif // WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
OLDNEW
« no previous file with comments | « webrtc/api/ortc/ortcfactoryinterface.h ('k') | webrtc/api/ortc/ortcrtpsenderinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698