Loading camera/libcameraservice/CameraHardwareStub.cpp +9 −0 Original line number Diff line number Diff line /* ** ** Copyright 2008, The Android Open Source Project ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -399,4 +400,12 @@ extern "C" sp<CameraHardwareInterface> openCameraHardware() return CameraHardwareStub::createInstance(); } status_t CameraHardwareStub::getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) { /* No Support for this API in STUB Camera. Just return NULL */ Frame = NULL; if( alignedSize != NULL) *alignedSize = 0; return UNKNOWN_ERROR; } }; // namespace android camera/libcameraservice/CameraHardwareStub.h +3 −0 Original line number Diff line number Diff line /* ** ** Copyright 2008, The Android Open Source Project ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -59,6 +60,8 @@ public: virtual CameraParameters getParameters() const; virtual status_t sendCommand(int32_t command, int32_t arg1, int32_t arg2); virtual status_t getBufferInfo( sp<IMemory>& Frame, size_t *alignedSize); virtual void release(); static sp<CameraHardwareInterface> createInstance(); Loading camera/libcameraservice/CameraService.cpp +14 −1 Original line number Diff line number Diff line /* ** ** Copyright (C) 2008, The Android Open Source Project ** Copyright (C) 2008 HTC Inc. ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -690,6 +692,17 @@ status_t CameraService::Client::startPreviewMode() return ret; } status_t CameraService::Client::getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) { LOGD(" getBufferInfo : E"); if (mHardware == NULL) { LOGE("mHardware is NULL, returning."); Frame = NULL; return INVALID_OPERATION; } return mHardware->getBufferInfo(Frame, alignedSize); } status_t CameraService::Client::startPreview() { LOGV("startPreview (pid %d)", getCallingPid()); Loading camera/libcameraservice/CameraService.h +5 −0 Original line number Diff line number Diff line /* ** ** Copyright (C) 2008, The Android Open Source Project ** Copyright (C) 2008 HTC Inc. ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -84,6 +86,9 @@ private: // preview are handled. virtual void setPreviewCallbackFlag(int callback_flag); // get the recording buffers information from HAL Layer. virtual status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize); // start preview mode, must call setPreviewDisplay first virtual status_t startPreview(); Loading include/camera/Camera.h +5 −0 Original line number Diff line number Diff line /* * Copyright (C) 2008 The Android Open Source Project * Copyright (C) 2008 HTC Inc. * Copyright (C) 2010, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -127,6 +129,9 @@ public: status_t setPreviewDisplay(const sp<Surface>& surface); status_t setPreviewDisplay(const sp<ISurface>& surface); // query the recording buffer information from HAL layer. status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize); // start preview mode, must call setPreviewDisplay first status_t startPreview(); Loading Loading
camera/libcameraservice/CameraHardwareStub.cpp +9 −0 Original line number Diff line number Diff line /* ** ** Copyright 2008, The Android Open Source Project ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -399,4 +400,12 @@ extern "C" sp<CameraHardwareInterface> openCameraHardware() return CameraHardwareStub::createInstance(); } status_t CameraHardwareStub::getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) { /* No Support for this API in STUB Camera. Just return NULL */ Frame = NULL; if( alignedSize != NULL) *alignedSize = 0; return UNKNOWN_ERROR; } }; // namespace android
camera/libcameraservice/CameraHardwareStub.h +3 −0 Original line number Diff line number Diff line /* ** ** Copyright 2008, The Android Open Source Project ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -59,6 +60,8 @@ public: virtual CameraParameters getParameters() const; virtual status_t sendCommand(int32_t command, int32_t arg1, int32_t arg2); virtual status_t getBufferInfo( sp<IMemory>& Frame, size_t *alignedSize); virtual void release(); static sp<CameraHardwareInterface> createInstance(); Loading
camera/libcameraservice/CameraService.cpp +14 −1 Original line number Diff line number Diff line /* ** ** Copyright (C) 2008, The Android Open Source Project ** Copyright (C) 2008 HTC Inc. ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -690,6 +692,17 @@ status_t CameraService::Client::startPreviewMode() return ret; } status_t CameraService::Client::getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) { LOGD(" getBufferInfo : E"); if (mHardware == NULL) { LOGE("mHardware is NULL, returning."); Frame = NULL; return INVALID_OPERATION; } return mHardware->getBufferInfo(Frame, alignedSize); } status_t CameraService::Client::startPreview() { LOGV("startPreview (pid %d)", getCallingPid()); Loading
camera/libcameraservice/CameraService.h +5 −0 Original line number Diff line number Diff line /* ** ** Copyright (C) 2008, The Android Open Source Project ** Copyright (C) 2008 HTC Inc. ** Copyright (C) 2010, Code Aurora Forum. All rights reserved. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. Loading Loading @@ -84,6 +86,9 @@ private: // preview are handled. virtual void setPreviewCallbackFlag(int callback_flag); // get the recording buffers information from HAL Layer. virtual status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize); // start preview mode, must call setPreviewDisplay first virtual status_t startPreview(); Loading
include/camera/Camera.h +5 −0 Original line number Diff line number Diff line /* * Copyright (C) 2008 The Android Open Source Project * Copyright (C) 2008 HTC Inc. * Copyright (C) 2010, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -127,6 +129,9 @@ public: status_t setPreviewDisplay(const sp<Surface>& surface); status_t setPreviewDisplay(const sp<ISurface>& surface); // query the recording buffer information from HAL layer. status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize); // start preview mode, must call setPreviewDisplay first status_t startPreview(); Loading