| FFmpegKit iOS / macOS / tvOS API 4.5

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 "ExecuteCallback.h"
28#import "FFmpegSession.h"
29#import "FFprobeSession.h"
30#import "LogCallback.h"
31#import "MediaInformationSession.h"
32#import "StatisticsCallback.h"
33
35 extern NSString* const FFmpegKitVersion;
36
37 typedef NS_ENUM(NSUInteger, Signal) {
38 SignalInt = 2,
39 SignalQuit = 3,
40 SignalPipe = 13,
41 SignalTerm = 15,
42 SignalXcpu = 24
43};
44
49@interface FFmpegKitConfig : NSObject
50
61+ (void)enableRedirection;
62
70+ (void)disableRedirection;
71
78+ (int)setFontconfigConfigurationPath:(NSString*)path;
79
92+ (void)setFontDirectory:(NSString*)fontDirectoryPath with:(NSDictionary*)fontNameMapping;
93
106+ (void)setFontDirectoryList:(NSArray*)fontDirectoryList with:(NSDictionary*)fontNameMapping;
107
115+ (NSString*)registerNewFFmpegPipe;
116
122+ (void)closeFFmpegPipe:(NSString*)ffmpegPipePath;
123
129+ (NSString*)getFFmpegVersion;
130
136+ (NSString*)getVersion;
137
143+ (int)isLTSBuild;
144
150+ (NSString*)getBuildDate;
151
159+ (int)setEnvironmentVariable:(NSString*)variableName value:(NSString*)variableValue;
160
167+ (void)ignoreSignal:(Signal)signal;
168
174+ (void)ffmpegExecute:(FFmpegSession*)ffmpegSession;
175
181+ (void)ffprobeExecute:(FFprobeSession*)ffprobeSession;
182
189+ (void)getMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout;
190
196+ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession;
197
204+ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession onDispatchQueue:(dispatch_queue_t)queue;
205
211+ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession;
212
219+ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession onDispatchQueue:(dispatch_queue_t)queue;
220
227+ (void)asyncGetMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout;
228
236+ (void)asyncGetMediaInformationExecute:(MediaInformationSession*)mediaInformationSession onDispatchQueue:(dispatch_queue_t)queue withTimeout:(int)waitTimeout;
237
243+ (void)enableLogCallback:(LogCallback)logCallback;
244
250+ (void)enableStatisticsCallback:(StatisticsCallback)statisticsCallback;
251
257+ (void)enableExecuteCallback:(ExecuteCallback)executeCallback;
258
264+ (ExecuteCallback)getExecuteCallback;
265
271+ (int)getLogLevel;
272
278+ (void)setLogLevel:(int)level;
279
286+ (NSString*)logLevelToString:(int)level;
287
293+ (int)getSessionHistorySize;
294
300+ (void)setSessionHistorySize:(int)sessionHistorySize;
301
308+ (id<Session>)getSession:(long)sessionId;
309
315+ (id<Session>)getLastSession;
316
323+ (id<Session>)getLastCompletedSession;
324
330+ (NSArray*)getSessions;
331
336+ (void)clearSessions;
337
343+ (NSArray*)getFFmpegSessions;
344
350+ (NSArray*)getFFprobeSessions;
351
357+ (NSArray*)getSessionsByState:(SessionState)state;
358
364+ (LogRedirectionStrategy)getLogRedirectionStrategy;
365
371+ (void)setLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy;
372
380+ (int)messagesInTransmit:(long)sessionId;
381
388+ (NSString*)sessionStateToString:(SessionState)state;
389
397+ (NSArray*)parseArguments:(NSString*)command;
398
405+ (NSString*)argumentsToString:(NSArray*)arguments;
406
407@end
408
409#endif // FFMPEG_KIT_CONFIG_H
ExecuteCallback.h
ExecuteCallback
void(^ ExecuteCallback)(id< Session > session)
Definition: ExecuteCallback.h:46
NS_ENUM
typedef NS_ENUM(NSUInteger, Signal)
Definition: FFmpegKitConfig.h:37
FFmpegKitVersion
NSString *const FFmpegKitVersion
Definition: FFmpegKitConfig.m:38
FFmpegSession.h
FFprobeSession.h
LogCallback.h
LogCallback
void(^ LogCallback)(Log *log)
Definition: LogCallback.h:31
MediaInformationSession.h
StatisticsCallback.h
StatisticsCallback
void(^ StatisticsCallback)(Statistics *statistics)
Definition: StatisticsCallback.h:31
int
int
Definition: fftools_ffmpeg_filter.c:165
FFmpegKitConfig
Definition: FFmpegKitConfig.h:50
+[FFmpegKitConfig getFFmpegSessions]
NSArray * getFFmpegSessions()
Definition: FFmpegKitConfig.m:1083
+[FFmpegKitConfig getLogRedirectionStrategy]
LogRedirectionStrategy getLogRedirectionStrategy()
Definition: FFmpegKitConfig.m:1134
+[FFmpegKitConfig getLogLevel]
int getLogLevel()
Definition: FFmpegKitConfig.m:987
+[FFmpegKitConfig disableRedirection]
void disableRedirection()
Definition: FFmpegKitConfig.m:696
+[FFmpegKitConfig registerNewFFmpegPipe]
NSString * registerNewFFmpegPipe()
Definition: FFmpegKitConfig.m:792
+[FFmpegKitConfig getSessions]
NSArray * getSessions()
Definition: FFmpegKitConfig.m:1065
+[FFmpegKitConfig getVersion]
NSString * getVersion()
Definition: FFmpegKitConfig.m:833
+[FFmpegKitConfig clearSessions]
void clearSessions()
Definition: FFmpegKitConfig.m:1075
+[FFmpegKitConfig getExecuteCallback]
ExecuteCallback getExecuteCallback()
Definition: FFmpegKitConfig.m:983
+[FFmpegKitConfig getBuildDate]
NSString * getBuildDate()
Definition: FFmpegKitConfig.m:849
+[FFmpegKitConfig getFFprobeSessions]
NSArray * getFFprobeSessions()
Definition: FFmpegKitConfig.m:1100
+[FFmpegKitConfig getSessionHistorySize]
int getSessionHistorySize()
Definition: FFmpegKitConfig.m:1011
+[FFmpegKitConfig getLastSession]
id< Session > getLastSession()
Definition: FFmpegKitConfig.m:1037
+[FFmpegKitConfig getFFmpegVersion]
NSString * getFFmpegVersion()
Definition: FFmpegKitConfig.m:829
+[FFmpegKitConfig enableRedirection]
void enableRedirection()
Definition: FFmpegKitConfig.m:677
+[FFmpegKitConfig isLTSBuild]
int isLTSBuild()
Definition: FFmpegKitConfig.m:841
+[FFmpegKitConfig getLastCompletedSession]
id< Session > getLastCompletedSession()
Definition: FFmpegKitConfig.m:1047
FFmpegSession
Definition: FFmpegSession.h:31
FFprobeSession
Definition: FFprobeSession.h:30
MediaInformationSession
Definition: MediaInformationSession.h:32
Session-p
Definition: Session.h:34