| Index: webrtc/api/ortc/ortcrtpreceiverinterface.h
|
| diff --git a/webrtc/api/ortc/ortcrtpreceiverinterface.h b/webrtc/api/ortc/ortcrtpreceiverinterface.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fc9a06df83905142feecf910b712465c48a5f410
|
| --- /dev/null
|
| +++ b/webrtc/api/ortc/ortcrtpreceiverinterface.h
|
| @@ -0,0 +1,63 @@
|
| +/*
|
| + * Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license
|
| + * that can be found in the LICENSE file in the root of the source
|
| + * tree. An additional intellectual property rights grant can be found
|
| + * in the file PATENTS. All contributing project authors may
|
| + * be found in the AUTHORS file in the root of the source tree.
|
| + */
|
| +
|
| +// This file contains interfaces for RtpReceivers
|
| +// http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface
|
| +
|
| +#ifndef WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
|
| +#define WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
|
| +
|
| +#include "webrtc/api/mediastreaminterface.h"
|
| +#include "webrtc/api/mediatypes.h"
|
| +#include "webrtc/api/ortc/rtptransportinterface.h"
|
| +#include "webrtc/api/rtcerror.h"
|
| +#include "webrtc/api/rtpparameters.h"
|
| +
|
| +namespace webrtc {
|
| +
|
| +// Note: Since receiver capabilities may depend on how the OrtcFactory was
|
| +// created, instead of a static "GetCapabilities" method on this interface,
|
| +// there is a "GetRtpReceiverCapabilities" method on the OrtcFactory.
|
| +class OrtcRtpReceiverInterface {
|
| + public:
|
| + virtual ~OrtcRtpReceiverInterface() {}
|
| +
|
| + // Returns a track representing the media received by this receiver.
|
| + //
|
| + // Will never be null. There is a 1:1 mapping between receivers and remote
|
| + // MediaStreamTracks.
|
| + virtual rtc::scoped_refptr<MediaStreamTrackInterface> GetTrack() const = 0;
|
| +
|
| + // Switches to receiving media on a new transport.
|
| + virtual RTCError SetTransport(RtpTransportInterface* transport) = 0;
|
| + // Returns previously set (or constructed-with) transport.
|
| + virtual RtpTransportInterface* GetTransport() const = 0;
|
| +
|
| + // Allows the parameters of a receiver to be changed after being constructed.
|
| + // There are no limitations to how the parameters can be changed after
|
| + // construction, as long as they're valid (for example, they can't use the
|
| + // same payload type for two codecs).
|
| + //
|
| + // Equivalent to "receive" in the ORTC API.
|
| + virtual RTCError SetParameters(const RtpParameters& parameters) = 0;
|
| + // Returns previously set (or constructed-with) parameters.
|
| + virtual RtpParameters GetParameters() const = 0;
|
| +
|
| + // This isn't really necessary, since an RtpReceiver always has a track and
|
| + // thus you can call GetTrack()->kind(). But it's added here for parity with
|
| + // OrtcRtpSenderInterface.
|
| + virtual cricket::MediaType GetKind() const = 0;
|
| +
|
| + // TODO(deadbeef): GetContributingSources
|
| +};
|
| +
|
| +} // namespace webrtc
|
| +
|
| +#endif // WEBRTC_API_ORTC_ORTCRTPRECEIVERINTERFACE_H_
|
|
|