mirror of
https://github.com/arthenica/ffmpeg-kit.git
synced 2026-05-07 20:22:27 +00:00
fix toSessionDictionary method on ios
This commit is contained in:
@@ -724,16 +724,14 @@ RCT_EXPORT_METHOD(getExternalLibraries:(RCTPromiseResolveBlock)resolve rejecter:
|
||||
dictionary[KEY_SESSION_START_TIME] = [NSNumber numberWithDouble:[[session getStartTime] timeIntervalSince1970]*1000];
|
||||
dictionary[KEY_SESSION_COMMAND] = [session getCommand];
|
||||
|
||||
if ([session isFFprobe]) {
|
||||
if ([session isMediaInformation]) {
|
||||
MediaInformationSession *mediaInformationSession = (MediaInformationSession*)session;
|
||||
dictionary[KEY_SESSION_MEDIA_INFORMATION] = [FFmpegKitReactNativeModule toMediaInformationDictionary:[mediaInformationSession getMediaInformation]];
|
||||
dictionary[KEY_SESSION_TYPE] = [NSNumber numberWithInt:SESSION_TYPE_MEDIA_INFORMATION];
|
||||
} else {
|
||||
dictionary[KEY_SESSION_TYPE] = [NSNumber numberWithInt:SESSION_TYPE_FFPROBE];
|
||||
}
|
||||
} else {
|
||||
if ([session isFFmpeg]) {
|
||||
dictionary[KEY_SESSION_TYPE] = [NSNumber numberWithInt:SESSION_TYPE_FFMPEG];
|
||||
} else if ([session isFFprobe]) {
|
||||
dictionary[KEY_SESSION_TYPE] = [NSNumber numberWithInt:SESSION_TYPE_FFPROBE];
|
||||
} else if ([session isMediaInformation]) {
|
||||
MediaInformationSession *mediaInformationSession = (MediaInformationSession*)session;
|
||||
dictionary[KEY_SESSION_MEDIA_INFORMATION] = [FFmpegKitReactNativeModule toMediaInformationDictionary:[mediaInformationSession getMediaInformation]];
|
||||
dictionary[KEY_SESSION_TYPE] = [NSNumber numberWithInt:SESSION_TYPE_MEDIA_INFORMATION];
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
|
||||
Reference in New Issue
Block a user