mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Build ChatListUI
This commit is contained in:
34
submodules/FFMpegBinding/Sources/FFMpegAVCodec.m
Normal file
34
submodules/FFMpegBinding/Sources/FFMpegAVCodec.m
Normal file
@@ -0,0 +1,34 @@
|
||||
#import <FFMpegBinding/FFMpegAVCodec.h>
|
||||
|
||||
#import "libavcodec/avcodec.h"
|
||||
|
||||
@interface FFMpegAVCodec () {
|
||||
AVCodec *_impl;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation FFMpegAVCodec
|
||||
|
||||
- (instancetype)initWithImpl:(AVCodec *)impl {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
_impl = impl;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (FFMpegAVCodec * _Nullable)findForId:(int)codecId {
|
||||
AVCodec *codec = avcodec_find_decoder(codecId);
|
||||
if (codec) {
|
||||
return [[FFMpegAVCodec alloc] initWithImpl:codec];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void *)impl {
|
||||
return _impl;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user