diff options
Diffstat (limited to 'modules/camera/Stream.cpp')
-rw-r--r-- | modules/camera/Stream.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/camera/Stream.cpp b/modules/camera/Stream.cpp index 0834aee..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); @@ -83,12 +85,14 @@ int Stream::getType() bool Stream::isInputType() { - return mType & (CAMERA3_STREAM_INPUT | CAMERA3_STREAM_BIDIRECTIONAL); + return mType == CAMERA3_STREAM_INPUT || + mType == CAMERA3_STREAM_BIDIRECTIONAL; } bool Stream::isOutputType() { - return mType & (CAMERA3_STREAM_OUTPUT | CAMERA3_STREAM_BIDIRECTIONAL); + return mType == CAMERA3_STREAM_OUTPUT || + mType == CAMERA3_STREAM_BIDIRECTIONAL; } bool Stream::isRegistered() |