[vlc-commits] [Git][videolan/libvlcpp][master] MediaList: Added missing constructor for an empty MediaList
Hugo Beauzée-Luyssen
gitlab at videolan.org
Thu Feb 18 18:04:48 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp
Commits:
98fafd88 by Leonhard Saam at 2021-02-18T19:04:46+01:00
MediaList: Added missing constructor for an empty MediaList
- - - - -
1 changed file:
- vlcpp/MediaList.hpp
Changes:
=====================================
vlcpp/MediaList.hpp
=====================================
@@ -79,16 +79,10 @@ public:
*
* \param p_mlib media library object
*/
- MediaList(MediaLibrary& mlib )
+ MediaList(MediaLibrary& mlib)
: Internal{ libvlc_media_library_media_list( getInternalPtr<libvlc_media_library_t>( mlib ) ), libvlc_media_list_release }
{
}
-#endif
-
- MediaList( Internal::InternalPtr mediaList )
- : Internal{ mediaList, libvlc_media_list_release }
- {
- }
/**
* Create an empty VLC MediaList instance.
@@ -97,6 +91,34 @@ public:
*/
MediaList() = default;
+ /**
+ * Create an empty media list.
+ *
+ * \param p_instance libvlc instance
+ */
+ MediaList(Instance& instance)
+ : Internal{ libvlc_media_list_new( getInternalPtr<libvlc_instance_t>( instance ) ),
+ libvlc_media_list_release }
+ {
+ }
+#else
+ /**
+ * Create an empty media list.
+ *
+ * \param p_instance libvlc instance
+ */
+ MediaList()
+ : Internal{ libvlc_media_list_new(),
+ libvlc_media_list_release }
+ {
+ }
+#endif
+
+ MediaList( Internal::InternalPtr mediaList )
+ : Internal{ mediaList, libvlc_media_list_release }
+ {
+ }
+
/**
* Associate media instance with this media list instance. If another
* media instance was present it will be released. The
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/98fafd88113c65f44e283a004c992ed5fc9111c0
--
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/98fafd88113c65f44e283a004c992ed5fc9111c0
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list