OpenMAX Bellagio 0.9.3
omx_base_video_port.c
Go to the documentation of this file.
1
26#include <string.h>
27#include <unistd.h>
28#include <omxcore.h>
29#include <OMX_Core.h>
30#include <OMX_Component.h>
31#include "omx_base_video_port.h"
32
50
51 omx_base_video_PortType *omx_base_video_Port;
52
53 if (!(*openmaxStandPort)) {
54 *openmaxStandPort = calloc(1,sizeof (omx_base_video_PortType));
55 }
56
57 if (!(*openmaxStandPort)) {
59 }
60
61 base_port_Constructor(openmaxStandComp,openmaxStandPort,nPortIndex, isInput);
62
63 omx_base_video_Port = (omx_base_video_PortType *)*openmaxStandPort;
64
65 setHeader(&omx_base_video_Port->sVideoParam, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE));
66 omx_base_video_Port->sVideoParam.nPortIndex = nPortIndex;
67 omx_base_video_Port->sVideoParam.nIndex = 0;
69 omx_base_video_Port->sVideoParam.eColorFormat = OMX_COLOR_FormatUnused;
70 omx_base_video_Port->sVideoParam.xFramerate = 15;
71
72 omx_base_video_Port->sPortParam.eDomain = OMX_PortDomainVideo;
73 omx_base_video_Port->sPortParam.format.video.cMIMEType = malloc(DEFAULT_MIME_STRING_LENGTH);
74 strcpy(omx_base_video_Port->sPortParam.format.video.cMIMEType, "raw/video");
75 omx_base_video_Port->sPortParam.format.video.pNativeRender = 0;
78
79 omx_base_video_Port->sPortParam.format.video.nFrameWidth = 0;
80 omx_base_video_Port->sPortParam.format.video.nFrameHeight= 0;
81 omx_base_video_Port->sPortParam.format.video.nStride = 0;
82 omx_base_video_Port->sPortParam.format.video.nSliceHeight = 0;
83 omx_base_video_Port->sPortParam.format.video.nBitrate = 0;
84 omx_base_video_Port->sPortParam.format.video.xFramerate = 15;
86 omx_base_video_Port->sPortParam.format.video.pNativeWindow = NULL;
87
88
90
91 omx_base_video_Port->PortDestructor = &base_video_port_Destructor;
92
93 return OMX_ErrorNone;
94}
95
109
110 if(openmaxStandPort->sPortParam.format.video.cMIMEType) {
111 free(openmaxStandPort->sPortParam.format.video.cMIMEType);
112 openmaxStandPort->sPortParam.format.video.cMIMEType = NULL;
113 }
114
115 base_port_Destructor(openmaxStandPort);
116
117 return OMX_ErrorNone;
118}
OMX_ERRORTYPE
Definition OMX_Core.h:127
@ OMX_ErrorInsufficientResources
Definition OMX_Core.h:131
@ OMX_ErrorNone
Definition OMX_Core.h:128
unsigned long OMX_U32
Definition OMX_Types.h:145
OMX_BOOL
Definition OMX_Types.h:189
@ OMX_TRUE
Definition OMX_Types.h:191
@ OMX_FALSE
Definition OMX_Types.h:190
@ OMX_PortDomainVideo
@ OMX_COLOR_FormatUnused
@ OMX_VIDEO_CodingUnused
Definition OMX_Video.h:62
void setHeader(OMX_PTR header, OMX_U32 size)
Simply fills the first two fields in any OMX structure with the size and the version.
#define DEFAULT_IN_BUFFER_SIZE
#define OSCL_EXPORT_REF
#define DEFAULT_MIME_STRING_LENGTH
OMX_ERRORTYPE base_port_Constructor(OMX_COMPONENTTYPE *openmaxStandComp, omx_base_PortType **openmaxStandPort, OMX_U32 nPortIndex, OMX_BOOL isInput)
The base contructor for the generic OpenMAX ST port.
OMX_ERRORTYPE base_port_Destructor(omx_base_PortType *openmaxStandPort)
The base destructor for the generic OpenMAX ST port.
OMX_ERRORTYPE base_video_port_Constructor(OMX_COMPONENTTYPE *openmaxStandComp, omx_base_PortType **openmaxStandPort, OMX_U32 nPortIndex, OMX_BOOL isInput)
The base contructor for the generic OpenMAX ST Video port.
OMX_ERRORTYPE base_video_port_Destructor(omx_base_PortType *openmaxStandPort)
The base video port destructor for the generic OpenMAX ST Video port.
#define MAX_VIDEO_OUTPUT_BUF_SIZE
union OMX_PARAM_PORTDEFINITIONTYPE::@0 format
OMX_PORTDOMAINTYPE eDomain
OMX_VIDEO_PORTDEFINITIONTYPE video
OMX_COLOR_FORMATTYPE eColorFormat
Definition OMX_Video.h:161
OMX_VIDEO_CODINGTYPE eCompressionFormat
Definition OMX_Video.h:160
OMX_VIDEO_CODINGTYPE eCompressionFormat
Definition OMX_Video.h:134
OMX_NATIVE_DEVICETYPE pNativeRender
Definition OMX_Video.h:126
OMX_NATIVE_WINDOWTYPE pNativeWindow
Definition OMX_Video.h:136
OMX_COLOR_FORMATTYPE eColorFormat
Definition OMX_Video.h:135
OMX_PARAM_PORTDEFINITIONTYPE sPortParam
OMX_PARAM_PORTDEFINITIONTYPE sPortParam
OMX_ERRORTYPE(* PortDestructor)(omx_base_PortType *openmaxStandPort)
OMX_VIDEO_PARAM_PORTFORMATTYPE sVideoParam

Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo