rockcarry / fanplayer

A portable video player based on ffmpeg for windows and android platform.
GNU Lesser General Public License v3.0
606 stars 161 forks source link

Store Locally function not working such as int player_snapshot(void *hplayer, char *file, int w, int h, int waitt) ,int player_record(void *hplayer, char *file) #43

Open pvnsaravana2 opened 3 years ago

pvnsaravana2 commented 3 years ago

Thanks for the Library ...!!!!!

int player_snapshot(void hplayer, char file, int w, int h, int waitt) ,int player_record(void hplayer, char file)

written code in ffplayer_jni.cpp

static void JNICALL nativeSnapshot(JNIEnv env, jobject obj, jlong hplayer) { __android_log_print(ANDROID_LOG_ERROR, "player_jni", "ERROR0: EnterNativeSnapshot\n"); DO_USE_VAR(env); DO_USE_VAR(obj); char filenamedata = (char) "Demo"; player_snapshot((void)hplayer,filenamedata,1440 ,2960 ,0); __android_log_print(ANDROID_LOG_ERROR, "player_jni", "ERROR0: ExitNativeSnapshot\n"); }

static void JNICALL nativeRecord(JNIEnv env, jobject obj, jlong hplayer) { __android_log_print(ANDROID_LOG_ERROR, "player_jni", "ERROR0: EnterNativeRecord\n"); DO_USE_VAR(env); DO_USE_VAR(obj); char filenamedata = (char) "Demo"; player_record((void)hplayer,filenamedata); __android_log_print(ANDROID_LOG_ERROR, "player_jni", "ERROR0: ExitNativeRecord\n"); }

There is no crash observed , but unable to find the snapshot image and record video locally ..Not sure whether file has been created or not ..? Please let me know the file path about local storage ....After calling those methods which location files will be store ?

Tested with Android player apk code - Android App as test environment ... . so file has been updated as per new function calls...

@rockcarry Please do the needful to fix this issues ,Thanks for the Library ...!!!!!

HelloTodayWolrd commented 2 years ago

try to use texureview to get the snapshot image