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

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

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: More sender/receiver tests. Created 3 years, 10 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
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://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface
13
14 #ifndef WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
15 #define WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
16
17 #include "webrtc/api/mediastreaminterface.h"
18 #include "webrtc/api/mediatypes.h"
19 #include "webrtc/api/ortc/rtptransportinterface.h"
20 #include "webrtc/api/rtcerror.h"
21 #include "webrtc/api/rtpparameters.h"
22
23 namespace webrtc {
24
25 // Note: Since receiver capabilities may depend on how the OrtcFactory was
26 // created, instead of a static "GetCapabilities" method on this interface,
27 // there is a "GetRtpReceiverCapabilities" method on the OrtcFactory.
28 class OrtcRtpReceiverInterface {
29 public:
30 virtual ~OrtcRtpReceiverInterface() {}
31
32 // Returns a track representing the media received by this receiver.
33 //
34 // Currently, this will return null until Receive has been successfully
35 // called. Also, a new track will be created every time the primary SSRC
36 // changes.
37 //
38 // If encodings are removed, GetTrack will return null. Though deactivating
39 // an encoding (setting |active| to false) will not do this.
40 //
41 // In the future, these limitations will be fixed, and GetTrack will return
42 // the same track for the lifetime of the RtpReceiver.
43 virtual rtc::scoped_refptr<MediaStreamTrackInterface> GetTrack() const = 0;
44
45 // Switches to receiving media on a new transport.
46 virtual RTCError SetTransport(RtpTransportInterface* transport) = 0;
47 // Returns previously set (or constructed-with) transport.
48 virtual RtpTransportInterface* GetTransport() const = 0;
49
50 // Start receiving media with |parameters| (if |parameters| contains an
51 // active encoding).
52 //
53 // There are no limitations to how the parameters can be changed after the
54 // initial call to Receive, as long as they're valid (for example, they can't
55 // use the same payload type for two codecs).
56 virtual RTCError Receive(const RtpParameters& parameters) = 0;
57 // Returns parameters that were last successfully passed into Receive, or
58 // empty parameters if that hasn't yet occurred.
59 //
60 // Note that for parameters that are described as having an "implementation
61 // default" value chosen, GetParameters() will return those chosen defaults,
62 // with the exception of SSRCs which have special behavior. See
63 // rtpparameters.h for more details.
64 virtual RtpParameters GetParameters() const = 0;
65
66 // This isn't really necessary, since an RtpReceiver always has a track and
67 // thus you can call GetTrack()->kind(). But it's added here for parity with
68 // OrtcRtpSenderInterface.
69 virtual cricket::MediaType GetKind() const = 0;
70
71 // TODO(deadbeef): GetContributingSources
72 };
73
74 } // namespace webrtc
75
76 #endif // WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698