summaryrefslogtreecommitdiffstats
path: root/modules/camera/Stream.cpp
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2013-05-29 15:08:29 -0700
committerAlexander Ray <aray@google.com>2013-07-03 18:01:54 +0000
commit2b286dab84b2a0524c1deed67fea92200e598c6e (patch)
treed3169b83ff0f02a88976d6b55062b987e23b3a18 /modules/camera/Stream.cpp
parent768216ee2c90ecbbc73121b528e60c82ff668eb5 (diff)
downloadhardware_libhardware-2b286dab84b2a0524c1deed67fea92200e598c6e.zip
hardware_libhardware-2b286dab84b2a0524c1deed67fea92200e598c6e.tar.gz
hardware_libhardware-2b286dab84b2a0524c1deed67fea92200e598c6e.tar.bz2
modules: camera: Write back stream parameters
max_buffers and usage are read by the framework inside the struct used to pass the stream configuration parameters; scribble our new calculated values whever they are updated internally. Adds logging to stream creation method (reuse/new). Change-Id: I04e12880820571900f2ae80c27100f8aedcf9d02
Diffstat (limited to 'modules/camera/Stream.cpp')
-rw-r--r--modules/camera/Stream.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/camera/Stream.cpp b/modules/camera/Stream.cpp
index 31eefcd..aae7adb 100644
--- a/modules/camera/Stream.cpp
+++ b/modules/camera/Stream.cpp
@@ -61,6 +61,7 @@ void Stream::setUsage(uint32_t usage)
pthread_mutex_lock(&mMutex);
if (usage != mUsage) {
mUsage = usage;
+ mStream->usage = usage;
unregisterBuffers_L();
}
pthread_mutex_unlock(&mMutex);
@@ -71,6 +72,7 @@ void Stream::setMaxBuffers(uint32_t max_buffers)
pthread_mutex_lock(&mMutex);
if (max_buffers != mMaxBuffers) {
mMaxBuffers = max_buffers;
+ mStream->max_buffers = max_buffers;
unregisterBuffers_L();
}
pthread_mutex_unlock(&mMutex);