mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-25 04:30:38 +00:00

git-subtree-dir: submodules/ffmpeg git-subtree-mainline: 8f5a4f7dc119599d326c72d9a6115973e825491b git-subtree-split: 53fc3dcb6022f35015afd2605ead32bfd7417144
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
|