mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-25 20:50:47 +00:00

git-subtree-dir: submodules/ffmpeg git-subtree-mainline: 8f5a4f7dc119599d326c72d9a6115973e825491b git-subtree-split: 53fc3dcb6022f35015afd2605ead32bfd7417144
53 lines
1.5 KiB
Objective-C
53 lines
1.5 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
#import <CoreMedia/CoreMedia.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class FFMpegAVIOContext;
|
|
@class FFMpegPacket;
|
|
|
|
typedef enum FFMpegAVFormatStreamType {
|
|
FFMpegAVFormatStreamTypeVideo,
|
|
FFMpegAVFormatStreamTypeAudio
|
|
} FFMpegAVFormatStreamType;
|
|
|
|
typedef struct FFMpegFpsAndTimebase {
|
|
CMTime fps;
|
|
CMTime timebase;
|
|
} FFMpegFpsAndTimebase;
|
|
|
|
typedef struct FFMpegStreamMetrics {
|
|
int32_t width;
|
|
int32_t height;
|
|
double rotationAngle;
|
|
uint8_t *extradata;
|
|
int32_t extradataSize;
|
|
} FFMpegStreamMetrics;
|
|
|
|
extern int FFMpegCodecIdH264;
|
|
extern int FFMpegCodecIdHEVC;
|
|
extern int FFMpegCodecIdMPEG4;
|
|
|
|
@class FFMpegAVCodecContext;
|
|
|
|
@interface FFMpegAVFormatContext : NSObject
|
|
|
|
- (instancetype)init;
|
|
|
|
- (void)setIOContext:(FFMpegAVIOContext *)ioContext;
|
|
- (bool)openInput;
|
|
- (bool)findStreamInfo;
|
|
- (void)seekFrameForStreamIndex:(int32_t)streamIndex pts:(int64_t)pts;
|
|
- (bool)readFrameIntoPacket:(FFMpegPacket *)packet;
|
|
- (NSArray<NSNumber *> *)streamIndicesForType:(FFMpegAVFormatStreamType)type;
|
|
- (bool)isAttachedPicAtStreamIndex:(int32_t)streamIndex;
|
|
- (int)codecIdAtStreamIndex:(int32_t)streamIndex;
|
|
- (int64_t)durationAtStreamIndex:(int32_t)streamIndex;
|
|
- (bool)codecParamsAtStreamIndex:(int32_t)streamIndex toContext:(FFMpegAVCodecContext *)context;
|
|
- (FFMpegFpsAndTimebase)fpsAndTimebaseForStreamIndex:(int32_t)streamIndex defaultTimeBase:(CMTime)defaultTimeBase;
|
|
- (FFMpegStreamMetrics)metricsForStreamAtIndex:(int32_t)streamIndex;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|