Loading cmds/stagefright/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ frameworks/base/media/libstagefright \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include Loading @@ -32,6 +33,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ frameworks/base/media/libstagefright \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include Loading include/media/IOMX.h +11 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ #include <OMX_Core.h> #include <OMX_Video.h> #include "jni.h" namespace android { class IMemory; Loading Loading @@ -102,15 +104,22 @@ public: size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight) = 0; // Note: This method is _not_ virtual, it exists as a wrapper around // Note: These methods are _not_ virtual, it exists as a wrapper around // the virtual "createRenderer" method above facilitating extraction // of the ISurface from a regular Surface. // of the ISurface from a regular Surface or a java Surface object. sp<IOMXRenderer> createRenderer( const sp<Surface> &surface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight); sp<IOMXRenderer> createRendererFromJavaSurface( JNIEnv *env, jobject javaSurface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight); }; struct omx_message { Loading media/libmedia/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ LOCAL_SHARED_LIBRARIES += libdl endif LOCAL_C_INCLUDES := \ $(JNI_H_INCLUDE) \ $(call include-path-for, graphics corecg) \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include Loading media/libmedia/IOMX.cpp +25 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,31 @@ sp<IOMXRenderer> IOMX::createRenderer( displayWidth, displayHeight); } sp<IOMXRenderer> IOMX::createRendererFromJavaSurface( JNIEnv *env, jobject javaSurface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight) { jclass surfaceClass = env->FindClass("android/view/Surface"); if (surfaceClass == NULL) { LOGE("Can't find android/view/Surface"); return NULL; } jfieldID surfaceID = env->GetFieldID(surfaceClass, "mSurface", "I"); if (surfaceID == NULL) { LOGE("Can't find Surface.mSurface"); return NULL; } sp<Surface> surface = (Surface *)env->GetIntField(javaSurface, surfaceID); return createRenderer( surface, componentName, colorFormat, encodedWidth, encodedHeight, displayWidth, displayHeight); } class BpOMX : public BpInterface<IOMX> { public: BpOMX(const sp<IBinder> &impl) Loading media/libmediaplayerservice/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ LOCAL_SHARED_LIBRARIES += libdl endif LOCAL_C_INCLUDES := external/tremor/Tremor \ $(JNI_H_INCLUDE) \ $(call include-path-for, graphics corecg) \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \ $(TOP)/frameworks/base/media/libstagefright/omx Loading Loading
cmds/stagefright/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ frameworks/base/media/libstagefright \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include Loading @@ -32,6 +33,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ frameworks/base/media/libstagefright \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include Loading
include/media/IOMX.h +11 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ #include <OMX_Core.h> #include <OMX_Video.h> #include "jni.h" namespace android { class IMemory; Loading Loading @@ -102,15 +104,22 @@ public: size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight) = 0; // Note: This method is _not_ virtual, it exists as a wrapper around // Note: These methods are _not_ virtual, it exists as a wrapper around // the virtual "createRenderer" method above facilitating extraction // of the ISurface from a regular Surface. // of the ISurface from a regular Surface or a java Surface object. sp<IOMXRenderer> createRenderer( const sp<Surface> &surface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight); sp<IOMXRenderer> createRendererFromJavaSurface( JNIEnv *env, jobject javaSurface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight); }; struct omx_message { Loading
media/libmedia/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ LOCAL_SHARED_LIBRARIES += libdl endif LOCAL_C_INCLUDES := \ $(JNI_H_INCLUDE) \ $(call include-path-for, graphics corecg) \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include Loading
media/libmedia/IOMX.cpp +25 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,31 @@ sp<IOMXRenderer> IOMX::createRenderer( displayWidth, displayHeight); } sp<IOMXRenderer> IOMX::createRendererFromJavaSurface( JNIEnv *env, jobject javaSurface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight) { jclass surfaceClass = env->FindClass("android/view/Surface"); if (surfaceClass == NULL) { LOGE("Can't find android/view/Surface"); return NULL; } jfieldID surfaceID = env->GetFieldID(surfaceClass, "mSurface", "I"); if (surfaceID == NULL) { LOGE("Can't find Surface.mSurface"); return NULL; } sp<Surface> surface = (Surface *)env->GetIntField(javaSurface, surfaceID); return createRenderer( surface, componentName, colorFormat, encodedWidth, encodedHeight, displayWidth, displayHeight); } class BpOMX : public BpInterface<IOMX> { public: BpOMX(const sp<IBinder> &impl) Loading
media/libmediaplayerservice/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ LOCAL_SHARED_LIBRARIES += libdl endif LOCAL_C_INCLUDES := external/tremor/Tremor \ $(JNI_H_INCLUDE) \ $(call include-path-for, graphics corecg) \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \ $(TOP)/frameworks/base/media/libstagefright/omx Loading