| FFmpegKit iOS / macOS / tvOS API 6.0

Loading...
Searching...
No Matches
FFprobeSession.m
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021-2022 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#import "FFprobeSession.h"
21#import "FFmpegKitConfig.h"
22#import "LogCallback.h"
23
24@implementation FFprobeSession {
25 FFprobeSessionCompleteCallback _completeCallback;
26}
27
28+ (void)initialize {
29 // EMPTY INITIALIZE
30}
31
32+ (instancetype)create:(NSArray*)arguments {
33 return [[self alloc] init:arguments withCompleteCallback:nil withLogCallback:nil withLogRedirectionStrategy:[FFmpegKitConfig getLogRedirectionStrategy]];
34}
35
36+ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback {
37 return [[self alloc] init:arguments withCompleteCallback:completeCallback withLogCallback:nil withLogRedirectionStrategy:[FFmpegKitConfig getLogRedirectionStrategy]];
38}
39
40+ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback {
41 return [[self alloc] init:arguments withCompleteCallback:completeCallback withLogCallback:logCallback withLogRedirectionStrategy:[FFmpegKitConfig getLogRedirectionStrategy]];
42}
43
44+ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy {
45 return [[self alloc] init:arguments withCompleteCallback:completeCallback withLogCallback:logCallback withLogRedirectionStrategy:logRedirectionStrategy];
46}
47
48- (instancetype)init:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy {
49
50 self = [super init:arguments withLogCallback:logCallback withLogRedirectionStrategy:logRedirectionStrategy];
51
52 if (self) {
53 _completeCallback = completeCallback;
54 }
55
56 return self;
57}
58
59- (FFprobeSessionCompleteCallback)getCompleteCallback {
60 return _completeCallback;
61}
62
63- (BOOL)isFFmpeg {
64 return false;
65}
66
67- (BOOL)isFFprobe {
68 return true;
69}
70
71- (BOOL)isMediaInformation {
72 return false;
73}
74
75@end
76
FFmpegKitConfig.h
_completeCallback
FFmpegSessionCompleteCallback _completeCallback
Definition FFmpegSession.m:27
FFprobeSession.h
FFprobeSessionCompleteCallback
void(^ FFprobeSessionCompleteCallback)(FFprobeSession *session)
Definition FFprobeSessionCompleteCallback.h:46
LogCallback.h
LogCallback
void(^ LogCallback)(Log *log)
Definition LogCallback.h:31
FFmpegKitConfig
Definition FFmpegKitConfig.h:49
+[FFmpegKitConfig getLogRedirectionStrategy]
LogRedirectionStrategy getLogRedirectionStrategy()
Definition FFmpegKitConfig.m:1317
FFprobeSession
Definition FFprobeSession.h:31