omxcameratest.h File Reference

#include <pthread.h>
#include "tsemaphore.h"
#include <user_debug_levels.h>

Go to the source code of this file.

Data Structures

struct  appPrivateType
struct  OMX_PORTBUFFERCTXT

Defines

#define VERSIONMAJOR   1
#define VERSIONMINOR   1
#define VERSIONREVISION   0
#define VERSIONSTEP   0
#define DEFAULT_FRAME_RATE   15
#define DEFAULT_FRAME_WIDTH   320
#define DEFAULT_FRAME_HEIGHT   240
#define DEFAULT_CAMERA_COLOR_FORMAT   OMX_COLOR_FormatYUV420PackedPlanar
#define DEFAULT_FBSINK_COLOR_FORMAT   OMX_COLOR_Format24bitRGB888
#define DEFAULT_CAPTURE_COLOR_FORMAT   DEFAULT_CAMERA_COLOR_FORMAT
#define MAXBUFNUM_PERPORT   16
#define NUM_CAMERAPORTS   (OMX_CAMPORT_INDEX_MAX)

Enumerations

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

Functions

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)
OMX_ERRORTYPE camera_sourceFillBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
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)
OMX_ERRORTYPE colorconvEmptyBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE colorconvFillBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
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)
OMX_ERRORTYPE fbsinkEmptyBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
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.
OMX_ERRORTYPE setCameraParameters (OMX_BOOL bCameraStillImageMode)
OMX_ERRORTYPE setColorConvParameters ()
OMX_ERRORTYPE setFbsinkParameters ()


Detailed Description

Test application that uses two OpenMAX components, a camera and a fbsink. The preview port of the camera is tunneled with the fbsink component; The output video/image data of the capture port and thumbnail port of the camera are saved in disk files, respectively.

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 Documentation

#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.


Enumeration Type Documentation

anonymous enum

Port Index for Camera Component

Enumerator:
OMX_CAMPORT_INDEX_VF 
OMX_CAMPORT_INDEX_CP 
OMX_CAMPORT_INDEX_CP_T 
OMX_CAMPORT_INDEX_MAX 

Definition at line 58 of file omxcameratest.h.


Function Documentation

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 
)

OMX_ERRORTYPE camera_sourceFillBufferDone ( OMX_OUT OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_PTR  pAppData,
OMX_OUT OMX_BUFFERHEADERTYPE pBuffer 
)

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 
)

OMX_ERRORTYPE setCameraParameters ( OMX_BOOL  bCameraStillImageMode  ) 

OMX_ERRORTYPE setColorConvParameters (  ) 

OMX_ERRORTYPE setFbsinkParameters (  ) 

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

Parameters:
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().


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