summaryrefslogtreecommitdiffstats
path: root/core/jni/android
diff options
context:
space:
mode:
authortedbo <tedbo@google.com>2011-06-10 13:05:32 -0700
committertedbo <tedbo@google.com>2011-06-13 14:27:39 -0700
commitcc5278a3e258b30903102b718fb1cd832e79bb2b (patch)
tree9d5116e42006858d5ed5bb7fddafe22a2f7cb045 /core/jni/android
parent8aec83eb15a94b8027bbe7b6358cdf2468fd2b5c (diff)
downloadframeworks_base-cc5278a3e258b30903102b718fb1cd832e79bb2b.zip
frameworks_base-cc5278a3e258b30903102b718fb1cd832e79bb2b.tar.gz
frameworks_base-cc5278a3e258b30903102b718fb1cd832e79bb2b.tar.bz2
Support for setting a ParcelSurfaceTexture as the MediaPlayer sink.
This adds support for setting a SurfaceTexture as the MediaPlayer video sink by using a ParcelSurfaceTexture object. The goal is to enable a SurfaceTexture to pass through Binder (via ParcelSurfaceTexture) and then be set on the MediaPlayer. Change-Id: Ife5689ce673eb4bee1c377019db761685217b71d
Diffstat (limited to 'core/jni/android')
-rw-r--r--core/jni/android/graphics/ParcelSurfaceTexture.cpp4
-rw-r--r--core/jni/android/graphics/SurfaceTexture.h31
2 files changed, 2 insertions, 33 deletions
diff --git a/core/jni/android/graphics/ParcelSurfaceTexture.cpp b/core/jni/android/graphics/ParcelSurfaceTexture.cpp
index 517d7e2..40966e1 100644
--- a/core/jni/android/graphics/ParcelSurfaceTexture.cpp
+++ b/core/jni/android/graphics/ParcelSurfaceTexture.cpp
@@ -19,6 +19,7 @@
#include <gui/SurfaceTextureClient.h>
#include <android_runtime/AndroidRuntime.h>
+#include <android_runtime/android_graphics_SurfaceTexture.h>
#include <utils/Log.h>
@@ -27,7 +28,6 @@
#include "android_util_Binder.h"
#include "jni.h"
#include "JNIHelp.h"
-#include "SurfaceTexture.h"
// ----------------------------------------------------------------------------
@@ -59,7 +59,7 @@ static void ParcelSurfaceTexture_setISurfaceTexture(
env->SetIntField(thiz, fields.iSurfaceTexture, (int)iSurfaceTexture.get());
}
-static sp<ISurfaceTexture> ParcelSurfaceTexture_getISurfaceTexture(
+sp<ISurfaceTexture> ParcelSurfaceTexture_getISurfaceTexture(
JNIEnv* env, jobject thiz)
{
sp<ISurfaceTexture> iSurfaceTexture(
diff --git a/core/jni/android/graphics/SurfaceTexture.h b/core/jni/android/graphics/SurfaceTexture.h
deleted file mode 100644
index 79d8dd3..0000000
--- a/core/jni/android/graphics/SurfaceTexture.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _ANDROID_GRAPHICS_SURFACETEXTURE_H
-#define _ANDROID_GRAPHICS_SURFACETEXTURE_H
-
-#include <gui/SurfaceTexture.h>
-#include <utils/StrongPointer.h>
-#include "jni.h"
-
-namespace android {
-
-/* Gets the underlying SurfaceTexture from a SurfaceTexture Java object. */
-sp<SurfaceTexture> SurfaceTexture_getSurfaceTexture(JNIEnv* env, jobject thiz);
-
-} // namespace android
-
-#endif // _ANDROID_GRAPHICS_SURFACETEXTURE_H