FFmpegKit iOS / macOS / tvOS API 6.0
Loading...
Searching...
No Matches
FFmpegKitConfig.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018-2021 Taner Sener
3 *
4 * This file is part of FFmpegKit.
5 *
6 * FFmpegKit is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * FFmpegKit is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with FFmpegKit. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef FFMPEG_KIT_CONFIG_H
21#define FFMPEG_KIT_CONFIG_H
22
23#import <stdio.h>
24#import <pthread.h>
25#import <unistd.h>
26#import <Foundation/Foundation.h>
27#import "FFmpegSession.h"
28#import "FFprobeSession.h"
29#import "LogCallback.h"
32
34extern NSString* const FFmpegKitVersion;
35
36typedef NS_ENUM(NSUInteger, Signal) {
37 SignalInt = 2,
38 SignalQuit = 3,
39 SignalPipe = 13,
40 SignalTerm = 15,
41 SignalXcpu = 24
42};
43
48@interface FFmpegKitConfig : NSObject
49
60+ (void)enableRedirection;
61
69+ (void)disableRedirection;
70
77+ (int)setFontconfigConfigurationPath:(NSString*)path;
78
91+ (void)setFontDirectory:(NSString*)fontDirectoryPath with:(NSDictionary*)fontNameMapping;
92
105+ (void)setFontDirectoryList:(NSArray*)fontDirectoryList with:(NSDictionary*)fontNameMapping;
106
114+ (NSString*)registerNewFFmpegPipe;
115
121+ (void)closeFFmpegPipe:(NSString*)ffmpegPipePath;
122
128+ (NSString*)getFFmpegVersion;
129
135+ (NSString*)getVersion;
136
142+ (int)isLTSBuild;
143
149+ (NSString*)getBuildDate;
150
158+ (int)setEnvironmentVariable:(NSString*)variableName value:(NSString*)variableValue;
159
166+ (void)ignoreSignal:(Signal)signal;
167
173+ (void)ffmpegExecute:(FFmpegSession*)ffmpegSession;
174
180+ (void)ffprobeExecute:(FFprobeSession*)ffprobeSession;
181
188+ (void)getMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout;
189
198+ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession;
199
209+ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession onDispatchQueue:(dispatch_queue_t)queue;
210
219+ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession;
220
230+ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession onDispatchQueue:(dispatch_queue_t)queue;
231
241+ (void)asyncGetMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout;
242
253+ (void)asyncGetMediaInformationExecute:(MediaInformationSession*)mediaInformationSession onDispatchQueue:(dispatch_queue_t)queue withTimeout:(int)waitTimeout;
254
260+ (void)enableLogCallback:(LogCallback)logCallback;
261
267+ (void)enableStatisticsCallback:(StatisticsCallback)statisticsCallback;
268
274+ (void)enableFFmpegSessionCompleteCallback:(FFmpegSessionCompleteCallback)ffmpegSessionCompleteCallback;
275
282
288+ (void)enableFFprobeSessionCompleteCallback:(FFprobeSessionCompleteCallback)ffprobeSessionCompleteCallback;
289
296
303+ (void)enableMediaInformationSessionCompleteCallback:(MediaInformationSessionCompleteCallback)mediaInformationSessionCompleteCallback;
304
311
318
324+ (void)setLogLevel:(int)level;
325
332+ (NSString*)logLevelToString:(int)level;
333
340
346+ (void)setSessionHistorySize:(int)sessionHistorySize;
347
354+ (id<Session>)getSession:(long)sessionId;
355
361+ (id<Session>)getLastSession;
362
369+ (id<Session>)getLastCompletedSession;
370
376+ (NSArray*)getSessions;
377
382+ (void)clearSessions;
383
389+ (NSArray*)getFFmpegSessions;
390
396+ (NSArray*)getFFprobeSessions;
397
404
410+ (NSArray*)getSessionsByState:(SessionState)state;
411
417+ (LogRedirectionStrategy)getLogRedirectionStrategy;
418
424+ (void)setLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy;
425
433+ (int)messagesInTransmit:(long)sessionId;
434
441+ (NSString*)sessionStateToString:(SessionState)state;
442
450+ (NSArray*)parseArguments:(NSString*)command;
451
458+ (NSString*)argumentsToString:(NSArray*)arguments;
459
460@end
461
462#endif // FFMPEG_KIT_CONFIG_H
typedef NS_ENUM(NSUInteger, Signal)
NSString *const FFmpegKitVersion
void(^ FFmpegSessionCompleteCallback)(FFmpegSession *session)
void(^ FFprobeSessionCompleteCallback)(FFprobeSession *session)
void(^ LogCallback)(Log *log)
Definition LogCallback.h:31
void(^ MediaInformationSessionCompleteCallback)(MediaInformationSession *session)
void(^ StatisticsCallback)(Statistics *statistics)
NSArray * getFFmpegSessions()
FFmpegSessionCompleteCallback getFFmpegSessionCompleteCallback()
LogRedirectionStrategy getLogRedirectionStrategy()
NSString * registerNewFFmpegPipe()
FFprobeSessionCompleteCallback getFFprobeSessionCompleteCallback()
NSString * getVersion()
MediaInformationSessionCompleteCallback getMediaInformationSessionCompleteCallback()
NSString * getBuildDate()
NSArray * getFFprobeSessions()
NSArray * getMediaInformationSessions()
id< Session > getLastSession()
NSString * getFFmpegVersion()
id< Session > getLastCompletedSession()