Red5Pro IOS Client SDK

 10.0.0
Core SDK for IOS
R5VideoSource.h
1//
2// R5VideoSource.h
3// red5streaming
4//
5// Created by Andy Zupko on 2/4/15.
6// Copyright (c) 2015 Infrared5. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <AVFoundation/AVFoundation.h>
11#import "AVEncoder.h"
12#import "FileWriter.h"
13
14typedef int (^source_handler_t)(NSArray* data, double pts);
15typedef int (^source_param_handler_t)(NSData* params);
16
17
23@interface R5VideoSource : NSObject
24@property int width;
25@property int height;
26@property int bitrate;
27@property int orientation;
28
29@property int fps;
30@property AVEncoder *encoder;
31@property FileWriter *writer;
32
33@property BOOL adaptiveBitRate;
34
35//@property BOOL pauseEncoding;
36
37
38@property AVCaptureVideoDataOutput *output;
39
40
45
46
50-(void)stopVideoCapture;
51
52
59- (void) encodeWithBlock:(source_handler_t) block onParams: (source_param_handler_t) paramsHandler;
60
64-(void)attatchRecorder:(FileWriter*)fileWriter;
65
66-(void)detatchRecorder;
67
78-(NSDictionary *) getSourceProperties;
79
85-(void)configureSession:(AVCaptureSession*)session;
86
94-(void)releaseSession:(AVCaptureSession*)session;
95
96
97-(void)updateEncoder;
98
99@end
The video source provides all video frames to the encoder for transmission over the socket.
Definition: R5VideoSource.h:24
int width
Desired width of the video source (subject to hardware)
Definition: R5VideoSource.h:24
int height
Desired height of the video source (subject to hardware)
Definition: R5VideoSource.h:25
NSDictionary * getSourceProperties()
AVCaptureVideoDataOutput * output
Output path for the encoded data.
Definition: R5VideoSource.h:38
int fps
Frame rate to record at.
Definition: R5VideoSource.h:29
void stopVideoCapture()
int orientation
Orientation of presentation.
Definition: R5VideoSource.h:27
AVEncoder * encoder
Hardware encoder set by the VideoSource. Pass frames to the encoder to continue to socket.
Definition: R5VideoSource.h:30
int bitrate
Bitrate in kbps of the video stream.
Definition: R5VideoSource.h:26
void startVideoCapture()