diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/jni/android_media_MediaCodec.cpp | 12 | ||||
-rw-r--r-- | media/jni/android_media_MediaCodec.h | 4 | ||||
-rw-r--r-- | media/jni/android_media_MediaPlayer.cpp | 16 | ||||
-rw-r--r-- | media/mca/filterfw/jni/jni_gl_environment.cpp | 8 | ||||
-rw-r--r-- | media/mca/filterfw/jni/jni_gl_environment.h | 2 | ||||
-rw-r--r-- | media/mca/filterfw/native/core/gl_env.cpp | 6 | ||||
-rw-r--r-- | media/mca/filterfw/native/core/gl_env.h | 6 | ||||
-rw-r--r-- | media/tests/players/invoke_mock_media_player.cpp | 4 |
8 files changed, 29 insertions, 29 deletions
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp index dab2de1..8740c08 100644 --- a/media/jni/android_media_MediaCodec.cpp +++ b/media/jni/android_media_MediaCodec.cpp @@ -111,12 +111,12 @@ JMediaCodec::~JMediaCodec() { status_t JMediaCodec::configure( const sp<AMessage> &format, - const sp<ISurfaceTexture> &surfaceTexture, + const sp<IGraphicBufferProducer> &bufferProducer, const sp<ICrypto> &crypto, int flags) { sp<SurfaceTextureClient> client; - if (surfaceTexture != NULL) { - mSurfaceTextureClient = new SurfaceTextureClient(surfaceTexture); + if (bufferProducer != NULL) { + mSurfaceTextureClient = new SurfaceTextureClient(bufferProducer); } else { mSurfaceTextureClient.clear(); } @@ -382,11 +382,11 @@ static void android_media_MediaCodec_native_configure( return; } - sp<ISurfaceTexture> surfaceTexture; + sp<IGraphicBufferProducer> bufferProducer; if (jsurface != NULL) { sp<Surface> surface(android_view_Surface_getSurface(env, jsurface)); if (surface != NULL) { - surfaceTexture = surface->getSurfaceTexture(); + bufferProducer = surface->getSurfaceTexture(); } else { jniThrowException( env, @@ -401,7 +401,7 @@ static void android_media_MediaCodec_native_configure( crypto = JCrypto::GetCrypto(env, jcrypto); } - err = codec->configure(format, surfaceTexture, crypto, flags); + err = codec->configure(format, bufferProducer, crypto, flags); throwExceptionAsNecessary(env, err); } diff --git a/media/jni/android_media_MediaCodec.h b/media/jni/android_media_MediaCodec.h index bc9ad50..a9bb9af 100644 --- a/media/jni/android_media_MediaCodec.h +++ b/media/jni/android_media_MediaCodec.h @@ -30,7 +30,7 @@ struct ALooper; struct AMessage; struct AString; struct ICrypto; -struct ISurfaceTexture; +struct IGraphicBufferProducer; struct MediaCodec; struct SurfaceTextureClient; @@ -43,7 +43,7 @@ struct JMediaCodec : public RefBase { status_t configure( const sp<AMessage> &format, - const sp<ISurfaceTexture> &surfaceTexture, + const sp<IGraphicBufferProducer> &bufferProducer, const sp<ICrypto> &crypto, int flags); diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp index ad536f2..5408a1f 100644 --- a/media/jni/android_media_MediaPlayer.cpp +++ b/media/jni/android_media_MediaPlayer.cpp @@ -39,7 +39,7 @@ #include "android_os_Parcel.h" #include "android_util_Binder.h" #include <binder/Parcel.h> -#include <gui/ISurfaceTexture.h> +#include <gui/IGraphicBufferProducer.h> #include <gui/Surface.h> #include <binder/IPCThreadState.h> #include <binder/IServiceManager.h> @@ -236,10 +236,10 @@ android_media_MediaPlayer_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fil process_media_player_call( env, thiz, mp->setDataSource(fd, offset, length), "java/io/IOException", "setDataSourceFD failed." ); } -static sp<ISurfaceTexture> +static sp<IGraphicBufferProducer> getVideoSurfaceTexture(JNIEnv* env, jobject thiz) { - ISurfaceTexture * const p = (ISurfaceTexture*)env->GetIntField(thiz, fields.surface_texture); - return sp<ISurfaceTexture>(p); + IGraphicBufferProducer * const p = (IGraphicBufferProducer*)env->GetIntField(thiz, fields.surface_texture); + return sp<IGraphicBufferProducer>(p); } static void @@ -250,7 +250,7 @@ decVideoSurfaceRef(JNIEnv *env, jobject thiz) return; } - sp<ISurfaceTexture> old_st = getVideoSurfaceTexture(env, thiz); + sp<IGraphicBufferProducer> old_st = getVideoSurfaceTexture(env, thiz); if (old_st != NULL) { old_st->decStrong(thiz); } @@ -269,7 +269,7 @@ setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface, jboolean mediaPlaye decVideoSurfaceRef(env, thiz); - sp<ISurfaceTexture> new_st; + sp<IGraphicBufferProducer> new_st; if (jsurface) { sp<Surface> surface(android_view_Surface_getSurface(env, jsurface)); if (surface != NULL) { @@ -313,7 +313,7 @@ android_media_MediaPlayer_prepare(JNIEnv *env, jobject thiz) // Handle the case where the display surface was set before the mp was // initialized. We try again to make it stick. - sp<ISurfaceTexture> st = getVideoSurfaceTexture(env, thiz); + sp<IGraphicBufferProducer> st = getVideoSurfaceTexture(env, thiz); mp->setVideoSurfaceTexture(st); process_media_player_call( env, thiz, mp->prepare(), "java/io/IOException", "Prepare failed." ); @@ -330,7 +330,7 @@ android_media_MediaPlayer_prepareAsync(JNIEnv *env, jobject thiz) // Handle the case where the display surface was set before the mp was // initialized. We try again to make it stick. - sp<ISurfaceTexture> st = getVideoSurfaceTexture(env, thiz); + sp<IGraphicBufferProducer> st = getVideoSurfaceTexture(env, thiz); mp->setVideoSurfaceTexture(st); process_media_player_call( env, thiz, mp->prepareAsync(), "java/io/IOException", "Prepare Async failed." ); diff --git a/media/mca/filterfw/jni/jni_gl_environment.cpp b/media/mca/filterfw/jni/jni_gl_environment.cpp index 3c596a4..b64004e 100644 --- a/media/mca/filterfw/jni/jni_gl_environment.cpp +++ b/media/mca/filterfw/jni/jni_gl_environment.cpp @@ -23,7 +23,7 @@ #include <media/mediarecorder.h> #include "native/core/gl_env.h" -#include <gui/ISurfaceTexture.h> +#include <gui/IGraphicBufferProducer.h> #include <gui/SurfaceTextureClient.h> #include <utils/Errors.h> #include <system/window.h> @@ -33,7 +33,7 @@ using android::filterfw::GLEnv; using android::filterfw::WindowHandle; using android::MediaRecorder; using android::sp; -using android::ISurfaceTexture; +using android::IGraphicBufferProducer; using android::SurfaceTextureClient; @@ -284,10 +284,10 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceFromMediaRecorder( // Ask the mediarecorder to return a handle to a surfacemediasource // This will talk to the StageFrightRecorder via MediaRecorderClient // over binder calls - sp<ISurfaceTexture> surfaceMS = mr->querySurfaceMediaSourceFromMediaServer(); + sp<IGraphicBufferProducer> surfaceMS = mr->querySurfaceMediaSourceFromMediaServer(); if (surfaceMS == NULL) { ALOGE("GLEnvironment: Error- MediaRecorder returned a null \ - <ISurfaceTexture> handle."); + <IGraphicBufferProducer> handle."); return -1; } sp<SurfaceTextureClient> surfaceTC = new SurfaceTextureClient(surfaceMS); diff --git a/media/mca/filterfw/jni/jni_gl_environment.h b/media/mca/filterfw/jni/jni_gl_environment.h index af9c744..9dd7102 100644 --- a/media/mca/filterfw/jni/jni_gl_environment.h +++ b/media/mca/filterfw/jni/jni_gl_environment.h @@ -68,7 +68,7 @@ Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceWidthHeight(JNIEnv* env // The call to hook up the SurfaceMediaSource (in MediaServer) to the GL. // We get a sp<ISurfaceTexure> from the MediaServer and talks to MediaServer // over a binder interface. GL hooked up to the MediaServer by using the native -// window created using the <ISurfaceTexture> handle +// window created using the <IGraphicBufferProducer> handle JNIEXPORT jint JNICALL Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceFromMediaRecorder( JNIEnv* env, diff --git a/media/mca/filterfw/native/core/gl_env.cpp b/media/mca/filterfw/native/core/gl_env.cpp index 738b8e0..8ed82e2 100644 --- a/media/mca/filterfw/native/core/gl_env.cpp +++ b/media/mca/filterfw/native/core/gl_env.cpp @@ -159,9 +159,9 @@ bool GLEnv::InitWithNewContext() { return false; } - // Create dummy surface using a SurfaceTexture - surfaceTexture_ = new SurfaceTexture(0); - window_ = new SurfaceTextureClient(static_cast<sp<ISurfaceTexture> >( + // Create dummy surface using a GLConsumer + surfaceTexture_ = new GLConsumer(0); + window_ = new SurfaceTextureClient(static_cast<sp<IGraphicBufferProducer> >( surfaceTexture_->getBufferQueue())); surfaces_[0] = SurfaceWindowPair(eglCreateWindowSurface(display(), config, window_.get(), NULL), NULL); diff --git a/media/mca/filterfw/native/core/gl_env.h b/media/mca/filterfw/native/core/gl_env.h index b61785f..3c87195 100644 --- a/media/mca/filterfw/native/core/gl_env.h +++ b/media/mca/filterfw/native/core/gl_env.h @@ -27,7 +27,7 @@ #include <GLES2/gl2.h> #include <EGL/egl.h> -#include <gui/ISurfaceTexture.h> +#include <gui/IGraphicBufferProducer.h> #include <gui/SurfaceTextureClient.h> namespace android { @@ -236,8 +236,8 @@ class GLEnv { // Dummy surface for context sp<ANativeWindow> window_; - // Dummy SurfaceTexture for context - sp<SurfaceTexture> surfaceTexture_; + // Dummy GLConsumer for context + sp<GLConsumer> surfaceTexture_; // The maximum surface id used. int max_surface_id_; diff --git a/media/tests/players/invoke_mock_media_player.cpp b/media/tests/players/invoke_mock_media_player.cpp index 1289dfa..a94fedb 100644 --- a/media/tests/players/invoke_mock_media_player.cpp +++ b/media/tests/players/invoke_mock_media_player.cpp @@ -26,7 +26,7 @@ using android::INVALID_OPERATION; using android::Surface; -using android::ISurfaceTexture; +using android::IGraphicBufferProducer; using android::MediaPlayerBase; using android::OK; using android::Parcel; @@ -69,7 +69,7 @@ class Player: public MediaPlayerBase virtual status_t setDataSource(int fd, int64_t offset, int64_t length) {return OK;} virtual status_t setVideoSurfaceTexture( - const sp<ISurfaceTexture>& surfaceTexture) {return OK;} + const sp<IGraphicBufferProducer>& bufferProducer) {return OK;} virtual status_t prepare() {return OK;} virtual status_t prepareAsync() {return OK;} virtual status_t start() {return OK;} |