differentiate class and insance methods in ReturnCode class for native platforms

This commit is contained in:
Taner Sener 2021-11-08 00:12:32 +00:00
parent b142442551
commit eee8d852b9
4 changed files with 10 additions and 10 deletions

View File

@ -688,7 +688,7 @@ public class FFmpegKitConfig {
final int returnCodeValue = nativeFFprobeExecute(mediaInformationSession.getSessionId(), mediaInformationSession.getArguments()); final int returnCodeValue = nativeFFprobeExecute(mediaInformationSession.getSessionId(), mediaInformationSession.getArguments());
final ReturnCode returnCode = new ReturnCode(returnCodeValue); final ReturnCode returnCode = new ReturnCode(returnCodeValue);
mediaInformationSession.complete(returnCode); mediaInformationSession.complete(returnCode);
if (returnCode.isSuccess()) { if (returnCode.isValueSuccess()) {
MediaInformation mediaInformation = MediaInformationJsonParser.fromWithError(mediaInformationSession.getAllLogsAsString(waitTimeout)); MediaInformation mediaInformation = MediaInformationJsonParser.fromWithError(mediaInformationSession.getAllLogsAsString(waitTimeout));
mediaInformationSession.setMediaInformation(mediaInformation); mediaInformationSession.setMediaInformation(mediaInformation);
} }

View File

@ -43,15 +43,15 @@ public class ReturnCode {
return value; return value;
} }
public boolean isSuccess() { public boolean isValueSuccess() {
return (value == SUCCESS); return (value == SUCCESS);
} }
public boolean isError() { public boolean isValueError() {
return ((value != SUCCESS) && (value != CANCEL)); return ((value != SUCCESS) && (value != CANCEL));
} }
public boolean isCancel() { public boolean isValueCancel() {
return (value == CANCEL); return (value == CANCEL);
} }

View File

@ -37,11 +37,11 @@ typedef NS_ENUM(NSUInteger, ReturnCodeEnum) {
- (int)getValue; - (int)getValue;
- (BOOL)isSuccess; - (BOOL)isValueSuccess;
- (BOOL)isError; - (BOOL)isValueError;
- (BOOL)isCancel; - (BOOL)isValueCancel;
@end @end

View File

@ -44,15 +44,15 @@
return _value; return _value;
} }
- (BOOL)isSuccess { - (BOOL)isValueSuccess {
return (_value == ReturnCodeSuccess); return (_value == ReturnCodeSuccess);
} }
- (BOOL)isError { - (BOOL)isValueError {
return ((_value != ReturnCodeSuccess) && (_value != ReturnCodeCancel)); return ((_value != ReturnCodeSuccess) && (_value != ReturnCodeCancel));
} }
- (BOOL)isCancel { - (BOOL)isValueCancel {
return (_value == ReturnCodeCancel); return (_value == ReturnCodeCancel);
} }