Red5Pro IOS Client SDK

 10.0.0
Core SDK for IOS
R5VideoSource Class Reference

The video source provides all video frames to the encoder for transmission over the socket.
More...

#import <R5VideoSource.h>

Inherits NSObject.

Inherited by R5Camera.

Instance Methods

(void) - startVideoCapture
 
(void) - stopVideoCapture
 
(void) - encodeWithBlock:onParams:
 
(void) - attatchRecorder:
 
(void) - detatchRecorder
 
(NSDictionary *) - getSourceProperties
 
(void) - configureSession:
 
(void) - releaseSession:
 
(void) - updateEncoder
 

Properties

int width
 Desired width of the video source (subject to hardware)
 
int height
 Desired height of the video source (subject to hardware)
 
int bitrate
 Bitrate in kbps of the video stream.
 
int orientation
 Orientation of presentation. More...
 
int fps
 Frame rate to record at.
 
AVEncoder * encoder
 Hardware encoder set by the VideoSource. Pass frames to the encoder to continue to socket.
 
FileWriter * writer
 
BOOL adaptiveBitRate
 
AVCaptureVideoDataOutput * output
 Output path for the encoded data.
 

Detailed Description

The video source provides all video frames to the encoder for transmission over the socket.

A video source expects

Method Documentation

◆ attatchRecorder:

- (void) attatchRecorder: (FileWriter *)  fileWriter

Records captured data to local device

◆ configureSession:

- (void) configureSession: (AVCaptureSession *)  session

Initialize the VideoSource with the appropriate inputs

Parameters
sessionSession to initialize

◆ encodeWithBlock:onParams:

- (void) encodeWithBlock: (source_handler_t)  block
onParams: (source_param_handler_t)  paramsHandler 

Setup the encoding handler. Will pass the handles to the encoder for processing the data

Parameters
blockdata and timestamp of the frame to process
paramsHandlerparameters of the encoding used for setting up the codec

◆ getSourceProperties

- (NSDictionary *) getSourceProperties

A dictionary formatted with the following keys:

  • R5VideoWidthkey - NSNumber (int)
  • R5VideoHeightKey - NSNumber (int)
  • R5VideoBitRateKey - NSNumber (int)
  • R5VideoOrientationKey - NSNumber (float)
  • R5VideoAdaptiveBitRateKey - NSString ( "YES" | "NO" )
Returns
a properly formatted dictionary with all keys set

◆ releaseSession:

- (void) releaseSession: (AVCaptureSession *)  session

Release the session and stop all session activities

Parameters
sessionSession to stop

◆ startVideoCapture

- (void) startVideoCapture

Start capturing and encoding video

◆ stopVideoCapture

- (void) stopVideoCapture

Stop capturing and encoding video

Property Documentation

◆ orientation

- (int) orientation
readwriteatomic

Orientation of presentation.

Note
Video is rotated by the streaming software and NOT in the encoding. This is a meta flag only.

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