MediaPlayer2: use ANativeWindow to replace Surface and IGraphicBufferProducer

Test: MediaPlayer2 plays video files
Bug: 63934228
Change-Id: Id655aa19125cfc5554dbf36c223d0a27318ebb24
diff --git a/media/libmedia/nuplayer2/NuPlayer2Driver.cpp b/media/libmedia/nuplayer2/NuPlayer2Driver.cpp
index dd0da8a..c4e42e7 100644
--- a/media/libmedia/nuplayer2/NuPlayer2Driver.cpp
+++ b/media/libmedia/nuplayer2/NuPlayer2Driver.cpp
@@ -219,8 +219,7 @@
     return mAsyncResult;
 }
 
-status_t NuPlayer2Driver::setVideoSurfaceTexture(
-        const sp<IGraphicBufferProducer> &bufferProducer) {
+status_t NuPlayer2Driver::setVideoSurfaceTexture(const sp<ANativeWindowWrapper> &nww) {
     ALOGV("setVideoSurfaceTexture(%p)", this);
     Mutex::Autolock autoLock(mLock);
 
@@ -239,7 +238,7 @@
 
     mSetSurfaceInProgress = true;
 
-    mPlayer->setVideoSurfaceTextureAsync(bufferProducer);
+    mPlayer->setVideoSurfaceTextureAsync(nww);
 
     while (mSetSurfaceInProgress) {
         mCondition.wait(mLock);