FFmpegKit iOS / macOS / tvOS API  4.4
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"
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 
265 
271 + (int)getLogLevel;
272 
278 + (void)setLogLevel:(int)level;
279 
286 + (NSString*)logLevelToString:(int)level;
287 
294 
300 + (void)setSessionHistorySize:(int)sessionHistorySize;
301 
308 + (id<Session>)getSession:(long)sessionId;
309 
315 + (id<Session>)getLastSession;
316 
324 
330 + (NSArray*)getSessions;
331 
337 + (NSArray*)getFFmpegSessions;
338 
344 + (NSArray*)getFFprobeSessions;
345 
351 + (NSArray*)getSessionsByState:(SessionState)state;
352 
358 + (LogRedirectionStrategy)getLogRedirectionStrategy;
359 
365 + (void)setLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy;
366 
374 + (int)messagesInTransmit:(long)sessionId;
375 
382 + (NSString*)sessionStateToString:(SessionState)state;
383 
384 @end
385 
386 #endif // FFMPEG_KIT_CONFIG_H
void(^ ExecuteCallback)(id< Session > session)
typedef NS_ENUM(NSUInteger, Signal)
NSString *const FFmpegKitVersion
void(^ LogCallback)(Log *log)
Definition: LogCallback.h:31
void(^ StatisticsCallback)(Statistics *statistics)
NSArray * getFFmpegSessions()
LogRedirectionStrategy getLogRedirectionStrategy()
NSString * registerNewFFmpegPipe()
NSArray * getSessions()
NSString * getVersion()
ExecuteCallback getExecuteCallback()
NSString * getBuildDate()
NSArray * getFFprobeSessions()
id< Session > getLastSession()
NSString * getFFmpegVersion()
id< Session > getLastCompletedSession()