#include <pthread.h>
#include "tsemaphore.h"
#include <user_debug_levels.h>
Go to the source code of this file.
Copyright (C) 2007 Motorola
This code is licensed under LGPL see README for full LGPL notice.
Date Author Comment Fri, 06 Jul 2007 Motorola File created Tue, 06 Apr 2008 STM Update: Adding support for the color converter
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 omxcameratest.h.
#define DEFAULT_CAMERA_COLOR_FORMAT OMX_COLOR_FormatYUV420PackedPlanar |
Definition at line 51 of file omxcameratest.h.
Referenced by setCameraParameters(), and setColorConvParameters().
#define DEFAULT_CAPTURE_COLOR_FORMAT DEFAULT_CAMERA_COLOR_FORMAT |
Definition at line 53 of file omxcameratest.h.
#define DEFAULT_FBSINK_COLOR_FORMAT OMX_COLOR_Format24bitRGB888 |
Definition at line 52 of file omxcameratest.h.
Referenced by setColorConvParameters(), and setFbsinkParameters().
#define DEFAULT_FRAME_HEIGHT 240 |
Definition at line 49 of file omxcameratest.h.
#define DEFAULT_FRAME_RATE 15 |
Default settings
Definition at line 46 of file omxcameratest.h.
#define DEFAULT_FRAME_WIDTH 320 |
Definition at line 48 of file omxcameratest.h.
#define MAXBUFNUM_PERPORT 16 |
Definition at line 55 of file omxcameratest.h.
#define NUM_CAMERAPORTS (OMX_CAMPORT_INDEX_MAX) |
Definition at line 66 of file omxcameratest.h.
#define VERSIONMAJOR 1 |
Specification version
Definition at line 39 of file omxcameratest.h.
#define VERSIONMINOR 1 |
Definition at line 40 of file omxcameratest.h.
#define VERSIONREVISION 0 |
Definition at line 41 of file omxcameratest.h.
#define VERSIONSTEP 0 |
Definition at line 42 of file omxcameratest.h.
anonymous enum |
Port Index for Camera Component
Definition at line 58 of file omxcameratest.h.
OMX_ERRORTYPE camera_sourceEventHandler | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_EVENTTYPE | eEvent, | |||
OMX_OUT OMX_U32 | Data1, | |||
OMX_OUT OMX_U32 | Data2, | |||
OMX_OUT OMX_PTR | pEventData | |||
) |
Callback prototypes for camera component
callbacks implementation of camera component
Definition at line 81 of file omxcameratest.c.
References appPrivateType::cameraSourceEventSem, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_CommandStateSet, OMX_ErrorNone, OMX_EventCmdComplete, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, and tsem_up().
OMX_ERRORTYPE camera_sourceFillBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 125 of file omxcameratest.c.
References appPrivateType::camerahandle, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEBUG, fCapture, fThumbnail, OMX_BUFFERFLAG_STARTTIME, OMX_CAMPORT_INDEX_CP, OMX_CAMPORT_INDEX_CP_T, OMX_ErrorNone, and OMX_FillThisBuffer.
OMX_ERRORTYPE colorconvEmptyBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 210 of file omxcameratest.c.
OMX_ERRORTYPE colorconvEventHandler | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_EVENTTYPE | eEvent, | |||
OMX_OUT OMX_U32 | Data1, | |||
OMX_OUT OMX_U32 | Data2, | |||
OMX_OUT OMX_PTR | pEventData | |||
) |
callbacks implementation of color converter component
Definition at line 166 of file omxcameratest.c.
OMX_ERRORTYPE colorconvFillBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
if there is no sink component then write buffer content in output file, in non tunneled case else in non tunneled case, call the sink comp handle to process this buffer as its input buffer
Definition at line 224 of file omxcameratest.c.
OMX_ERRORTYPE fbsinkEmptyBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 283 of file omxcameratest.c.
References DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, and OMX_ErrorNone.
OMX_ERRORTYPE fbsinkEventHandler | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_EVENTTYPE | eEvent, | |||
OMX_OUT OMX_U32 | Data1, | |||
OMX_OUT OMX_U32 | Data2, | |||
OMX_OUT OMX_PTR | pEventData | |||
) |
Callback prototypes for fbsink component
callbacks implementation of fbsink component
Definition at line 239 of file omxcameratest.c.
References DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, appPrivateType::fbsinkEventSem, OMX_CommandStateSet, OMX_ErrorNone, OMX_EventCmdComplete, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, and tsem_up().
OMX_ERRORTYPE setCameraParameters | ( | OMX_BOOL | bCameraStillImageMode | ) |
Set parameters for camera/fbsink components
Definition at line 311 of file omxcameratest.c.
References OMX_PARAM_SENSORMODETYPE::bOneShot, appPrivateType::camerahandle, DEFAULT_CAMERA_COLOR_FORMAT, DEFAULT_FRAME_HEIGHT, DEFAULT_FRAME_RATE, DEFAULT_FRAME_WIDTH, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eCompressionFormat, err, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_PARAM_SENSORMODETYPE::nFrameRate, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_FRAMESIZETYPE::nHeight, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_FRAMESIZETYPE::nPortIndex, OMX_PARAM_SENSORMODETYPE::nPortIndex, OMX_VIDEO_PORTDEFINITIONTYPE::nSliceHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nStride, OMX_FRAMESIZETYPE::nWidth, OMX_CAMPORT_INDEX_CP, OMX_CAMPORT_INDEX_CP_T, OMX_CAMPORT_INDEX_VF, OMX_ErrorNone, OMX_GetParameter, OMX_IndexParamCommonSensorMode, OMX_IndexParamPortDefinition, OMX_SetParameter, OMX_VIDEO_CodingUnused, setHeader(), OMX_PARAM_SENSORMODETYPE::sFrameSize, and OMX_PARAM_PORTDEFINITIONTYPE::video.
Referenced by main().
OMX_ERRORTYPE setColorConvParameters | ( | ) |
Definition at line 396 of file omxcameratest.c.
References appPrivateType::colorconvhandle, DEB_LEV_ERR, DEBUG, DEFAULT_CAMERA_COLOR_FORMAT, DEFAULT_FBSINK_COLOR_FORMAT, DEFAULT_FRAME_HEIGHT, DEFAULT_FRAME_WIDTH, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE::eColorFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eCompressionFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE::eCompressionFormat, err, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_VIDEO_PARAM_PORTFORMATTYPE::nIndex, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_VIDEO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_VIDEO_PORTDEFINITIONTYPE::nSliceHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nStride, OMX_ErrorNone, OMX_GetParameter, OMX_IndexParamPortDefinition, OMX_IndexParamVideoPortFormat, OMX_SetParameter, OMX_VIDEO_CodingUnused, setHeader(), OMX_PARAM_PORTDEFINITIONTYPE::video, and OMX_VIDEO_PARAM_PORTFORMATTYPE::xFramerate.
Referenced by main().
OMX_ERRORTYPE setFbsinkParameters | ( | ) |
Definition at line 485 of file omxcameratest.c.
References DEB_LEV_ERR, DEBUG, DEFAULT_FBSINK_COLOR_FORMAT, DEFAULT_FRAME_HEIGHT, DEFAULT_FRAME_WIDTH, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE::eColorFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eCompressionFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE::eCompressionFormat, err, appPrivateType::fbsinkhandle, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_CONFIG_RECTTYPE::nHeight, OMX_VIDEO_PARAM_PORTFORMATTYPE::nIndex, OMX_CONFIG_RECTTYPE::nLeft, OMX_CONFIG_POINTTYPE::nPortIndex, OMX_CONFIG_RECTTYPE::nPortIndex, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_VIDEO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_VIDEO_PORTDEFINITIONTYPE::nSliceHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nStride, OMX_CONFIG_RECTTYPE::nTop, OMX_CONFIG_RECTTYPE::nWidth, OMX_CONFIG_POINTTYPE::nX, OMX_CONFIG_POINTTYPE::nY, OMX_ErrorNone, OMX_GetConfig, OMX_GetParameter, OMX_IndexConfigCommonInputCrop, OMX_IndexConfigCommonOutputPosition, OMX_IndexParamPortDefinition, OMX_IndexParamVideoPortFormat, OMX_SetConfig, OMX_SetParameter, OMX_VIDEO_CodingUnused, setHeader(), OMX_PARAM_PORTDEFINITIONTYPE::video, and OMX_VIDEO_PARAM_PORTFORMATTYPE::xFramerate.
Referenced by main().
OMX_ERRORTYPE setHeader | ( | OMX_PTR | header, | |
OMX_U32 | size | |||
) |
Simply fills the first two fields in any OMX structure with the size and the version.
Initialize header fields (size and version) of OMX structure
header | pointer to the structure to be filled | |
size | size of the structure. It can be obtained with a call to sizeof of the structure type |
Definition at line 541 of file omx_base_component.c.
References OMX_VERSIONTYPE::nRevision, OMX_VERSIONTYPE::nStep, OMX_VERSIONTYPE::nVersionMajor, OMX_VERSIONTYPE::nVersionMinor, OMX_ErrorNone, OMX_VERSIONTYPE::s, SPECREVISION, SPECSTEP, SPECVERSIONMAJOR, SPECVERSIONMINOR, VERSIONMAJOR, VERSIONMINOR, VERSIONREVISION, and VERSIONSTEP.
Referenced by audiodecEventHandler(), base_audio_port_Constructor(), base_port_AllocateBuffer(), base_port_ComponentTunnelRequest(), base_port_Constructor(), base_port_UseBuffer(), base_video_port_Constructor(), main(), omx_alsasink_component_Constructor(), omx_alsasrc_component_Constructor(), omx_audio_mixer_component_Constructor(), omx_audiodec_component_Constructor(), omx_audiodec_component_SetInternalParameters(), omx_base_component_Constructor(), omx_camera_source_component_Constructor(), omx_fbdev_sink_component_Constructor(), omx_fbdev_sink_component_GetConfig(), omx_ffmpeg_colorconv_component_Constructor(), omx_filereader_component_Constructor(), omx_maddec_component_Constructor(), omx_maddec_component_SetInternalParameters(), omx_parser3gp_component_Constructor(), omx_symbianoutputstreamsink_component_Constructor(), omx_symbianoutputstreamsink_component_GetParameter(), omx_volume_component_GetConfig(), omx_vorbisdec_component_Constructor(), omx_vorbisdec_component_SetInternalParameters(), setCameraParameters(), setColorConvParameters(), setFbsinkParameters(), SetInternalVideoEncParameters(), SetInternalVideoParameters(), setPortParameters(), SetPortParametersAudio(), SetPortParametersVideo(), videodecEventHandler(), and videosrc_port_AllocateBuffer().