summaryrefslogtreecommitdiffstats
path: root/libcamera
diff options
context:
space:
mode:
authorSeungBeom Kim <sbcrux.kim@samsung.com>2011-07-19 10:23:46 +0900
committerJames Dong <jdong@google.com>2011-07-25 17:39:50 -0700
commitdd600c91fc1bc564ae62ef945d67436fe2fb0451 (patch)
treead72255e4bdda4f81c8157d061861dd5c385d6af /libcamera
parent40a09525b7c484764c64daa1ca663a314a1b6d31 (diff)
downloaddevice_samsung_crespo-dd600c91fc1bc564ae62ef945d67436fe2fb0451.zip
device_samsung_crespo-dd600c91fc1bc564ae62ef945d67436fe2fb0451.tar.gz
device_samsung_crespo-dd600c91fc1bc564ae62ef945d67436fe2fb0451.tar.bz2
Change SEC_OMX for Video Editor
1. Support Google ExtensionIndex. 2. Decode Component - Decode component return real YUV output data. - Video decode component support two output port color format. They are OMX_COLOR_FormatYUV420SemiPlanar(NV12) and OMX_COLOR_FormatYUV420Planar. Choose one of them under negotiation. - output port default color format is OMX_COLOR_FormatYUV420SemiPlanar(NV12). - Turn off the gralloc/graphic buffer since gralloc/graphic buffer allocator is unavailable 3. Encode Component - Encode component support real YUV input data. - Video encode component support two input port color format. They are OMX_COLOR_FormatYUV420SemiPlanar(NV12) and OMX_COLOR_FormatYUV420Planar. Choose one of them under negotiation. - input port default color format is OMX_COLOR_FormatYUV420SemiPlanar(NV12). - gralloc buffer is not support yet. (store meta data mode use physical address.) 4. Camera hal - Support metadata buffer mode TODO: 1. enable grallco/graphic buffer once the allocator is available 2. add support for gralloc-based metadata buffer support in video encoder component Change-Id: Ic8ba4f0230d6de77ffde7ddf1e2c9a3a5aeb806f Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
Diffstat (limited to 'libcamera')
-rw-r--r--libcamera/SecCameraHWInterface.cpp17
-rw-r--r--libcamera/SecCameraHWInterface.h1
2 files changed, 17 insertions, 1 deletions
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp
index d0ea6a3..2ca714b 100644
--- a/libcamera/SecCameraHWInterface.cpp
+++ b/libcamera/SecCameraHWInterface.cpp
@@ -25,6 +25,7 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <camera/Camera.h>
+#include <media/stagefright/MetadataBufferType.h>
#define VIDEO_COMMENT_MARKER_H 0xFFBE
#define VIDEO_COMMENT_MARKER_L 0xFFBF
@@ -58,6 +59,7 @@
namespace android {
struct addrs {
+ uint32_t type; // make sure that this is 4 byte.
unsigned int addr_y;
unsigned int addr_cbcr;
unsigned int buf_index;
@@ -699,6 +701,7 @@ callbacks:
addrs = (struct addrs *)mRecordHeap->data;
+ addrs[index].type = kMetadataBufferTypeCameraSource;
addrs[index].addr_y = phyYAddr;
addrs[index].addr_cbcr = phyCAddr;
addrs[index].buf_index = index;
@@ -2340,6 +2343,18 @@ void CameraHardwareSec::release()
mSecCamera->DeinitCamera();
}
+status_t CameraHardwareSec::storeMetaDataInBuffers(bool enable)
+{
+ // FIXME:
+ // metadata buffer mode can be turned on or off.
+ // Samsung needs to fix this.
+ if (!enable) {
+ LOGE("Non-metadata buffer mode is not supported!");
+ return INVALID_OPERATION;
+ }
+ return OK;
+}
+
static CameraInfo sCameraInfo[] = {
{
CAMERA_FACING_BACK,
@@ -2495,7 +2510,7 @@ static int HAL_camera_device_preview_enabled(struct camera_device *dev)
static int HAL_camera_device_store_meta_data_in_buffers(struct camera_device *dev, int enable)
{
LOGV("%s", __func__);
- return INVALID_OPERATION;// obj(dev)->storeMetaDataInBuffers(enable);
+ return obj(dev)->storeMetaDataInBuffers(enable);
}
/**
diff --git a/libcamera/SecCameraHWInterface.h b/libcamera/SecCameraHWInterface.h
index a081090..3254b7b 100644
--- a/libcamera/SecCameraHWInterface.h
+++ b/libcamera/SecCameraHWInterface.h
@@ -59,6 +59,7 @@ public:
virtual CameraParameters getParameters() const;
virtual status_t sendCommand(int32_t command, int32_t arg1, int32_t arg2);
virtual status_t setPreviewWindow(preview_stream_ops *w);
+ virtual status_t storeMetaDataInBuffers(bool enable);
virtual void release();
inline int getCameraId() const;