OpenMAXBellagio
0.9.3
clocksrc/library_entry_point.c
Go to the documentation of this file.
1
31
#include <
st_static_component_loader.h
>
32
#include <
omx_clocksrc_component.h
>
33
47
int
omx_component_library_Setup
(
stLoaderComponentType
**stComponents) {
48
OMX_U32
i;
49
50
DEBUG
(
DEB_LEV_FUNCTION_NAME
,
"In %s \n"
,__func__);
51
52
if
(stComponents == NULL) {
53
DEBUG
(
DEB_LEV_FUNCTION_NAME
,
"Out of %s \n"
,__func__);
54
return
1;
// Return Number of Component/s
55
}
56
57
stComponents[0]->
componentVersion
.
s
.
nVersionMajor
= 1;
58
stComponents[0]->
componentVersion
.
s
.
nVersionMinor
= 1;
59
stComponents[0]->
componentVersion
.
s
.
nRevision
= 1;
60
stComponents[0]->
componentVersion
.
s
.
nStep
= 1;
61
62
stComponents[0]->
name
= calloc(1,
OMX_MAX_STRINGNAME_SIZE
);
63
if
(stComponents[0]->name == NULL) {
64
return
OMX_ErrorInsufficientResources
;
65
}
66
67
strcpy(stComponents[0]->name,
CLOCK_COMP_NAME
);
68
stComponents[0]->
name_specific_length
= 1;
69
stComponents[0]->
constructor
=
omx_clocksrc_component_Constructor
;
70
71
stComponents[0]->
name_specific
= calloc(stComponents[0]->name_specific_length,
sizeof
(
char
*));
72
stComponents[0]->
role_specific
= calloc(stComponents[0]->name_specific_length,
sizeof
(
char
*));
73
74
for
(i=0;i<stComponents[0]->
name_specific_length
;i++) {
75
stComponents[0]->
name_specific
[i] = calloc(1,
OMX_MAX_STRINGNAME_SIZE
);
76
if
(stComponents[0]->name_specific[i] == NULL) {
77
return
OMX_ErrorInsufficientResources
;
78
}
79
}
80
for
(i=0;i<stComponents[0]->
name_specific_length
;i++) {
81
stComponents[0]->
role_specific
[i] = calloc(1,
OMX_MAX_STRINGNAME_SIZE
);
82
if
(stComponents[0]->role_specific[i] == NULL) {
83
return
OMX_ErrorInsufficientResources
;
84
}
85
}
86
87
strcpy(stComponents[0]->name_specific[0],
CLOCK_COMP_NAME
);
88
strcpy(stComponents[0]->role_specific[0],
CLOCK_COMP_ROLE
);
89
90
DEBUG
(
DEB_LEV_FUNCTION_NAME
,
"Out of %s \n"
,__func__);
91
return
1;
92
}
93
DEB_LEV_FUNCTION_NAME
#define DEB_LEV_FUNCTION_NAME
Definition:
omx_comp_debug_levels.h:59
OMX_VERSIONTYPE::nRevision
OMX_U8 nRevision
Definition:
OMX_Types.h:346
DEBUG
#define DEBUG(n, fmt, args...)
Definition:
omx_comp_debug_levels.h:77
stLoaderComponentType::name_specific
char ** name_specific
Definition:
st_static_component_loader.h:43
OMX_VERSIONTYPE::s
struct OMX_VERSIONTYPE::@0 s
stLoaderComponentType::name
char * name
Definition:
st_static_component_loader.h:41
stLoaderComponentType::role_specific
char ** role_specific
Definition:
st_static_component_loader.h:44
OMX_U32
unsigned long OMX_U32
Definition:
OMX_Types.h:145
OMX_VERSIONTYPE::nVersionMinor
OMX_U8 nVersionMinor
Definition:
OMX_Types.h:345
omx_clocksrc_component.h
st_static_component_loader.h
omx_component_library_Setup
int omx_component_library_Setup(stLoaderComponentType **stComponents)
The library entry point. It must have the same name for each library for the components loaded by the...
Definition:
clocksrc/library_entry_point.c:47
OMX_VERSIONTYPE::nStep
OMX_U8 nStep
Definition:
OMX_Types.h:347
OMX_ErrorInsufficientResources
@ OMX_ErrorInsufficientResources
Definition:
OMX_Core.h:131
stLoaderComponentType::componentVersion
OMX_VERSIONTYPE componentVersion
Definition:
st_static_component_loader.h:40
OMX_VERSIONTYPE::nVersionMajor
OMX_U8 nVersionMajor
Definition:
OMX_Types.h:344
CLOCK_COMP_NAME
#define CLOCK_COMP_NAME
Definition:
omx_clocksrc_component.h:38
OMX_MAX_STRINGNAME_SIZE
#define OMX_MAX_STRINGNAME_SIZE
Definition:
OMX_Core.h:281
stLoaderComponentType::name_specific_length
unsigned int name_specific_length
Definition:
st_static_component_loader.h:42
CLOCK_COMP_ROLE
#define CLOCK_COMP_ROLE
Definition:
omx_clocksrc_component.h:39
stLoaderComponentType::constructor
OMX_ERRORTYPE(* constructor)(OMX_COMPONENTTYPE *, OMX_STRING cComponentName)
Definition:
st_static_component_loader.h:46
stLoaderComponentType
the private data structure handled by the ST static loader that described an OpenMAX component
Definition:
st_static_component_loader.h:39
omx_clocksrc_component_Constructor
OMX_ERRORTYPE omx_clocksrc_component_Constructor(OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
Definition:
omx_clocksrc_component.c:35
Generated for OpenMAX Bellagio rel. 0.9.3 by
1.5.1