| 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"
30#import "MediaInformationSession.h"
31#import "StatisticsCallback.h"
32
34 extern NSString* const FFmpegKitVersion;
35
36 typedef 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
281+ (FFmpegSessionCompleteCallback)getFFmpegSessionCompleteCallback;
282
288+ (void)enableFFprobeSessionCompleteCallback:(FFprobeSessionCompleteCallback)ffprobeSessionCompleteCallback;
289
295+ (FFprobeSessionCompleteCallback)getFFprobeSessionCompleteCallback;
296
303+ (void)enableMediaInformationSessionCompleteCallback:(MediaInformationSessionCompleteCallback)mediaInformationSessionCompleteCallback;
304
310+ (MediaInformationSessionCompleteCallback)getMediaInformationSessionCompleteCallback;
311
317+ (int)getLogLevel;
318
324+ (void)setLogLevel:(int)level;
325
332+ (NSString*)logLevelToString:(int)level;
333
339+ (int)getSessionHistorySize;
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
403+ (NSArray*)getMediaInformationSessions;
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
NS_ENUM
typedef NS_ENUM(NSUInteger, Signal)
Definition FFmpegKitConfig.h:36
FFmpegKitVersion
NSString *const FFmpegKitVersion
Definition FFmpegKitConfig.m:39
FFmpegSession.h
FFmpegSessionCompleteCallback
void(^ FFmpegSessionCompleteCallback)(FFmpegSession *session)
Definition FFmpegSessionCompleteCallback.h:46
FFprobeSession.h
FFprobeSessionCompleteCallback
void(^ FFprobeSessionCompleteCallback)(FFprobeSession *session)
Definition FFprobeSessionCompleteCallback.h:46
LogCallback.h
LogCallback
void(^ LogCallback)(Log *log)
Definition LogCallback.h:31
MediaInformationSession.h
MediaInformationSessionCompleteCallback
void(^ MediaInformationSessionCompleteCallback)(MediaInformationSession *session)
Definition MediaInformationSessionCompleteCallback.h:47
StatisticsCallback.h
StatisticsCallback
void(^ StatisticsCallback)(Statistics *statistics)
Definition StatisticsCallback.h:31
int
int
Definition fftools_ffmpeg_filter.c:180
FFmpegKitConfig
Definition FFmpegKitConfig.h:49
+[FFmpegKitConfig getFFmpegSessions]
NSArray * getFFmpegSessions()
Definition FFmpegKitConfig.m:1249
+[FFmpegKitConfig getFFmpegSessionCompleteCallback]
FFmpegSessionCompleteCallback getFFmpegSessionCompleteCallback()
Definition FFmpegKitConfig.m:1131
+[FFmpegKitConfig getLogRedirectionStrategy]
LogRedirectionStrategy getLogRedirectionStrategy()
Definition FFmpegKitConfig.m:1317
+[FFmpegKitConfig getLogLevel]
int getLogLevel()
Definition FFmpegKitConfig.m:1151
+[FFmpegKitConfig disableRedirection]
void disableRedirection()
Definition FFmpegKitConfig.m:797
+[FFmpegKitConfig registerNewFFmpegPipe]
NSString * registerNewFFmpegPipe()
Definition FFmpegKitConfig.m:893
+[FFmpegKitConfig getSessions]
NSArray * getSessions()
Definition FFmpegKitConfig.m:1230
+[FFmpegKitConfig getFFprobeSessionCompleteCallback]
FFprobeSessionCompleteCallback getFFprobeSessionCompleteCallback()
Definition FFmpegKitConfig.m:1139
+[FFmpegKitConfig getVersion]
NSString * getVersion()
Definition FFmpegKitConfig.m:934
+[FFmpegKitConfig clearSessions]
void clearSessions()
Definition FFmpegKitConfig.m:1240
+[FFmpegKitConfig getMediaInformationSessionCompleteCallback]
MediaInformationSessionCompleteCallback getMediaInformationSessionCompleteCallback()
Definition FFmpegKitConfig.m:1147
+[FFmpegKitConfig getBuildDate]
NSString * getBuildDate()
Definition FFmpegKitConfig.m:950
+[FFmpegKitConfig getFFprobeSessions]
NSArray * getFFprobeSessions()
Definition FFmpegKitConfig.m:1266
+[FFmpegKitConfig getMediaInformationSessions]
NSArray * getMediaInformationSessions()
Definition FFmpegKitConfig.m:1283
+[FFmpegKitConfig getSessionHistorySize]
int getSessionHistorySize()
Definition FFmpegKitConfig.m:1175
+[FFmpegKitConfig getLastSession]
id< Session > getLastSession()
Definition FFmpegKitConfig.m:1202
+[FFmpegKitConfig getFFmpegVersion]
NSString * getFFmpegVersion()
Definition FFmpegKitConfig.m:930
+[FFmpegKitConfig enableRedirection]
void enableRedirection()
Definition FFmpegKitConfig.m:778
+[FFmpegKitConfig isLTSBuild]
int isLTSBuild()
Definition FFmpegKitConfig.m:942
+[FFmpegKitConfig getLastCompletedSession]
id< Session > getLastCompletedSession()
Definition FFmpegKitConfig.m:1212
FFmpegSession
Definition FFmpegSession.h:32
FFprobeSession
Definition FFprobeSession.h:31
MediaInformationSession
Definition MediaInformationSession.h:33