Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
YangLei
libvlcpp
Commits
4202d81d
Commit
4202d81d
authored
Mar 09, 2018
by
Martin Finkel
Committed by
Hugo Beauzée-Luyssen
Mar 09, 2018
Browse files
Instance: expose RendererDiscovererDescription
Signed-off-by:
Hugo Beauzée-Luyssen
<
hugo@beauzee.fr
>
parent
9bc01a71
Changes
2
Hide whitespace changes
Inline
Side-by-side
vlcpp/Instance.hpp
View file @
4202d81d
...
...
@@ -536,6 +536,24 @@ public:
res
.
emplace_back
(
pp_descs
[
i
]
->
psz_name
,
pp_descs
[
i
]
->
psz_longname
,
pp_descs
[
i
]
->
i_cat
);
return
res
;
}
std
::
vector
<
RendererDiscovererDescription
>
rendererDiscoverers
()
{
libvlc_rd_description_t
**
pp_descs
;
auto
nbSd
=
libvlc_renderer_discoverer_list_get
(
*
this
,
&
pp_descs
);
if
(
nbSd
==
0
)
return
{};
auto
releaser
=
[
nbSd
](
libvlc_rd_description_t
**
ptr
)
{
libvlc_renderer_discoverer_list_release
(
ptr
,
nbSd
);
};
std
::
unique_ptr
<
libvlc_rd_description_t
*
,
decltype
(
releaser
)
>
descPtr
(
pp_descs
,
releaser
);
std
::
vector
<
RendererDiscovererDescription
>
res
;
res
.
reserve
(
nbSd
);
for
(
auto
i
=
0u
;
i
<
nbSd
;
++
i
)
res
.
emplace_back
(
pp_descs
[
i
]
);
return
res
;
}
#endif
#endif
...
...
vlcpp/structures.hpp
View file @
4202d81d
...
...
@@ -693,6 +693,31 @@ public:
}
};
class
RendererDiscovererDescription
{
public:
explicit
RendererDiscovererDescription
(
const
libvlc_rd_description_t
*
d
)
{
if
(
d
->
psz_name
!=
NULL
)
m_name
=
d
->
psz_name
;
if
(
d
->
psz_longname
!=
NULL
)
m_longName
=
d
->
psz_longname
;
}
const
std
::
string
&
name
()
const
{
return
m_name
;
}
const
std
::
string
&
longName
()
const
{
return
m_longName
;
}
private:
std
::
string
m_name
;
std
::
string
m_longName
;
};
#endif
...
...
Write
Preview
Supports
Markdown
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