Home telegram - tgVideoCameraPipeline
Post
Cancel

telegram - tgVideoCameraPipeline

TGVideoCameraPipeline

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// session
AVCaptureSession *_captureSession;

// video io
AVCaptureDevice *_videoDevice;
AVCaptureConnection *_videoConnection;
AVCaptureDeviceInput *_videoInput;
AVCaptureVideoDataOutput *_videoOutput;

// audio io
AVCaptureDevice *_audioDevice;
AVCaptureConnection *_audioConnection;
AVCaptureDeviceInput *_audioInput;
AVCaptureAudioDataOutput *_audioOutput;

// config
AVCaptureVideoOrientation _videoBufferOrientation;
AVCaptureDevicePosition _preferredPosition;

TGMediaVideoConversionPreset _preset;

@property (nonatomic, strong) __attribute__((NSObject)) CMFormatDescriptionRef outputVideoFormatDescription;
@property (nonatomic, strong) __attribute__((NSObject)) CMFormatDescriptionRef outputAudioFormatDescription;


// enter foreground notification
bool _running;
bool _startCaptureSessionOnEnteringForeground;
id _applicationWillEnterForegroundObserver;

// render
TGVideoCameraGLRenderer *_renderer;
bool _renderingEnabled;

// recorder
TGVideoCameraMovieRecorder *_recorder;
NSURL *_recordingURL;
TGVideoCameraRecordingStatus _recordingStatus;
UIImage *_recordingThumbnail;

// result
NSTimeInterval _resultDuration;

CVPixelBufferRef _previousPixelBuffer;
int32_t _repeatingCount;

CVPixelBufferRef _currentPreviewPixelBuffer;
NSMutableDictionary *_thumbnails;

NSTimeInterval _firstThumbnailTime;
NSTimeInterval _previousThumbnailTime;

// mic level
int16_t _micLevelPeak;
int _micLevelPeakCount;



// live upload
bool _liveUpload;
id<TGLiveUploadInterface> _watcher;
id _liveUploadData;
id<TGLiveUploadInterface> _liveUploadInterface;

This post is licensed under CC BY 4.0 by the author.