#include <OMX_Core.h>
#include <OMX_Types.h>
#include <omx_comp_debug_levels.h>
#include <pthread.h>
#include <sys/stat.h>
#include "tsemaphore.h"
Go to the source code of this file.
Data Structures | |
struct | appPrivateType |
Defines | |
#define | BUFFER_SIZE (16*1024) |
Functions | |
OMX_ERRORTYPE | symbianoutputstreamEventHandler (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 | symbianoutputstreamEmptyBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer) |
OMX_ERRORTYPE | symbianoutputstreamFillBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer) |
#define BUFFER_SIZE (16*1024) |
OMX_ERRORTYPE symbianoutputstreamEmptyBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
The EmptyBufferDone method is used to return emptied buffers from an input port back to the application for reuse. This is a blocking call so the application should not attempt to refill the buffers during this call, but should queue them and refill them in another thread. There is no error return, so the application shall handle any errors generated internally.
The application should return from this call within 5 msec.
hComponent | handle of the component to access. This is the component handle returned by the call to the GetHandle function. | |
pAppData | pointer to an application defined value that was provided in the pAppData parameter to the OMX_GetHandle method for the component. This application defined value is provided so that the application can have a component specific context when receiving the callback. | |
pBuffer | pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer or AllocateBuffer indicating the buffer that was emptied. |
Definition at line 237 of file omxsymbianoutputstreamtest.c.
References appPrivateType::condition, DEB_LEV_FULL_SEQ, DEBUG, appPrivateType::mutex, and OMX_ErrorNone.
Referenced by main().
OMX_ERRORTYPE symbianoutputstreamEventHandler | ( | 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 | |||
) |
The EventHandler method is used to notify the application when an event of interest occurs. Events are defined in the OMX_EVENTTYPE enumeration. Please see that enumeration for details of what will be returned for each type of event. Callbacks should not return an error to the component, so if an error occurs, the application shall handle it internally. This is a blocking call.
The application should return from this call within 5 msec to avoid blocking the component for an excessively long period of time.
hComponent | handle of the component to access. This is the component handle returned by the call to the GetHandle function. | |
pAppData | pointer to an application defined value that was provided in the pAppData parameter to the OMX_GetHandle method for the component. This application defined value is provided so that the application can have a component specific context when receiving the callback. | |
eEvent | Event that the component wants to notify the application about. | |
nData1 | nData will be the OMX_ERRORTYPE for an error event and will be an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event. | |
nData2 | nData2 will hold further information related to the event. Can be OMX_STATETYPE for a OMX_StateChange command or port index for a OMX_PortSettingsCHanged event. Default value is 0 if not used. ) | |
pEventData | Pointer to additional event-specific data (see spec for meaning). |
Definition at line 222 of file omxsymbianoutputstreamtest.c.
References DEB_LEV_SIMPLE_SEQ, DEBUG, appPrivateType::eventSem, OMX_ErrorNone, and tsem_up().
Referenced by main().
OMX_ERRORTYPE symbianoutputstreamFillBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
The FillBufferDone method is used to return filled buffers from an output port back to the application for emptying and then reuse. This is a blocking call so the application should not attempt to empty the buffers during this call, but should queue the buffers and empty them in another thread. There is no error return, so the application shall handle any errors generated internally. The application shall also update the buffer header to indicate the number of bytes placed into the buffer.
The application should return from this call within 5 msec.
hComponent | handle of the component to access. This is the component handle returned by the call to the GetHandle function. | |
pAppData | pointer to an application defined value that was provided in the pAppData parameter to the OMX_GetHandle method for the component. This application defined value is provided so that the application can have a component specific context when receiving the callback. | |
pBuffer | pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer or AllocateBuffer indicating the buffer that was filled. |
Definition at line 250 of file omxsymbianoutputstreamtest.c.
References DEB_LEV_FULL_SEQ, DEBUG, and OMX_ErrorNotImplemented.