RTCMediaStream.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright 2015 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. #import <Foundation/Foundation.h>
  11. #import "RTCMacros.h"
  12. NS_ASSUME_NONNULL_BEGIN
  13. @class RTC_OBJC_TYPE(RTCAudioTrack);
  14. @class RTC_OBJC_TYPE(RTCPeerConnectionFactory);
  15. @class RTC_OBJC_TYPE(RTCVideoTrack);
  16. RTC_OBJC_EXPORT
  17. @interface RTC_OBJC_TYPE (RTCMediaStream) : NSObject
  18. /** The audio tracks in this stream. */
  19. @property(nonatomic, strong, readonly) NSArray<RTC_OBJC_TYPE(RTCAudioTrack) *> *audioTracks;
  20. /** The video tracks in this stream. */
  21. @property(nonatomic, strong, readonly) NSArray<RTC_OBJC_TYPE(RTCVideoTrack) *> *videoTracks;
  22. /** An identifier for this media stream. */
  23. @property(nonatomic, readonly) NSString *streamId;
  24. - (instancetype)init NS_UNAVAILABLE;
  25. /** Adds the given audio track to this media stream. */
  26. - (void)addAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack;
  27. /** Adds the given video track to this media stream. */
  28. - (void)addVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack;
  29. /** Removes the given audio track to this media stream. */
  30. - (void)removeAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack;
  31. /** Removes the given video track to this media stream. */
  32. - (void)removeVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack;
  33. @end
  34. NS_ASSUME_NONNULL_END