Repo created
This commit is contained in:
parent
81b91f4139
commit
f8c34fa5ee
22732 changed files with 4815320 additions and 2 deletions
51
TMessagesProj/jni/voip/libtgvoip/os/darwin/TGVVideoSource.mm
Normal file
51
TMessagesProj/jni/voip/libtgvoip/os/darwin/TGVVideoSource.mm
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
//
|
||||
// libtgvoip is free and unencumbered public domain software.
|
||||
// For more information, see http://unlicense.org or the UNLICENSE file
|
||||
// you should have received with this source code distribution.
|
||||
//
|
||||
|
||||
#import "TGVVideoSource.h"
|
||||
#include "VideoToolboxEncoderSource.h"
|
||||
|
||||
@implementation TGVVideoSource{
|
||||
tgvoip::video::VideoToolboxEncoderSource* nativeSource;
|
||||
id<TGVVideoSourceDelegate> delegate;
|
||||
}
|
||||
|
||||
|
||||
- (instancetype)initWithDelegate: (id<TGVVideoSourceDelegate>)delegate{
|
||||
self=[super init];
|
||||
nativeSource=new tgvoip::video::VideoToolboxEncoderSource();
|
||||
self->delegate=delegate;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc{
|
||||
delete nativeSource;
|
||||
}
|
||||
|
||||
- (void)sendVideoFrame: (CMSampleBufferRef)buffer{
|
||||
nativeSource->EncodeFrame(buffer);
|
||||
}
|
||||
|
||||
- (TGVVideoResolution)maximumSupportedVideoResolution{
|
||||
return TGVVideoResolution1080;
|
||||
}
|
||||
|
||||
- (void)setVideoRotation: (int)rotation{
|
||||
|
||||
}
|
||||
|
||||
- (void)pauseStream{
|
||||
|
||||
}
|
||||
|
||||
- (void)resumeStream{
|
||||
|
||||
}
|
||||
|
||||
- (tgvoip::video::VideoSource*)nativeVideoSource{
|
||||
return nativeSource;
|
||||
}
|
||||
|
||||
@end
|
||||
Loading…
Add table
Add a link
Reference in a new issue