2020-03-30 12:00:09 +00:00
|
|
|
//
|
|
|
|
// 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 <CoreMedia/CoreMedia.h>
|
2020-04-24 09:21:58 +00:00
|
|
|
#import <Foundation/Foundation.h>
|
2020-03-30 12:00:09 +00:00
|
|
|
|
2020-04-24 09:21:58 +00:00
|
|
|
namespace tgvoip
|
|
|
|
{
|
|
|
|
namespace video
|
|
|
|
{
|
|
|
|
class VideoSource;
|
2020-03-30 12:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-24 09:21:58 +00:00
|
|
|
typedef NS_ENUM(int, TGVVideoResolution) {
|
|
|
|
TGVVideoResolution1080,
|
|
|
|
TGVVideoResolution720,
|
|
|
|
TGVVideoResolution480,
|
|
|
|
TGVVideoResolution360
|
2020-03-30 12:00:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@protocol TGVVideoSourceDelegate <NSObject>
|
|
|
|
|
2020-04-24 09:21:58 +00:00
|
|
|
- (void)setFrameRate:(unsigned int)frameRate;
|
2020-03-30 12:00:09 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface TGVVideoSource : NSObject
|
|
|
|
|
2020-04-24 09:21:58 +00:00
|
|
|
- (instancetype)initWithDelegate:(id<TGVVideoSourceDelegate>)delegate;
|
|
|
|
- (void)sendVideoFrame:(CMSampleBufferRef)buffer;
|
2020-03-30 12:00:09 +00:00
|
|
|
- (TGVVideoResolution)maximumSupportedVideoResolution;
|
2020-04-24 09:21:58 +00:00
|
|
|
- (void)setVideoRotation:(unsigned int)rotation;
|
2020-03-30 12:00:09 +00:00
|
|
|
- (void)pauseStream;
|
|
|
|
- (void)resumeStream;
|
|
|
|
- (tgvoip::video::VideoSource*)nativeVideoSource;
|
|
|
|
|
2020-04-24 09:21:58 +00:00
|
|
|
- (void)_requestFrameRate:(unsigned int)frameRate;
|
2020-03-30 12:00:09 +00:00
|
|
|
|
|
|
|
@end
|