[vlc-commits] [Git][videolan/libvlcpp][master] 2 commits: Instance: libvlc_media_discoverer_get_list now returns a size_t
Hugo Beauzée-Luyssen
gitlab at videolan.org
Sun Oct 23 12:20:30 CEST 2016
Hugo Beauzée-Luyssen pushed to branch master at videolan / libvlcpp
Commits:
9be59236 by Hugo Beauzée-Luyssen at 2016-10-23T12:19:41+02:00
Instance: libvlc_media_discoverer_get_list now returns a size_t
- - - - -
56269d3e by Hugo Beauzée-Luyssen at 2016-10-23T12:20:05+02:00
Media: parse() is now deprecated
- - - - -
2 changed files:
- vlcpp/Instance.hpp
- vlcpp/Media.hpp
Changes:
=====================================
vlcpp/Instance.hpp
=====================================
--- a/vlcpp/Instance.hpp
+++ b/vlcpp/Instance.hpp
@@ -522,7 +522,7 @@ public:
libvlc_media_discoverer_description_t** pp_descs;
auto nbSd = libvlc_media_discoverer_list_get( *this, static_cast<libvlc_media_discoverer_category_t>( category ),
&pp_descs );
- if ( nbSd <= 0 )
+ if ( nbSd == 0 )
return {};
auto releaser = [nbSd](libvlc_media_discoverer_description_t** ptr) {
libvlc_media_discoverer_list_release( ptr, nbSd );
@@ -530,7 +530,7 @@ public:
std::unique_ptr<libvlc_media_discoverer_description_t*, decltype(releaser)> descPtr( pp_descs, releaser );
std::vector<MediaDiscoverer::Description> res;
res.reserve( nbSd );
- for ( auto i = 0; i < nbSd; ++i )
+ for ( auto i = 0u; i < nbSd; ++i )
res.emplace_back( pp_descs[i]->psz_name, pp_descs[i]->psz_longname, pp_descs[i]->i_cat );
return res;
}
=====================================
vlcpp/Media.hpp
=====================================
--- a/vlcpp/Media.hpp
+++ b/vlcpp/Media.hpp
@@ -523,6 +523,7 @@ public:
return libvlc_media_get_duration(*this);
}
+#if LIBVLC_VERSION_INT < LIBVLC_VERSION(3, 0, 0, 0)
/**
* Parse a media.
*
@@ -540,7 +541,6 @@ public:
libvlc_media_parse(*this);
}
-#if LIBVLC_VERSION_INT < LIBVLC_VERSION(3, 0, 0, 0)
/**
* Parse a media.
*
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/compare/530b11e5d2ae7417fa14937b9a6342d001a0b6be...56269d3efe206f2000921c70006cf271e85600c5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-commits/attachments/20161023/302222c6/attachment-0001.html>
More information about the vlc-commits
mailing list