summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-05-13 12:07:32 -0700
committerJames Dong <jdong@google.com>2010-05-13 12:08:29 -0700
commite292b3bc9c28e47bb8411728ad40efb84d0471e8 (patch)
treecb51804b07a1e1744a6ecf7a8313f05406303348 /media/libstagefright
parentfae47fd008974fb78f38ae4a6d539cd8246d3159 (diff)
downloadframeworks_base-e292b3bc9c28e47bb8411728ad40efb84d0471e8.zip
frameworks_base-e292b3bc9c28e47bb8411728ad40efb84d0471e8.tar.gz
frameworks_base-e292b3bc9c28e47bb8411728ad40efb84d0471e8.tar.bz2
Remove dummy surface in CameraSource
bug - 2680919 Change-Id: Ia0308cf57fd67058b4dd0e042b3ce97f13df475f
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/CameraSource.cpp45
1 files changed, 1 insertions, 44 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 3a1e3bc..cd26e6b 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -27,42 +27,10 @@
#include <media/stagefright/MetaData.h>
#include <camera/Camera.h>
#include <camera/CameraParameters.h>
-#include <ui/GraphicBuffer.h>
-#include <ui/Overlay.h>
-#include <surfaceflinger/ISurface.h>
#include <utils/String8.h>
namespace android {
-struct DummySurface : public BnSurface {
- DummySurface() {}
-
- virtual sp<GraphicBuffer> requestBuffer(int bufferIdx, int usage) {
- return NULL;
- }
- virtual status_t setBufferCount(int bufferCount) {
- return INVALID_OPERATION;
- }
-
- virtual status_t registerBuffers(const BufferHeap &buffers) {
- return OK;
- }
-
- virtual void postBuffer(ssize_t offset) {}
- virtual void unregisterBuffers() {}
-
- virtual sp<OverlayRef> createOverlay(
- uint32_t w, uint32_t h, int32_t format, int32_t orientation) {
- return NULL;
- }
-
-protected:
- virtual ~DummySurface() {}
-
- DummySurface(const DummySurface &);
- DummySurface &operator=(const DummySurface &);
-};
-
struct CameraSourceListener : public CameraListener {
CameraSourceListener(const sp<CameraSource> &source);
@@ -150,23 +118,12 @@ CameraSource::~CameraSource() {
}
}
-void CameraSource::setPreviewSurface(const sp<ISurface> &surface) {
- mPreviewSurface = surface;
-}
-
status_t CameraSource::start(MetaData *) {
LOGV("start");
CHECK(!mStarted);
mCamera->setListener(new CameraSourceListener(this));
-
- status_t err =
- mCamera->setPreviewDisplay(
- mPreviewSurface != NULL ? mPreviewSurface : new DummySurface);
- CHECK_EQ(err, OK);
-
- err = mCamera->startRecording();
- CHECK_EQ(err, OK);
+ CHECK_EQ(OK, mCamera->startRecording());
mStarted = true;