omx_camera_source_component.h File Reference

#include <omx_base_source.h>
#include <omx_base_video_port.h>
#include <linux/videodev2.h>

Go to the source code of this file.

Data Structures

struct  V4L2_COLOR_FORMATTYPE
struct  buffer
struct  OMX_V4L2_MAPBUFFER_QUEUETYPE

Defines

#define NUM_CAMERAPORTS   (OMX_CAMPORT_INDEX_MAX)
#define V4L2DEV_FILENAME   "/dev/video0"
#define omx_camera_source_component_PortType_FIELDS
#define omx_camera_source_component_PrivateType_FIELDS

Typedefs

typedef __u32 V4L2_PICTURE_PIX_FMT
typedef __u32 V4L2_PICTURE_DEPTHTYPE

Enumerations

enum  { OMX_CAMPORT_INDEX_VF = 0, OMX_CAMPORT_INDEX_CP, OMX_CAMPORT_INDEX_CP_T, OMX_CAMPORT_INDEX_MAX }

Functions

OMX_ERRORTYPE omx_camera_source_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
OMX_ERRORTYPE omx_camera_source_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)


Detailed Description

OpenMax camera source component. The OpenMAX camera component is a V4L2-based video source whose functionalities include preview, video capture, image capture, video thumbnail and image thumbnail. It has 3 (output) ports: Port 0 is used for preview; Port 1 is used for video and image capture; Port 2 is used for video and image thumbnail.

Copyright (C) 2007 Motorola

This code is licensed under LGPL see README for full LGPL notice.

Date Author Comment Mon, 09 Jul 2007 Motorola File created Tue, 06 Apr 2008 STM Modified to support Video for Linux Two(V4L2)

This Program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

$Date$ Revision $Rev$ Author $Author$

Definition in file omx_camera_source_component.h.


Define Documentation

#define NUM_CAMERAPORTS   (OMX_CAMPORT_INDEX_MAX)

Definition at line 49 of file omx_camera_source_component.h.

Referenced by main(), and omx_camera_source_component_Constructor().

#define omx_camera_source_component_PortType_FIELDS

Value:

omx_base_video_PortType_FIELDS \ \
  OMX_U32 nIndexMapbufQueue;
Camera source component port structure.

Definition at line 91 of file omx_camera_source_component.h.

#define omx_camera_source_component_PrivateType_FIELDS

Camera source component private structure.

Definition at line 101 of file omx_camera_source_component.h.

#define V4L2DEV_FILENAME   "/dev/video0"

Definition at line 51 of file omx_camera_source_component.h.


Typedef Documentation

typedef __u32 V4L2_PICTURE_DEPTHTYPE

Definition at line 56 of file omx_camera_source_component.h.

typedef __u32 V4L2_PICTURE_PIX_FMT

Definition at line 55 of file omx_camera_source_component.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
OMX_CAMPORT_INDEX_VF 
OMX_CAMPORT_INDEX_CP 
OMX_CAMPORT_INDEX_CP_T 
OMX_CAMPORT_INDEX_MAX 

Definition at line 40 of file omx_camera_source_component.h.


Function Documentation

OMX_ERRORTYPE omx_camera_source_component_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

The Constructor for camera source component

Parameters:
openmaxStandComp is the pointer to the OMX component
cComponentName is the name of the constructed component

Allocate camera component private structure

Init camera private parameters by default values

Allocate Ports.

this is the important thing separating this from the base class; size of the struct is for derived class port type this could be refactored as a smarter factory function instead?

Call base port constructor

Init port parameters by default values

set the function pointers

Definition at line 700 of file omx_camera_source_component.c.

References base_video_port_Constructor(), DEB_LEV_FUNCTION_NAME, DEBUG, DEFAULT_COLOR_FORMAT, DEFAULT_FRAME_HEIGHT, DEFAULT_FRAME_RATE, DEFAULT_FRAME_WIDTH, OMX_COMPONENTTYPE::GetConfig, OMX_COMPONENTTYPE::GetParameter, NUM_CAMERAPORTS, omx_base_source_Constructor(), omx_camera_source_component_Destructor(), OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_FALSE, OMX_COMPONENTTYPE::pComponentPrivate, OMX_COMPONENTTYPE::SetConfig, setHeader(), and OMX_COMPONENTTYPE::SetParameter.

Referenced by omx_component_library_Setup().

OMX_ERRORTYPE omx_camera_source_component_Destructor ( OMX_COMPONENTTYPE openmaxStandComp  ) 

The Destructor for camera source component

Parameters:
openmaxStandComp is the pointer to the OMX component

frees the port structures

Definition at line 808 of file omx_camera_source_component.c.

References base_port_Destructor(), DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_source_Destructor(), OMX_ErrorNone, and OMX_COMPONENTTYPE::pComponentPrivate.

Referenced by omx_camera_source_component_Constructor().


Generated for OpenMAX Bellagio rel. 0.3.5-svn by  doxygen 1.5.1
SourceForge.net Logo