[vlc-commits] [Git][videolan/libvlcpp][master] Instance: Allow construction from an existing libvlc_instance_t
Hugo Beauzée-Luyssen
gitlab at videolan.org
Fri Mar 12 08:53:21 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp
Commits:
f52dc9fd by Hugo Beauzée-Luyssen at 2021-03-09T10:07:48+01:00
Instance: Allow construction from an existing libvlc_instance_t
- - - - -
1 changed file:
- vlcpp/Instance.hpp
Changes:
=====================================
vlcpp/Instance.hpp
=====================================
@@ -111,6 +111,19 @@ public:
{
}
+ /**
+ * \brief Instance Wraps an existing libvlc instance to be used with libvlcpp
+ * \param instance A libvlc_instance_t
+ *
+ * The instance will be held by the constructor, the caller can release it
+ * as soon at the instance is constructed.
+ */
+ explicit Instance( libvlc_instance_t* instance )
+ : Internal{ instance, libvlc_release }
+ {
+ libvlc_retain( instance );
+ }
+
/**
* Create an empty VLC instance.
*
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/f52dc9fd50af47565e30d66a695fe7f95090ce1c
--
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/f52dc9fd50af47565e30d66a695fe7f95090ce1c
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list