From: Mathias Agopian Date: Sat, 30 Jul 2011 00:55:48 +0000 (-0700) Subject: connect/disconnect is now called from our EGL wrapper X-Git-Tag: android-x86-4.4-r1~1579^2~613^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c3da3434cb57f47284ea06bb9065eaa2fe033efb;p=android-x86%2Fframeworks-av.git connect/disconnect is now called from our EGL wrapper the original connect/disconnect hooks are deprecated and replace by api_connect/api_disconnect. the original hooks are no no-ops. api_connect/api_disconnect is now only called from the android framework. Bug: 5057915 Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a --- diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index a11fb804f1..3dd9249d4e 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -201,11 +201,11 @@ status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *m void MediaPlayer::disconnectNativeWindow() { if (mConnectedWindow != NULL) { - status_t err = native_window_disconnect(mConnectedWindow.get(), + status_t err = native_window_api_disconnect(mConnectedWindow.get(), NATIVE_WINDOW_API_MEDIA); if (err != OK) { - LOGW("native_window_disconnect returned an error: %s (%d)", + LOGW("native_window_api_disconnect returned an error: %s (%d)", strerror(-err), err); } } @@ -224,7 +224,7 @@ status_t MediaPlayer::setVideoSurface(const sp& surface) } if (surface != NULL) { - status_t err = native_window_connect(surface.get(), + status_t err = native_window_api_connect(surface.get(), NATIVE_WINDOW_API_MEDIA); if (err != OK) { @@ -274,7 +274,7 @@ status_t MediaPlayer::setVideoSurfaceTexture( sp anw; if (surfaceTexture != NULL) { anw = new SurfaceTextureClient(surfaceTexture); - status_t err = native_window_connect(anw.get(), + status_t err = native_window_api_connect(anw.get(), NATIVE_WINDOW_API_MEDIA); if (err != OK) { diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index b03649e351..def25d1888 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -460,10 +460,10 @@ status_t CameraService::Client::connect(const sp& client) { static void disconnectWindow(const sp& window) { if (window != 0) { - status_t result = native_window_disconnect(window.get(), + status_t result = native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_CAMERA); if (result != NO_ERROR) { - LOGW("native_window_disconnect failed: %s (%d)", strerror(-result), + LOGW("native_window_api_disconnect failed: %s (%d)", strerror(-result), result); } } @@ -526,9 +526,9 @@ status_t CameraService::Client::setPreviewWindow(const sp& binder, } if (window != 0) { - result = native_window_connect(window.get(), NATIVE_WINDOW_API_CAMERA); + result = native_window_api_connect(window.get(), NATIVE_WINDOW_API_CAMERA); if (result != NO_ERROR) { - LOGE("native_window_connect failed: %s (%d)", strerror(-result), + LOGE("native_window_api_connect failed: %s (%d)", strerror(-result), result); return result; }