webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Instance Methods | Properties | List of all members
RTCAVFoundationVideoSource Class Reference

#import <RTCAVFoundationVideoSource.h>

Inheritance diagram for RTCAVFoundationVideoSource:
RTCVideoSource RTCVideoSource RTCMediaSource RTCMediaSource RTCMediaSource RTCMediaSource NSObject NSObject NSObject NSObject NSObject NSObject NSObject NSObject

Instance Methods

(instancetype) - NS_UNAVAILABLE
 
(void- adaptOutputFormatToWidth:height:fps:
 
(instancetype) - NS_UNAVAILABLE
 
(void- adaptOutputFormatToWidth:height:fps:
 
(instancetype) - initWithFactory:constraints: [implementation]
 
(instancetype) - initWithFactory:constraints: [implementation]
 
- Instance Methods inherited from RTCVideoSource
(instancetype) - initWithNativeVideoSource: [implementation]
 
(instancetype) - initWithNativeVideoSource: [implementation]
 
(instancetype) - initWithNativeMediaSource:type: [implementation]
 
(instancetype) - initWithNativeMediaSource:type: [implementation]
 

Properties

BOOL canUseBackCamera
 
BOOL useBackCamera
 
AVCaptureSession * captureSession
 
webrtc::AVFoundationVideoCapturercapturer [implementation]
 
- Properties inherited from RTCVideoSource
rtc::scoped_refptr< webrtc::VideoTrackSourceInterfacenativeVideoSource [implementation]
 
- Properties inherited from RTCMediaSource
RTCSourceState state
 
rtc::scoped_refptr< webrtc::MediaSourceInterfacenativeMediaSource [implementation]
 

Additional Inherited Members

- Class Methods inherited from RTCMediaSource
(webrtc::MediaSourceInterface::SourceState+ nativeSourceStateForState: [implementation]
 
(webrtc::MediaSourceInterface::SourceState+ nativeSourceStateForState: [implementation]
 
(RTCSourceState) + sourceStateForNativeState: [implementation]
 
(RTCSourceState) + sourceStateForNativeState: [implementation]
 
(NSString *) + stringForState: [implementation]
 
(NSString *) + stringForState: [implementation]
 

Detailed Description

RTCAVFoundationVideoSource is a video source that uses webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for that capturer because cricket::VideoCapturer is not ref counted and we cannot guarantee its lifetime. Instead, we expose its properties through the ref counted video source interface.

Method Documentation

◆ adaptOutputFormatToWidth:height:fps:() [1/2]

- (void) adaptOutputFormatToWidth: (int)  width
height: (int)  height
fps: (int)  fps 

Calling this function will cause frames to be scaled down to the requested resolution. Also, frames will be cropped to match the requested aspect ratio, and frames will be dropped to match the requested fps. The requested aspect ratio is orientation agnostic and will be adjusted to maintain the input orientation, so it doesn't matter if e.g. 1280x720 or 720x1280 is requested.

◆ adaptOutputFormatToWidth:height:fps:() [2/2]

- (void) adaptOutputFormatToWidth: (int)  width
height: (int)  height
fps: (int)  fps 

Calling this function will cause frames to be scaled down to the requested resolution. Also, frames will be cropped to match the requested aspect ratio, and frames will be dropped to match the requested fps. The requested aspect ratio is orientation agnostic and will be adjusted to maintain the input orientation, so it doesn't matter if e.g. 1280x720 or 720x1280 is requested.

◆ initWithFactory:constraints:() [1/2]

- (instancetype) initWithFactory: (RTCPeerConnectionFactory *)  factory
constraints: (nullable RTCMediaConstraints *)  constraints 
implementation

Initialize an RTCAVFoundationVideoSource with constraints.

◆ initWithFactory:constraints:() [2/2]

- (instancetype) initWithFactory: (RTCPeerConnectionFactory *)  factory
constraints: (nullable RTCMediaConstraints *)  constraints 
implementation

Initialize an RTCAVFoundationVideoSource with constraints.

◆ NS_UNAVAILABLE() [1/2]

- (instancetype) NS_UNAVAILABLE

Implements RTCVideoSource.

◆ NS_UNAVAILABLE() [2/2]

- (instancetype) NS_UNAVAILABLE

Implements RTCVideoSource.

Property Documentation

◆ canUseBackCamera

- (BOOL) canUseBackCamera
readnonatomicassign

Returns whether rear-facing camera is available for use.

◆ capturer

- (AVFoundationVideoCapturer * RTCAVFoundationVideoSource()):
readnonatomicassignimplementation

◆ captureSession

- (AVCaptureSession *) captureSession
readnonatomicassign

Returns the active capture session.

◆ useBackCamera

- (BOOL) useBackCamera
readwritenonatomicassign

Switches the camera being used (either front or back).


The documentation for this class was generated from the following files: