FFmpegKit iOS / macOS / tvOS API 4.5
Session.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 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 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 License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General License
17 * along with FFmpegKit. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef FFMPEG_KIT_SESSION_H
21#define FFMPEG_KIT_SESSION_H
22
23#import <Foundation/Foundation.h>
24#import "ExecuteCallback.h"
25#import "Log.h"
26#import "LogCallback.h"
28#import "ReturnCode.h"
29#import "SessionState.h"
30
34@protocol Session
35
36@required
37
44
51
57- (long)getSessionId;
58
64- (NSDate*)getCreateTime;
65
71- (NSDate*)getStartTime;
72
78- (NSDate*)getEndTime;
79
86- (long)getDuration;
87
93- (NSArray*)getArguments;
94
100- (NSString*)getCommand;
101
109- (NSArray*)getAllLogsWithTimeout:(int)waitTimeout;
110
117- (NSArray*)getAllLogs;
118
126- (NSArray*)getLogs;
127
136- (NSString*)getAllLogsAsStringWithTimeout:(int)waitTimeout;
137
144- (NSString*)getAllLogsAsString;
145
153- (NSString*)getLogsAsString;
154
160- (NSString*)getOutput;
161
167- (SessionState)getState;
168
178
188- (NSString*)getFailStackTrace;
189
195- (LogRedirectionStrategy)getLogRedirectionStrategy;
196
205
211- (void)addLog:(Log*)log;
212
216- (void)startRunning;
217
223- (void)complete:(ReturnCode*)returnCode;
224
230- (void)fail:(NSException*)exception;
231
237- (BOOL)isFFmpeg;
238
244- (BOOL)isFFprobe;
245
249- (void)cancel;
250
251@end
252
253#endif // FFMPEG_KIT_SESSION_H
void(^ ExecuteCallback)(id< Session > session)
void(^ LogCallback)(Log *log)
Definition: LogCallback.h:31
Definition: Log.h:29
NSDate * getEndTime()
long getSessionId()
NSString * getCommand()
SessionState getState()
ExecuteCallback getExecuteCallback()
NSString * getAllLogsAsString()
NSString * getFailStackTrace()
BOOL thereAreAsynchronousMessagesInTransmit()
ReturnCode * getReturnCode()
NSArray * getLogs()
void cancel()
NSArray * getAllLogs()
LogRedirectionStrategy getLogRedirectionStrategy()
void startRunning()
long getDuration()
NSString * getOutput()
NSString * getLogsAsString()
LogCallback getLogCallback()
NSDate * getStartTime()
BOOL isFFprobe()
NSArray * getArguments()
NSDate * getCreateTime()
BOOL isFFmpeg()