mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-28 08:49:46 +00:00
git-subtree-dir: submodules/ffmpeg git-subtree-mainline:8f5a4f7dc1git-subtree-split:53fc3dcb60
52 lines
638 B
Objective-C
52 lines
638 B
Objective-C
#import "FFMpegAVFrame.h"
|
|
|
|
#import "libavformat/avformat.h"
|
|
|
|
@interface FFMpegAVFrame () {
|
|
AVFrame *_impl;
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation FFMpegAVFrame
|
|
|
|
- (instancetype)init {
|
|
self = [super init];
|
|
if (self != nil) {
|
|
_impl = av_frame_alloc();
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)dealloc {
|
|
if (_impl) {
|
|
av_frame_unref(_impl);
|
|
}
|
|
}
|
|
|
|
- (int32_t)width {
|
|
return _impl->width;
|
|
}
|
|
|
|
- (int32_t)height {
|
|
return _impl->height;
|
|
}
|
|
|
|
- (uint8_t **)data {
|
|
return _impl->data;
|
|
}
|
|
|
|
- (int *)lineSize {
|
|
return _impl->linesize;
|
|
}
|
|
|
|
- (int64_t)pts {
|
|
return _impl->pts;
|
|
}
|
|
|
|
- (void *)impl {
|
|
return _impl;
|
|
}
|
|
|
|
@end
|