webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCMediaStream+Private.h
Yura Yaroshevich c806c1d337 Fixed crash when PCF is destroyed before MediaStream in ObjC
Bug: webrtc:9231
Change-Id: I04e76172dd0d5ee5e9040e773e63fd4df0c797ce
Reviewed-on: https://webrtc-review.googlesource.com/84580
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23699}
2018-06-21 11:12:30 +00:00

34 lines
1.2 KiB
Objective-C

/*
* Copyright 2015 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.
*/
#import "WebRTC/RTCMediaStream.h"
#include "api/mediastreaminterface.h"
NS_ASSUME_NONNULL_BEGIN
@interface RTCMediaStream ()
/**
* MediaStreamInterface representation of this RTCMediaStream object. This is
* needed to pass to the underlying C++ APIs.
*/
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::MediaStreamInterface> nativeMediaStream;
/** Initialize an RTCMediaStream with an id. */
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory streamId:(NSString *)streamId;
/** Initialize an RTCMediaStream from a native MediaStreamInterface. */
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
nativeMediaStream:(rtc::scoped_refptr<webrtc::MediaStreamInterface>)nativeMediaStream;
@end
NS_ASSUME_NONNULL_END