Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I54f19904e325518a3af8fe23c018d3c0bb6bd807
diff --git a/src/android/MediaPlayer_to_android.cpp b/src/android/MediaPlayer_to_android.cpp
index 981a6bd..caa8808 100644
--- a/src/android/MediaPlayer_to_android.cpp
+++ b/src/android/MediaPlayer_to_android.cpp
@@ -750,7 +750,7 @@
             SL_LOGV("Displaying on ANativeWindow of type NATIVE_WINDOW_SURFACE_TEXTURE_CLIENT");
             android::sp<android::SurfaceTextureClient> surfaceTextureClient(
                     static_cast<android::SurfaceTextureClient *>(nativeWindow));
-            android::sp<android::ISurfaceTexture> nativeSurfaceTexture(
+            android::sp<android::IGraphicBufferProducer> nativeSurfaceTexture(
                     surfaceTextureClient->getISurfaceTexture());
             mp->mAVPlayer->setVideoSurfaceTexture(nativeSurfaceTexture);
             result = SL_RESULT_SUCCESS;
diff --git a/src/android/android_GenericMediaPlayer.cpp b/src/android/android_GenericMediaPlayer.cpp
index 629c54e..b0d4798 100644
--- a/src/android/android_GenericMediaPlayer.cpp
+++ b/src/android/android_GenericMediaPlayer.cpp
@@ -296,16 +296,16 @@
 }
 
 //--------------------------------------------------
-void GenericMediaPlayer::setVideoSurfaceTexture(const sp<ISurfaceTexture> &surfaceTexture) {
+void GenericMediaPlayer::setVideoSurfaceTexture(const sp<IGraphicBufferProducer> &bufferProducer) {
     SL_LOGV("GenericMediaPlayer::setVideoSurfaceTexture()");
     // FIXME bug - race condition, should do in looper
-    if (mVideoSurfaceTexture.get() == surfaceTexture.get()) {
+    if (mVideoSurfaceTexture.get() == bufferProducer.get()) {
         return;
     }
     if ((mStateFlags & kFlagPrepared) && (mPlayer != 0)) {
-        mPlayer->setVideoSurfaceTexture(surfaceTexture);
+        mPlayer->setVideoSurfaceTexture(bufferProducer);
     }
-    mVideoSurfaceTexture = surfaceTexture;
+    mVideoSurfaceTexture = bufferProducer;
 }
 
 //--------------------------------------------------
diff --git a/src/android/android_GenericMediaPlayer.h b/src/android/android_GenericMediaPlayer.h
index e4e556b..be129cc 100644
--- a/src/android/android_GenericMediaPlayer.h
+++ b/src/android/android_GenericMediaPlayer.h
@@ -20,7 +20,7 @@
 #include "android_GenericPlayer.h"
 
 #include <binder/IServiceManager.h>
-#include <gui/ISurfaceTexture.h>
+#include <gui/IGraphicBufferProducer.h>
 
 
 //--------------------------------------------------------------------------------------------------
@@ -89,7 +89,7 @@
     // overridden from GenericPlayer
     virtual void getPositionMsec(int* msec); // ANDROID_UNKNOWN_TIME if unknown
 
-    virtual void setVideoSurfaceTexture(const sp<ISurfaceTexture> &surfaceTexture);
+    virtual void setVideoSurfaceTexture(const sp<IGraphicBufferProducer> &bufferProducer);
 
     virtual void setPlaybackRate(int32_t ratePermille);
 
@@ -111,7 +111,7 @@
     const bool mHasVideo;   // const allows MediaPlayerNotificationClient::notify to safely access
     int32_t mSeekTimeMsec;
 
-    sp<ISurfaceTexture> mVideoSurfaceTexture;
+    sp<IGraphicBufferProducer> mVideoSurfaceTexture;
 
     // only safe to access from within Realize and looper
     sp<IMediaPlayer> mPlayer;
diff --git a/src/android/android_GenericPlayer.h b/src/android/android_GenericPlayer.h
index f73eb3e..3aee9e4 100644
--- a/src/android/android_GenericPlayer.h
+++ b/src/android/android_GenericPlayer.h
@@ -78,7 +78,7 @@
     void getDurationMsec(int* msec); //msec != NULL, ANDROID_UNKNOWN_TIME if unknown
     virtual void getPositionMsec(int* msec) = 0; //msec != NULL, ANDROID_UNKNOWN_TIME if unknown
 
-    virtual void setVideoSurfaceTexture(const sp<ISurfaceTexture> &surfaceTexture) {}
+    virtual void setVideoSurfaceTexture(const sp<IGraphicBufferProducer> &bufferProducer) {}
 
     void setVolume(float leftVol, float rightVol);
     void attachAuxEffect(int32_t effectId);
diff --git a/tests/native-media/jni/native-media-jni.c b/tests/native-media/jni/native-media-jni.c
index 6d7ec28..044e51a 100644
--- a/tests/native-media/jni/native-media-jni.c
+++ b/tests/native-media/jni/native-media-jni.c
@@ -366,7 +366,7 @@
     // configure image video sink
     XADataLocator_NativeDisplay loc_nd = {
             XA_DATALOCATOR_NATIVEDISPLAY,        // locatorType
-            // the video sink must be an ANativeWindow created from a Surface or SurfaceTexture
+            // the video sink must be an ANativeWindow created from a Surface or SurfaceTextureClient
             (void*)theNativeWindow,              // hWindow
             // must be NULL
             NULL                                 // hDisplay