diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-07-24 18:10:23 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2014-07-28 20:21:42 +0000 |
commit | 7d70c5e5fe787ae5d7af8830864d208749d6337f (patch) | |
tree | 523c38f77b9e87de652862c812695e79c3cd62a3 /services/camera/libcameraservice/device2 | |
parent | f67e23ef637d0b53a0d4bebb68c654234df3da94 (diff) | |
download | frameworks_av-7d70c5e5fe787ae5d7af8830864d208749d6337f.zip frameworks_av-7d70c5e5fe787ae5d7af8830864d208749d6337f.tar.gz frameworks_av-7d70c5e5fe787ae5d7af8830864d208749d6337f.tar.bz2 |
CameraService: Replace deprecated native_window methods
Change-Id: I3be5a720ac8b488d1e507c606a9146480faeef63
Diffstat (limited to 'services/camera/libcameraservice/device2')
-rw-r--r-- | services/camera/libcameraservice/device2/Camera2Device.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/services/camera/libcameraservice/device2/Camera2Device.cpp b/services/camera/libcameraservice/device2/Camera2Device.cpp index c1f77fa..8c2520e 100644 --- a/services/camera/libcameraservice/device2/Camera2Device.cpp +++ b/services/camera/libcameraservice/device2/Camera2Device.cpp @@ -1088,25 +1088,33 @@ status_t Camera2Device::StreamAdapter::connectToDevice( } if (mFormat == HAL_PIXEL_FORMAT_BLOB) { - res = native_window_set_buffers_geometry(mConsumerInterface.get(), - mSize, 1, mFormat); + res = native_window_set_buffers_dimensions(mConsumerInterface.get(), + mSize, 1); if (res != OK) { - ALOGE("%s: Unable to configure compressed stream buffer geometry" + ALOGE("%s: Unable to configure compressed stream buffer dimensions" " %d x %d, size %zu for stream %d", __FUNCTION__, mWidth, mHeight, mSize, mId); return res; } } else { - res = native_window_set_buffers_geometry(mConsumerInterface.get(), - mWidth, mHeight, mFormat); + res = native_window_set_buffers_dimensions(mConsumerInterface.get(), + mWidth, mHeight); if (res != OK) { - ALOGE("%s: Unable to configure stream buffer geometry" - " %d x %d, format 0x%x for stream %d", - __FUNCTION__, mWidth, mHeight, mFormat, mId); + ALOGE("%s: Unable to configure stream buffer dimensions" + " %d x %d for stream %d", + __FUNCTION__, mWidth, mHeight, mId); return res; } } + res = native_window_set_buffers_format(mConsumerInterface.get(), mFormat); + if (res != OK) { + ALOGE("%s: Unable to configure stream buffer format" + " %#x for stream %d", + __FUNCTION__, mFormat, mId); + return res; + } + int maxConsumerBuffers; res = mConsumerInterface->query(mConsumerInterface.get(), NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &maxConsumerBuffers); |