blob: 019b57641b0fb1eb0a5a1ac4b37ae7f02031d2d1 [file] [log] [blame]
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -07001/*
2 * Copyright 2016 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
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020011#import "RTCRtpReceiver.h"
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -070012
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020013#include "api/rtpreceiverinterface.h"
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -070014
15NS_ASSUME_NONNULL_BEGIN
16
Yura Yaroshevich7a16c542018-07-11 12:55:04 +030017@class RTCPeerConnectionFactory;
18
zhihuang4da058c2017-02-08 10:41:20 -080019namespace webrtc {
20
21class RtpReceiverDelegateAdapter : public RtpReceiverObserverInterface {
22 public:
23 RtpReceiverDelegateAdapter(RTCRtpReceiver* receiver);
24
25 void OnFirstPacketReceived(cricket::MediaType media_type) override;
26
27 private:
28 __weak RTCRtpReceiver* receiver_;
29};
30
31} // namespace webrtc
32
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -070033@interface RTCRtpReceiver ()
34
Yves Gerey665174f2018-06-19 15:03:05 +020035@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::RtpReceiverInterface> nativeRtpReceiver;
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -070036
37/** Initialize an RTCRtpReceiver with a native RtpReceiverInterface. */
Yura Yaroshevich7a16c542018-07-11 12:55:04 +030038- (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory
39 nativeRtpReceiver:(rtc::scoped_refptr<webrtc::RtpReceiverInterface>)nativeRtpReceiver
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -070040 NS_DESIGNATED_INITIALIZER;
41
zhihuang4da058c2017-02-08 10:41:20 -080042+ (RTCRtpMediaType)mediaTypeForNativeMediaType:(cricket::MediaType)nativeMediaType;
43
Steve Anton8cb344a2018-02-27 15:34:53 -080044+ (cricket::MediaType)nativeMediaTypeForMediaType:(RTCRtpMediaType)mediaType;
45
46+ (NSString*)stringForMediaType:(RTCRtpMediaType)mediaType;
47
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -070048@end
49
50NS_ASSUME_NONNULL_END