| FFmpegKit iOS / macOS / tvOS API 6.0

Loading...
Searching...
No Matches
MediaInformationSession.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 "MediaInformationSession.h"
21#import "LogCallback.h"
22#import "MediaInformation.h"
23
24@implementation MediaInformationSession {
25 MediaInformation* _mediaInformation;
26 MediaInformationSessionCompleteCallback _completeCallback;
27}
28
29+ (void)initialize {
30 // EMPTY INITIALIZE
31}
32
33+ (instancetype)create:(NSArray*)arguments {
34 return [[self alloc] init:arguments withCompleteCallback:nil withLogCallback:nil];
35}
36
37+ (instancetype)create:(NSArray*)arguments withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback {
38 return [[self alloc] init:arguments withCompleteCallback:completeCallback withLogCallback:nil];
39}
40
41+ (instancetype)create:(NSArray*)arguments withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback {
42 return [[self alloc] init:arguments withCompleteCallback:completeCallback withLogCallback:logCallback];
43}
44
45- (instancetype)init:(NSArray*)arguments withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback {
46
47 self = [super init:arguments withLogCallback:logCallback withLogRedirectionStrategy:LogRedirectionStrategyNeverPrintLogs];
48
49 if (self) {
50 _completeCallback = completeCallback;
51 }
52
53 return self;
54}
55
56- (MediaInformation*)getMediaInformation {
57 return _mediaInformation;
58}
59
60- (void)setMediaInformation:(MediaInformation*)mediaInformation {
61 _mediaInformation = mediaInformation;
62}
63
64- (MediaInformationSessionCompleteCallback)getCompleteCallback {
65 return _completeCallback;
66}
67
68- (BOOL)isFFmpeg {
69 return false;
70}
71
72- (BOOL)isFFprobe {
73 return false;
74}
75
76- (BOOL)isMediaInformation {
77 return true;
78}
79
80@end
81
_completeCallback
FFmpegSessionCompleteCallback _completeCallback
Definition FFmpegSession.m:27
LogCallback.h
LogCallback
void(^ LogCallback)(Log *log)
Definition LogCallback.h:31
MediaInformation.h
MediaInformationSession.h
_completeCallback
MediaInformationSessionCompleteCallback _completeCallback
Definition MediaInformationSession.m:26
MediaInformationSessionCompleteCallback
void(^ MediaInformationSessionCompleteCallback)(MediaInformationSession *session)
Definition MediaInformationSessionCompleteCallback.h:47
MediaInformation
Definition MediaInformation.h:41
MediaInformationSession
Definition MediaInformationSession.h:33