Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a90f4bb0
Commit
a90f4bb0
authored
Mar 18, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
omxil: Generalize code for hardcoded component/role mappings
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
eb39bd4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
modules/codec/omxil/omxil_core.c
modules/codec/omxil/omxil_core.c
+17
-8
No files found.
modules/codec/omxil/omxil_core.c
View file @
a90f4bb0
...
...
@@ -192,6 +192,20 @@ void DeinitOmxCore(void)
/*****************************************************************************
* CreateComponentsList: creates a list of components matching the given role
*****************************************************************************/
static
const
struct
{
const
char
*
psz_role
;
const
char
*
psz_name
;
}
role_mappings
[]
=
{
#ifdef RPI_OMX
{
"video_decoder.avc"
,
"OMX.broadcom.video_decode"
},
{
"iv_renderer"
,
"OMX.broadcom.video_render"
},
#endif
{
0
,
0
}
};
int
CreateComponentsList
(
vlc_object_t
*
p_this
,
const
char
*
psz_role
,
char
ppsz_components
[
MAX_COMPONENTS_LIST_SIZE
][
OMX_MAX_STRINGNAME_SIZE
])
{
...
...
@@ -212,17 +226,12 @@ int CreateComponentsList(vlc_object_t *p_this, const char *psz_role,
msg_Dbg
(
p_this
,
"component %s"
,
psz_name
);
#ifdef RPI_OMX
if
(
!
strcmp
(
psz_name
,
"OMX.broadcom.video_decode"
))
{
if
(
!
strcmp
(
psz_role
,
"video_decoder.avc"
)
)
{
for
(
unsigned
int
j
=
0
;
role_mappings
[
j
].
psz_role
;
j
++
)
{
if
(
!
strcmp
(
psz_role
,
role_mappings
[
j
].
psz_role
)
&&
!
strcmp
(
psz_name
,
role_mappings
[
j
].
psz_name
)
)
{
goto
found
;
}
}
else
if
(
!
strcmp
(
psz_name
,
"OMX.broadcom.video_render"
))
{
if
(
!
strcmp
(
psz_role
,
"iv_renderer"
))
{
goto
found
;
}
}
#endif
omx_error
=
pf_get_roles_of_component
(
psz_name
,
&
roles
,
0
);
if
(
omx_error
!=
OMX_ErrorNone
||
!
roles
)
continue
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment