Go to the source code of this file.
◆ Java_com_arthenica_mobileffmpeg_Log_startNativeCollector()
| JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_startNativeCollector |
( |
JNIEnv * |
env, |
|
|
jobject |
object |
|
) |
| |
Starts native log collector. Native log collector creates a pipe and redirects stdout and stderr to it. Then starts a thread, reads data written to this pipe and forwards it to the Java side.
- Parameters
-
| env | pointer to native method interface |
| object | reference to the object on which this method is invoked |
- Returns
- zero on success, non-zero if an error occurs
Definition at line 140 of file log.c.
◆ Java_com_arthenica_mobileffmpeg_Log_stopNativeCollector()
| JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_stopNativeCollector |
( |
JNIEnv * |
env, |
|
|
jobject |
object |
|
) |
| |
Initiates a stop request for native log collector thread. Please note that when this function returns collector thread might be still alive.
- Parameters
-
| env | pointer to native method interface |
| object | reference to the object on which this method is invoked |
- Returns
- zero on success, non-zero if an error occurs
Definition at line 169 of file log.c.
◆ JNI_OnLoad()
| jint JNI_OnLoad |
( |
JavaVM * |
vm, |
|
|
void * |
reserved |
|
) |
| |
Called when 'ffmpeglog' native library is loaded.
- Parameters
-
| vm | pointer to the running virtual machine |
| reserved | reserved |
- Returns
- JNI version needed by 'ffmpeglog' library
Definition at line 56 of file log.c.
◆ logThreadFunction()
| static void* logThreadFunction |
( |
| ) |
|
|
static |
Native log collector main thread function.
Definition at line 91 of file log.c.
◆ globalVm
Global reference to the virtual machine running
Definition at line 23 of file log.c.
◆ logClass
Global reference of Log class in Java side
Definition at line 26 of file log.c.
◆ logClassName
| const char* logClassName = "com/arthenica/mobileffmpeg/Log" |
Full name of the Java class that owns native functions in this file.
Definition at line 41 of file log.c.
◆ logMethod
Global reference of forward log method in Java side
Definition at line 29 of file log.c.
◆ logMethods
| JNINativeMethod logMethods[] |
Initial value:= {
}
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_stopNativeCollector(JNIEnv *env, jobject object)
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_startNativeCollector(JNIEnv *env, jobject object)
Prototypes of native functions defined by this file.
Definition at line 44 of file log.c.
◆ logThread
log collector thread variable
Definition at line 35 of file log.c.
◆ logThreadEnabled
Holds whether log collector thread is enabled or not
Definition at line 38 of file log.c.
◆ pipeFd
file descriptor of the pipe created
Definition at line 32 of file log.c.