1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-02 17:51:06 +01:00
libtgvoip/os/darwin/TGVVideoRenderer.mm

33 lines
875 B
Plaintext

//
// 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 "TGVVideoRenderer.h"
#include "SampleBufferDisplayLayerRenderer.h"
@implementation TGVVideoRenderer{
AVSampleBufferDisplayLayer* layer;
id<TGVVideoRendererDelegate> delegate;
tgvoip::video::SampleBufferDisplayLayerRenderer* nativeRenderer;
}
- (instancetype)initWithDisplayLayer:(AVSampleBufferDisplayLayer *)layer delegate:(nonnull id<TGVVideoRendererDelegate>)delegate{
self=[super init];
self->layer=layer;
self->delegate=delegate;
nativeRenderer=new tgvoip::video::SampleBufferDisplayLayerRenderer();
return self;
}
- (void)dealloc{
delete nativeRenderer;
}
- (tgvoip::video::VideoRenderer *)nativeVideoRenderer{
return nativeRenderer;
}
@end