|
FFmpegKit Android API
4.4
|
Go to the source code of this file.
Data Structures | |
| struct | CallbackData |
Macros | |
| #define | LogType 1 |
| #define | StatisticsType 2 |
Functions | |
| int | ffmpeg_execute (int argc, char **argv) |
| static const char * | avutil_log_get_level_str (int level) |
| static void | avutil_log_format_line (void *avcl, int level, const char *fmt, va_list vl, AVBPrint part[4], int *print_prefix) |
| static void | avutil_log_sanitize (uint8_t *line) |
| void | mutexInit () |
| void | monitorInit () |
| void | mutexUnInit () |
| void | monitorUnInit () |
| void | mutexLock () |
| void | mutexUnlock () |
| void | monitorWait (int milliSeconds) |
| void | monitorNotify () |
| void | logCallbackDataAdd (int level, AVBPrint *data) |
| void | statisticsCallbackDataAdd (int frameNumber, float fps, float quality, int64_t size, int time, double bitrate, double speed) |
| void | addSession (long id) |
| struct CallbackData * | callbackDataRemove () |
| void | removeSession (long id) |
| void | cancelSession (long id) |
| int | cancelRequested (long id) |
| void | resetMessagesInTransmit (long id) |
| void | ffmpegkit_log_callback_function (void *ptr, int level, const char *format, va_list vargs) |
| void | ffmpegkit_statistics_callback_function (int frameNumber, float fps, float quality, int64_t size, int time, double bitrate, double speed) |
| void * | callbackThreadFunction () |
| void | closeParcelFileDescriptor (int fd) |
| jint | JNI_OnLoad (JavaVM *vm, void *reserved) |
| JNIEXPORT void JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_setNativeLogLevel (JNIEnv *env, jclass object, jint level) |
| JNIEXPORT jint JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeLogLevel (JNIEnv *env, jclass object) |
| JNIEXPORT void JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_enableNativeRedirection (JNIEnv *env, jclass object) |
| JNIEXPORT void JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_disableNativeRedirection (JNIEnv *env, jclass object) |
| JNIEXPORT jstring JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeFFmpegVersion (JNIEnv *env, jclass object) |
| JNIEXPORT jstring JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeVersion (JNIEnv *env, jclass object) |
| JNIEXPORT jint JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_nativeFFmpegExecute (JNIEnv *env, jclass object, jlong id, jobjectArray stringArray) |
| JNIEXPORT void JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_nativeFFmpegCancel (JNIEnv *env, jclass object, jlong id) |
| JNIEXPORT int JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_registerNewNativeFFmpegPipe (JNIEnv *env, jclass object, jstring ffmpegPipePath) |
| JNIEXPORT jstring JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeBuildDate (JNIEnv *env, jclass object) |
| JNIEXPORT int JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_setNativeEnvironmentVariable (JNIEnv *env, jclass object, jstring variableName, jstring variableValue) |
| JNIEXPORT void JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_ignoreNativeSignal (JNIEnv *env, jclass object, jint signum) |
| JNIEXPORT int JNICALL | Java_com_arthenica_ffmpegkit_FFmpegKitConfig_messagesInTransmit (JNIEnv *env, jclass object, jlong id) |
Variables | |
| const int | SESSION_MAP_SIZE = 1000 |
| static atomic_short | sessionMap [SESSION_MAP_SIZE] |
| static atomic_int | sessionInTransitMessageCountMap [SESSION_MAP_SIZE] |
| static pthread_mutex_t | lockMutex |
| static pthread_mutex_t | monitorMutex |
| static pthread_cond_t | monitorCondition |
| pthread_t | callbackThread |
| int | redirectionEnabled |
| struct CallbackData * | callbackDataHead |
| struct CallbackData * | callbackDataTail |
| static JavaVM * | globalVm |
| static jclass | configClass |
| static jmethodID | logMethod |
| static jmethodID | statisticsMethod |
| static jmethodID | closeParcelFileDescriptorMethod |
| static jclass | stringClass |
| static jmethodID | stringConstructor |
| const char * | configClassName = "com/arthenica/ffmpegkit/FFmpegKitConfig" |
| const char * | stringClassName = "java/lang/String" |
| volatile int | handleSIGQUIT = 1 |
| volatile int | handleSIGINT = 1 |
| volatile int | handleSIGTERM = 1 |
| volatile int | handleSIGXCPU = 1 |
| volatile int | handleSIGPIPE = 1 |
| __thread volatile long | sessionId = 0 |
| int | configuredLogLevel = AV_LOG_INFO |
| JNINativeMethod | configMethods [] |
| #define LogType 1 |
Definition at line 32 of file ffmpegkit.c.
| #define StatisticsType 2 |
Definition at line 33 of file ffmpegkit.c.
| void addSession | ( | long | id | ) |
Adds a session id to the session map.
| id | session id |
Definition at line 357 of file ffmpegkit.c.
|
static |
Definition at line 156 of file ffmpegkit.c.
|
static |
Definition at line 131 of file ffmpegkit.c.
|
static |
Definition at line 188 of file ffmpegkit.c.
| struct CallbackData* callbackDataRemove | ( | ) |
Removes head of callback data list.
Definition at line 364 of file ffmpegkit.c.
| void* callbackThreadFunction | ( | ) |
Forwards callback messages to Java classes.
Definition at line 497 of file ffmpegkit.c.
| int cancelRequested | ( | long | id | ) |
Checks whether a cancel request for the given session id exists in the session map.
| id | session id |
Definition at line 417 of file ffmpegkit.c.
| void cancelSession | ( | long | id | ) |
Adds a cancel session request to the session map.
| id | session id |
Definition at line 407 of file ffmpegkit.c.
| void closeParcelFileDescriptor | ( | int | fd | ) |
Used by saf_wrapper; is expected to be called from a Java thread, therefore we don't need attach/detach
Definition at line 565 of file ffmpegkit.c.
Forward declaration for function defined in fftools_ffmpeg.c
Definition at line 5165 of file fftools_ffmpeg.c.
| void ffmpegkit_log_callback_function | ( | void * | ptr, |
| int | level, | ||
| const char * | format, | ||
| va_list | vargs | ||
| ) |
Callback function for FFmpeg logs.
| ptr | pointer to AVClass struct |
| level | log level |
| format | format string |
| vargs | arguments |
Definition at line 442 of file ffmpegkit.c.
| void ffmpegkit_statistics_callback_function | ( | int | frameNumber, |
| float | fps, | ||
| float | quality, | ||
| int64_t | size, | ||
| int | time, | ||
| double | bitrate, | ||
| double | speed | ||
| ) |
Callback function for FFmpeg statistics.
| frameNumber | last processed frame number |
| fps | frames processed per second |
| quality | quality of the output stream (video only) |
| size | size in bytes |
| time | processed output duration |
| bitrate | output bit rate in kbits/s |
| speed | processing speed = processed duration / operation duration |
Definition at line 490 of file ffmpegkit.c.
| JNIEXPORT void JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_disableNativeRedirection | ( | JNIEnv * | env, |
| jclass | object | ||
| ) |
Disables log and statistics redirection.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
Definition at line 703 of file ffmpegkit.c.
| JNIEXPORT void JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_enableNativeRedirection | ( | JNIEnv * | env, |
| jclass | object | ||
| ) |
Enables log and statistics redirection.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
Definition at line 676 of file ffmpegkit.c.
| JNIEXPORT jstring JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeBuildDate | ( | JNIEnv * | env, |
| jclass | object | ||
| ) |
Returns FFmpegKit library build date natively.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
Definition at line 843 of file ffmpegkit.c.
| JNIEXPORT jstring JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeFFmpegVersion | ( | JNIEnv * | env, |
| jclass | object | ||
| ) |
Returns FFmpeg version bundled within the library natively.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
Definition at line 728 of file ffmpegkit.c.
| JNIEXPORT jint JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeLogLevel | ( | JNIEnv * | env, |
| jclass | object | ||
| ) |
Returns current log level.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
Definition at line 666 of file ffmpegkit.c.
| JNIEXPORT jstring JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_getNativeVersion | ( | JNIEnv * | env, |
| jclass | object | ||
| ) |
Returns FFmpegKit library version natively.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
Definition at line 739 of file ffmpegkit.c.
| JNIEXPORT void JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_ignoreNativeSignal | ( | JNIEnv * | env, |
| jclass | object, | ||
| jint | signum | ||
| ) |
Registers a new ignored signal. Ignored signals are not handled by the library.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
| signum | signal number |
Definition at line 876 of file ffmpegkit.c.
| JNIEXPORT int JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_messagesInTransmit | ( | JNIEnv * | env, |
| jclass | object, | ||
| jlong | id | ||
| ) |
Returns the number of native messages which are not transmitted to the Java callbacks for the given session.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
| id | session id |
Definition at line 898 of file ffmpegkit.c.
| JNIEXPORT void JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_nativeFFmpegCancel | ( | JNIEnv * | env, |
| jclass | object, | ||
| jlong | id | ||
| ) |
Cancels an ongoing FFmpeg operation natively.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
| id | session id |
Definition at line 818 of file ffmpegkit.c.
| JNIEXPORT jint JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_nativeFFmpegExecute | ( | JNIEnv * | env, |
| jclass | object, | ||
| jlong | id, | ||
| jobjectArray | stringArray | ||
| ) |
Synchronously executes FFmpeg natively with arguments provided.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
| id | session id |
| stringArray | reference to the object holding FFmpeg command arguments |
Definition at line 752 of file ffmpegkit.c.
| JNIEXPORT int JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_registerNewNativeFFmpegPipe | ( | JNIEnv * | env, |
| jclass | object, | ||
| jstring | ffmpegPipePath | ||
| ) |
Creates natively a new named pipe to use in FFmpeg operations.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
| ffmpegPipePath | full path of ffmpeg pipe |
Definition at line 830 of file ffmpegkit.c.
| JNIEXPORT int JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_setNativeEnvironmentVariable | ( | JNIEnv * | env, |
| jclass | object, | ||
| jstring | variableName, | ||
| jstring | variableValue | ||
| ) |
Sets an environment variable natively
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
| variableName | environment variable name |
| variableValue | environment variable value |
Definition at line 858 of file ffmpegkit.c.
| JNIEXPORT void JNICALL Java_com_arthenica_ffmpegkit_FFmpegKitConfig_setNativeLogLevel | ( | JNIEnv * | env, |
| jclass | object, | ||
| jint | level | ||
| ) |
Sets log level.
| env | pointer to native method interface |
| object | reference to the class on which this method is invoked |
| level | log level |
Definition at line 656 of file ffmpegkit.c.
| jint JNI_OnLoad | ( | JavaVM * | vm, |
| void * | reserved | ||
| ) |
Called when 'ffmpegkit' native library is loaded.
| vm | pointer to the running virtual machine |
| reserved | reserved |
Definition at line 578 of file ffmpegkit.c.
| void logCallbackDataAdd | ( | int | level, |
| AVBPrint * | data | ||
| ) |
Adds log data to the end of callback data list.
| level | log level |
| data | log data |
Definition at line 272 of file ffmpegkit.c.
| void monitorInit | ( | ) |
Definition at line 205 of file ffmpegkit.c.
| void monitorNotify | ( | ) |
Definition at line 260 of file ffmpegkit.c.
| void monitorUnInit | ( | ) |
Definition at line 225 of file ffmpegkit.c.
| void monitorWait | ( | int | milliSeconds | ) |
Definition at line 238 of file ffmpegkit.c.
| void mutexInit | ( | ) |
Definition at line 196 of file ffmpegkit.c.
| void mutexLock | ( | ) |
Definition at line 230 of file ffmpegkit.c.
| void mutexUnInit | ( | ) |
Definition at line 221 of file ffmpegkit.c.
| void mutexUnlock | ( | ) |
Definition at line 234 of file ffmpegkit.c.
| void removeSession | ( | long | id | ) |
Removes a session id from the session map.
| id | session id |
Definition at line 398 of file ffmpegkit.c.
| void resetMessagesInTransmit | ( | long | id | ) |
Resets the number of messages in transmit for this session.
| id | session id |
Definition at line 430 of file ffmpegkit.c.
| void statisticsCallbackDataAdd | ( | int | frameNumber, |
| float | fps, | ||
| float | quality, | ||
| int64_t | size, | ||
| int | time, | ||
| double | bitrate, | ||
| double | speed | ||
| ) |
Adds statistics data to the end of callback data list.
Definition at line 311 of file ffmpegkit.c.
| struct CallbackData* callbackDataHead |
Definition at line 67 of file ffmpegkit.c.
| struct CallbackData* callbackDataTail |
Definition at line 68 of file ffmpegkit.c.
| pthread_t callbackThread |
Definition at line 64 of file ffmpegkit.c.
|
static |
Global reference of closeParcelFileDescriptor method in Java
Definition at line 83 of file ffmpegkit.c.
|
static |
Global reference of Config class in Java
Definition at line 74 of file ffmpegkit.c.
| const char* configClassName = "com/arthenica/ffmpegkit/FFmpegKitConfig" |
Full name of the Config class
Definition at line 92 of file ffmpegkit.c.
| JNINativeMethod configMethods[] |
Prototypes of native functions defined by Config class.
Definition at line 111 of file ffmpegkit.c.
| int configuredLogLevel = AV_LOG_INFO |
Holds the default log level
Definition at line 108 of file ffmpegkit.c.
|
static |
Global reference to the virtual machine running
Definition at line 71 of file ffmpegkit.c.
| volatile int handleSIGINT = 1 |
Definition at line 99 of file ffmpegkit.c.
| volatile int handleSIGPIPE = 1 |
Definition at line 102 of file ffmpegkit.c.
| volatile int handleSIGQUIT = 1 |
Fields that control the handling of SIGNALs
Definition at line 98 of file ffmpegkit.c.
| volatile int handleSIGTERM = 1 |
Definition at line 100 of file ffmpegkit.c.
| volatile int handleSIGXCPU = 1 |
Definition at line 101 of file ffmpegkit.c.
|
static |
Redirection control variables
Definition at line 60 of file ffmpegkit.c.
|
static |
Global reference of log redirection method in Java
Definition at line 77 of file ffmpegkit.c.
|
static |
Definition at line 62 of file ffmpegkit.c.
|
static |
Definition at line 61 of file ffmpegkit.c.
| int redirectionEnabled |
Definition at line 65 of file ffmpegkit.c.
| const int SESSION_MAP_SIZE = 1000 |
Session control variables
Definition at line 55 of file ffmpegkit.c.
| __thread volatile long sessionId = 0 |
Holds the id of the current session
Definition at line 105 of file ffmpegkit.c.
|
static |
Definition at line 57 of file ffmpegkit.c.
|
static |
Definition at line 56 of file ffmpegkit.c.
|
static |
Global reference of statistics redirection method in Java
Definition at line 80 of file ffmpegkit.c.
|
static |
Global reference of String class in Java
Definition at line 86 of file ffmpegkit.c.
| const char* stringClassName = "java/lang/String" |
Full name of String class
Definition at line 95 of file ffmpegkit.c.
|
static |
Global reference of String constructor in Java
Definition at line 89 of file ffmpegkit.c.