omxvideoenctest.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <pthread.h>
#include <ctype.h>
#include <OMX_Core.h>
#include <OMX_Component.h>
#include <OMX_Types.h>
#include <OMX_Video.h>
#include <tsemaphore.h>
#include <user_debug_levels.h>

Go to the source code of this file.

Data Structures

struct  appPrivateType

Defines

#define BUFFER_IN_SIZE   176*144*3/2
#define VERSIONMAJOR   1
#define VERSIONMINOR   1
#define VERSIONREVISION   0
#define VERSIONSTEP   0

Functions

OMX_ERRORTYPE videosrcEventHandler (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 videosrcFillBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE videoencEventHandler (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 videoencEmptyBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE videoencFillBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
void display_help ()
int setPortParameters ()


Detailed Description

Test application that uses a OpenMAX component, a generic video encoder. The application receives an video stream (.yuv) and encodes it in MPEG-4 Video format (.m4v).

Copyright (C) 2008 STMicroelectronics and Nokia Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library 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.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

$Date$ Revision $Rev$ Author $Author$

Definition in file omxvideoenctest.h.


Define Documentation

#define BUFFER_IN_SIZE   176*144*3/2

Definition at line 54 of file omxvideoenctest.h.

#define VERSIONMAJOR   1

Specification version

Definition at line 57 of file omxvideoenctest.h.

#define VERSIONMINOR   1

Definition at line 58 of file omxvideoenctest.h.

#define VERSIONREVISION   0

Definition at line 59 of file omxvideoenctest.h.

#define VERSIONSTEP   0

Definition at line 60 of file omxvideoenctest.h.


Function Documentation

void display_help (  ) 

help display

Definition at line 89 of file omxaudiocapnplay.c.

int setPortParameters (  ) 

this function sets the video source and encoder port characteristics

setting the color converter and sink component chararacteristics, if selected - both in tunneled as well as non tunneled case

setting the color conv input port width, height it will be same as the video decoder output port width, height

setting the color converter output width height it will be same as input dimensions

setting the input color format of color converter component it will be same as output yuv color format of the decoder component

setting output RGB color format of the color converter component

if video sink component is selected then set its input port settings accroding to the output port settings of the color converter component

Definition at line 102 of file omxvideocapnplay.c.

References appPriv, COLOR_CONV_OUT_RGB_FORMAT, appPrivateType::colorconv_handle, DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, DEFAULT_MESSAGES, OMX_VIDEO_PARAM_PORTFORMATTYPE::eColorFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, err, appPrivateType::fbdev_sink_handle, flagIsCameraRequested, flagIsColorConvRequested, flagIsSinkRequested, OMX_PARAM_PORTDEFINITIONTYPE::format, frame_rate, in_height, in_width, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_VIDEO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_COLOR_FormatYUV420Planar, omx_colorconvPortDefinition, OMX_ErrorBadParameter, OMX_ErrorNone, OMX_GetParameter, OMX_IndexParamPortDefinition, OMX_IndexParamVideoPortFormat, OMX_SetParameter, omxVideoParam, out_height, out_width, paramPort, setHeader(), OMX_PARAM_PORTDEFINITIONTYPE::video, appPrivateType::videoenchandle, appPrivateType::videosrchandle, and OMX_VIDEO_PORTDEFINITIONTYPE::xFramerate.

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

Definition at line 829 of file omxvideoenctest.c.

References appPriv, buffer_in_size, DEB_LEV_FULL_SEQ, DEB_LEV_PARAMS, DEB_LEV_SIMPLE_SEQ, DEBUG, DEFAULT_MESSAGES, appPrivateType::eofSem, err, flagIsCameraRequested, infile, OMX_BUFFERFLAG_EOS, OMX_EmptyThisBuffer, OMX_ErrorNone, OMX_FillThisBuffer, OMX_BUFFERHEADERTYPE::pBuffer, pSrcOutBuffer, tsem_up(), and appPrivateType::videosrchandle.

OMX_ERRORTYPE videoencEventHandler ( 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 the video encoder component

Definition at line 774 of file omxvideoenctest.c.

References appPriv, DEB_LEV_SIMPLE_SEQ, DEBUG, DEFAULT_MESSAGES, appPrivateType::encoderEventSem, appPrivateType::eofSem, err, OMX_BUFFERFLAG_EOS, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_ErrorNone, OMX_EventBufferFlag, OMX_EventCmdComplete, OMX_EventPortSettingsChanged, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, and tsem_up().

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

Definition at line 862 of file omxvideoenctest.c.

References DEB_LEV_ERR, DEBUG, DEFAULT_MESSAGES, err, OMX_BUFFERFLAG_EOS, OMX_ErrorNone, OMX_FillThisBuffer, OMX_TRUE, and outfile.

OMX_ERRORTYPE videosrcEventHandler ( 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 the video source component

Definition at line 1065 of file omxvideocapnplay.c.

References appPriv, DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, appPrivateType::eofSem, err, OMX_BUFFERFLAG_EOS, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_ErrorNone, OMX_EventBufferFlag, OMX_EventCmdComplete, OMX_EventPortSettingsChanged, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, appPrivateType::sourceEventSem, and tsem_up().

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

Definition at line 1119 of file omxvideocapnplay.c.

References appPriv, appPrivateType::colorconv_handle, DEB_LEV_ERR, DEBUG, DEFAULT_MESSAGES, err, flagIsColorConvRequested, flagSetupTunnel, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERFLAG_EOS, OMX_EmptyThisBuffer, OMX_ErrorNone, OMX_FillThisBuffer, OMX_GetState, OMX_StateExecuting, OMX_StatePause, OMX_TRUE, outfile, OMX_BUFFERHEADERTYPE::pBuffer, pInBuffer, pInBufferColorConv1, pInBufferColorConv2, and appPrivateType::videoenchandle.


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