Skip to content

ffmpeg: libjnivideo on gingerbread #2

@alexcohn

Description

@alexcohn

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); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions