#include <omxcore.h>
#include <omx_base_video_port.h>
#include <omx_base_audio_port.h>
#include <omx_parser3gp_component.h>
Go to the source code of this file.
Copyright (C) 2008 STMicroelectronics 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 omx_parser3gp_component.c.
#define AUDIO_PORT_INDEX 1 |
Definition at line 42 of file omx_parser3gp_component.c.
Referenced by main(), omx_parser3gp_component_BufferMgmtCallback(), omx_parser3gp_component_Constructor(), omx_parser3gp_component_GetConfig(), omx_parser3gp_component_GetParameter(), omx_parser3gp_component_Init(), parser3gpEventHandler(), parser3gpFillBufferDone(), and SetPortParametersAudio().
#define AUDIO_STREAM 1 |
Definition at line 44 of file omx_parser3gp_component.c.
Referenced by omx_parser3gp_component_BufferMgmtCallback(), omx_parser3gp_component_GetConfig(), omx_parser3gp_component_GetParameter(), and omx_parser3gp_component_Init().
#define DEFAULT_FILENAME_LENGTH 256 |
Definition at line 40 of file omx_parser3gp_component.c.
#define MAX_COMPONENT_PARSER_3GP 1 |
Definition at line 36 of file omx_parser3gp_component.c.
Referenced by omx_parser3gp_component_Constructor().
#define VIDEO_PORT_INDEX 0 |
Definition at line 41 of file omx_parser3gp_component.c.
Referenced by main(), omx_parser3gp_component_BufferMgmtCallback(), omx_parser3gp_component_Constructor(), omx_parser3gp_component_GetConfig(), omx_parser3gp_component_GetParameter(), omx_parser3gp_component_Init(), parser3gpEventHandler(), parser3gpFillBufferDone(), and SetPortParametersVideo().
#define VIDEO_STREAM 0 |
Definition at line 43 of file omx_parser3gp_component.c.
Referenced by omx_parser3gp_component_BufferMgmtCallback(), omx_parser3gp_component_GetConfig(), omx_parser3gp_component_GetParameter(), and omx_parser3gp_component_Init().
void omx_parser3gp_component_BufferMgmtCallback | ( | OMX_COMPONENTTYPE * | openmaxStandComp, | |
OMX_BUFFERHEADERTYPE * | pOutputBuffer | |||
) |
This function processes the input file and returns packet by packet as an output data this packet is used in audio/video decoder component for decoding
copying the packetized data in the output buffer that will be decoded in the decoder component
copying the packetized data from the temp buffer in the output buffer that will be decoded in the decoder component
return the current output buffer
Definition at line 326 of file omx_parser3gp_component.c.
References AUDIO_PORT_INDEX, AUDIO_STREAM, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_BUFFERHEADERTYPE::nAllocLen, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_BUFFERHEADERTYPE::nOffset, OMX_BUFFERHEADERTYPE::nOutputPortIndex, OMX_BUFFERFLAG_EOS, OMX_FALSE, OMX_StateExecuting, OMX_BUFFERHEADERTYPE::pBuffer, OMX_COMPONENTTYPE::pComponentPrivate, tsem_down(), VIDEO_PORT_INDEX, and VIDEO_STREAM.
Referenced by omx_parser3gp_component_Constructor().
OMX_ERRORTYPE omx_parser3gp_component_Constructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp, | |
OMX_STRING | cComponentName | |||
) |
The Constructor
Allocate Ports and call port constructor.
Definition at line 48 of file omx_parser3gp_component.c.
References AUDIO_PORT_INDEX, base_audio_port_Constructor(), base_video_port_Constructor(), DEB_LEV_FUNCTION_NAME, DEBUG, DEFAULT_FILENAME_LENGTH, DEFAULT_IN_BUFFER_SIZE, DEFAULT_OUT_BUFFER_SIZE, err, OMX_COMPONENTTYPE::GetConfig, OMX_COMPONENTTYPE::GetExtensionIndex, OMX_COMPONENTTYPE::GetParameter, MAX_COMPONENT_PARSER_3GP, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, OMX_AUDIO_CodingMP3, omx_base_source_Constructor(), omx_base_source_twoport_BufferMgmtFunction(), OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_FALSE, omx_parser3gp_component_BufferMgmtCallback(), omx_parser3gp_component_Destructor(), omx_parser3gp_component_GetConfig(), omx_parser3gp_component_GetExtensionIndex(), omx_parser3gp_component_GetParameter(), omx_parser3gp_component_MessageHandler(), omx_parser3gp_component_SetConfig(), omx_parser3gp_component_SetParameter(), OMX_VIDEO_CodingAVC, OMX_COMPONENTTYPE::pComponentPrivate, OMX_COMPONENTTYPE::SetConfig, setHeader(), OMX_COMPONENTTYPE::SetParameter, omx_base_audio_PortType::sPortParam, omx_base_video_PortType::sPortParam, tsem_init(), and VIDEO_PORT_INDEX.
Referenced by omx_component_library_Setup().
OMX_ERRORTYPE omx_parser3gp_component_Deinit | ( | OMX_COMPONENTTYPE * | openmaxStandComp | ) |
The DeInitialization function
closing input file
Definition at line 308 of file omx_parser3gp_component.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, OMX_ErrorNone, OMX_FALSE, OMX_COMPONENTTYPE::pComponentPrivate, and tsem_reset().
Referenced by omx_parser3gp_component_MessageHandler().
OMX_ERRORTYPE omx_parser3gp_component_Destructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp | ) |
Definition at line 143 of file omx_parser3gp_component.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_source_Destructor(), OMX_COMPONENTTYPE::pComponentPrivate, and tsem_deinit().
Referenced by omx_parser3gp_component_Constructor().
OMX_ERRORTYPE omx_parser3gp_component_GetConfig | ( | OMX_IN OMX_HANDLETYPE | hComponent, | |
OMX_IN OMX_INDEXTYPE | nIndex, | |||
OMX_IN OMX_PTR | pComponentConfigStructure | |||
) |
getting configurations
Definition at line 640 of file omx_parser3gp_component.c.
References AUDIO_PORT_INDEX, AUDIO_STREAM, OMX_VENDOR_EXTRADATATYPE::nDataSize, OMX_VENDOR_EXTRADATATYPE::nPortIndex, omx_base_component_GetConfig(), OMX_ErrorNone, OMX_IndexVendorAudioExtraData, OMX_IndexVendorVideoExtraData, OMX_COMPONENTTYPE::pComponentPrivate, OMX_VENDOR_EXTRADATATYPE::pData, VIDEO_PORT_INDEX, and VIDEO_STREAM.
Referenced by omx_parser3gp_component_Constructor().
OMX_ERRORTYPE omx_parser3gp_component_GetExtensionIndex | ( | OMX_IN OMX_HANDLETYPE | hComponent, | |
OMX_IN OMX_STRING | cParameterName, | |||
OMX_OUT OMX_INDEXTYPE * | pIndexType | |||
) |
Definition at line 668 of file omx_parser3gp_component.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, OMX_ErrorBadParameter, OMX_ErrorNone, OMX_IndexVendorAudioExtraData, OMX_IndexVendorParser3gpInputFilename, and OMX_IndexVendorVideoExtraData.
Referenced by omx_parser3gp_component_Constructor().
OMX_ERRORTYPE omx_parser3gp_component_GetParameter | ( | OMX_IN OMX_HANDLETYPE | hComponent, | |
OMX_IN OMX_INDEXTYPE | nParamIndex, | |||
OMX_INOUT OMX_PTR | ComponentParameterStructure | |||
) |
Definition at line 484 of file omx_parser3gp_component.c.
References AUDIO_PORT_INDEX, AUDIO_STREAM, checkHeader(), DEB_LEV_SIMPLE_SEQ, DEBUG, err, OMX_VENDOR_EXTRADATATYPE::nDataSize, OMX_VENDOR_EXTRADATATYPE::nPortIndex, OMX_AUDIO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_VIDEO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, omx_base_component_GetParameter(), OMX_BASE_SOURCE_OUTPUTPORT_INDEX, OMX_BASE_SOURCE_OUTPUTPORT_INDEX_1, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_IndexParamAudioInit, OMX_IndexParamAudioPortFormat, OMX_IndexParamVideoInit, OMX_IndexParamVideoPortFormat, OMX_IndexVendorAudioExtraData, OMX_IndexVendorParser3gpInputFilename, OMX_IndexVendorVideoExtraData, OMX_COMPONENTTYPE::pComponentPrivate, OMX_VENDOR_EXTRADATATYPE::pData, omx_base_video_PortType::sVideoParam, VIDEO_PORT_INDEX, and VIDEO_STREAM.
Referenced by omx_parser3gp_component_Constructor().
OMX_ERRORTYPE omx_parser3gp_component_Init | ( | OMX_COMPONENTTYPE * | openmaxStandComp | ) |
The Initialization function
initialization of parser3gp component private data structures
opening the input file whose name is already set via setParameter
initialization for buff mgmt callback function
send callback regarding codec context extradata which will be required to open the codec in the audio and video decoder component
Definition at line 178 of file omx_parser3gp_component.c.
References OMX_PARAM_PORTDEFINITIONTYPE::audio, AUDIO_PORT_INDEX, AUDIO_STREAM, DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_VIDEO_PORTDEFINITIONTYPE::eCompressionFormat, OMX_AUDIO_PARAM_PORTFORMATTYPE::eEncoding, OMX_AUDIO_PORTDEFINITIONTYPE::eEncoding, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_AUDIO_CodingAAC, OMX_AUDIO_CodingMP3, OMX_ErrorBadParameter, OMX_ErrorFormatNotDetected, OMX_ErrorNone, OMX_EventError, OMX_EventPortFormatDetected, OMX_EventPortSettingsChanged, OMX_IndexParamCommonExtraQuantData, OMX_IndexParamVideoPortFormat, OMX_TRUE, OMX_VIDEO_CodingAVC, OMX_VIDEO_CodingMPEG4, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_audio_PortType::sAudioParam, omx_base_audio_PortType::sPortParam, omx_base_video_PortType::sPortParam, tsem_up(), OMX_PARAM_PORTDEFINITIONTYPE::video, VIDEO_PORT_INDEX, and VIDEO_STREAM.
Referenced by omx_parser3gp_component_MessageHandler().
OMX_ERRORTYPE omx_parser3gp_component_MessageHandler | ( | OMX_COMPONENTTYPE * | openmaxStandComp, | |
internalRequestMessageType * | message | |||
) |
This function initializes and deinitializes the library related initialization needed for file parsing
Definition at line 571 of file omx_parser3gp_component.c.
References DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, err, internalRequestMessageType::messageParam, internalRequestMessageType::messageType, omx_base_component_MessageHandler(), OMX_CommandStateSet, OMX_ErrorNone, omx_parser3gp_component_Deinit(), omx_parser3gp_component_Init(), OMX_StateExecuting, OMX_StateIdle, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_parser3gp_component_Constructor().
OMX_ERRORTYPE omx_parser3gp_component_SetConfig | ( | OMX_IN OMX_HANDLETYPE | hComponent, | |
OMX_IN OMX_INDEXTYPE | nIndex, | |||
OMX_IN OMX_PTR | pComponentConfigStructure | |||
) |
setting configurations
Definition at line 601 of file omx_parser3gp_component.c.
References checkHeader(), DEB_LEV_ERR, DEBUG, err, OMX_TIME_CONFIG_TIMESTAMPTYPE::nPortIndex, omx_base_component_SetConfig(), OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_IndexConfigTimePosition, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_parser3gp_component_Constructor().
OMX_ERRORTYPE omx_parser3gp_component_SetParameter | ( | OMX_IN OMX_HANDLETYPE | hComponent, | |
OMX_IN OMX_INDEXTYPE | nParamIndex, | |||
OMX_IN OMX_PTR | ComponentParameterStructure | |||
) |
Definition at line 396 of file omx_parser3gp_component.c.
References DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, DEFAULT_FILENAME_LENGTH, err, OMX_AUDIO_PARAM_MP3TYPE::nPortIndex, OMX_AUDIO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_VIDEO_PARAM_AVCTYPE::nPortIndex, OMX_VIDEO_PARAM_PORTFORMATTYPE::nPortIndex, omx_base_component_ParameterSanityCheck(), omx_base_component_SetParameter(), OMX_BASE_SOURCE_OUTPUTPORT_INDEX, OMX_BASE_SOURCE_OUTPUTPORT_INDEX_1, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_IndexParamAudioMp3, OMX_IndexParamAudioPortFormat, OMX_IndexParamVideoAvc, OMX_IndexParamVideoPortFormat, OMX_IndexVendorParser3gpInputFilename, OMX_COMPONENTTYPE::pComponentPrivate, and omx_base_video_PortType::sVideoParam.
Referenced by omx_parser3gp_component_Constructor().