diff options
author | Alex Ray <aray@google.com> | 2013-07-02 16:56:14 -0700 |
---|---|---|
committer | Alexander Ray <aray@google.com> | 2013-07-03 18:00:21 +0000 |
commit | 768216ee2c90ecbbc73121b528e60c82ff668eb5 (patch) | |
tree | 775f2a0d88a21b704a1fbd28133dbad389eeaf82 /modules/camera | |
parent | 0d2a5220ba789bae7f180f8fecbc35379bcc3059 (diff) | |
download | hardware_libhardware-768216ee2c90ecbbc73121b528e60c82ff668eb5.zip hardware_libhardware-768216ee2c90ecbbc73121b528e60c82ff668eb5.tar.gz hardware_libhardware-768216ee2c90ecbbc73121b528e60c82ff668eb5.tar.bz2 |
modules: camera: Fix stream type characterization
Type is now enum, not mask.
Change-Id: I264da26a457957a7659154e507970e0303c76e25
Diffstat (limited to 'modules/camera')
-rw-r--r-- | modules/camera/Camera.cpp | 2 | ||||
-rw-r--r-- | modules/camera/Stream.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/camera/Camera.cpp b/modules/camera/Camera.cpp index 0a0b493..42e5cdb 100644 --- a/modules/camera/Camera.cpp +++ b/modules/camera/Camera.cpp @@ -411,6 +411,8 @@ bool Camera::isValidStreamSet(Stream **streams, int count) if (streams[i]->isOutputType()) outputs++; } + ALOGV("%s:%d: Configuring %d output streams and %d input streams", + __func__, mId, outputs, inputs); if (outputs < 1) { ALOGE("%s:%d: Stream config must have >= 1 output", __func__, mId); return false; diff --git a/modules/camera/Stream.cpp b/modules/camera/Stream.cpp index 0834aee..31eefcd 100644 --- a/modules/camera/Stream.cpp +++ b/modules/camera/Stream.cpp @@ -83,12 +83,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() |