Hi,
I tried to run the ffpmeg app on Galaxy S with v. 2.3.3. Issue #2 was with libjnivideo - due to change of name of the native surface field in android/view/Surface class.
Follows my patch for surface.cpp, function getNativeSurface():
static Surface\* getNativeSurface(JNIEnv\* env, jobject jsurface) {
jclass clazz = env->FindClass("android/view/Surface");
jfieldID field_surface = env->GetFieldID(clazz, "mSurface", "I");
if(field_surface == NULL) {
#ifdef ANDROID_VIEW_SURFACE_JNI_ID // using gingerbread version of <surfaceflinger/Surface.h>
env->ExceptionClear();
field_surface = env->GetFieldID(clazz, ANDROID_VIEW_SURFACE_JNI_ID, "I");
#endif
}
if(field_surface == NULL) {
return NULL;
}
return (Surface *) env->GetIntField(jsurface, field_surface);
}
Hi,
I tried to run the ffpmeg app on Galaxy S with v. 2.3.3. Issue #2 was with libjnivideo - due to change of name of the native surface field in android/view/Surface class.
Follows my patch for surface.cpp, function getNativeSurface():
static Surface\* getNativeSurface(JNIEnv\* env, jobject jsurface) { jclass clazz = env->FindClass("android/view/Surface"); jfieldID field_surface = env->GetFieldID(clazz, "mSurface", "I"); if(field_surface == NULL) { #ifdef ANDROID_VIEW_SURFACE_JNI_ID // using gingerbread version of <surfaceflinger/Surface.h> env->ExceptionClear(); field_surface = env->GetFieldID(clazz, ANDROID_VIEW_SURFACE_JNI_ID, "I"); #endif } if(field_surface == NULL) { return NULL; } return (Surface *) env->GetIntField(jsurface, field_surface); }