diff options
author | Igor Murashkin <iam@google.com> | 2013-02-20 17:57:31 -0800 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2013-02-22 10:50:14 -0800 |
commit | 68506fd58d26748617babe94d5648503cb3690bb (patch) | |
tree | 2e5e9336005bcbf29165acb14ba13a35749be4b5 /include/camera | |
parent | 39f79f77a435c2f769477caeb071e2f9f6e78742 (diff) | |
download | frameworks_av-68506fd58d26748617babe94d5648503cb3690bb.zip frameworks_av-68506fd58d26748617babe94d5648503cb3690bb.tar.gz frameworks_av-68506fd58d26748617babe94d5648503cb3690bb.tar.bz2 |
Camera: ProCamera - add createStream stub and unit test for it
Change-Id: Ic05130e63f4f2c0c3278ba348b192992169f105f
Diffstat (limited to 'include/camera')
-rw-r--r-- | include/camera/ProCamera.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/camera/ProCamera.h b/include/camera/ProCamera.h index 2dd01e3..7191b07 100644 --- a/include/camera/ProCamera.h +++ b/include/camera/ProCamera.h @@ -114,8 +114,49 @@ public: * Lock free. Service maintains counter of streams. * Errors: BAD_VALUE if unknown stream ID. */ +// TODO: remove requestStream, its useless. + +// TODO: rename cancelStream to deleteStream +// can probably do it with a grep/sed + + /** + * Ask for a stream to be disabled. + * Lock free. Service maintains counter of streams. + * Errors: BAD_VALUE if unknown stream ID. + */ status_t cancelStream(int streamId); + /** + * Create a new HW stream, whose sink will be the window. + * Lock free. Service maintains counter of streams. + * Errors: -EBUSY if too many streams created + */ + status_t createStream(int width, int height, int format, + const sp<ANativeWindow>& window, + /*out*/ + int* streamId); + + /** + * Create a new HW stream, whose sink will be the SurfaceTexture. + * Lock free. Service maintains counter of streams. + * Errors: -EBUSY if too many streams created + */ + status_t createStream(int width, int height, int format, + const sp<IGraphicBufferProducer>& bufferProducer, + /*out*/ + int* streamId); + + // Create a request object from a template. + status_t createDefaultRequest(int templateId, + /*out*/ + camera_metadata** request) const; + + // Get number of cameras + static int getNumberOfCameras(); + + // Get static camera metadata + static camera_metadata* getCameraInfo(int cameraId); + sp<IProCameraUser> remote(); protected: |