[vlc-commits] [Git][videolan/libvlcpp][master] 6 commits: Media: Accept a temporary instance

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Fri Jan 28 14:14:56 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp


Commits:
c1ee6408 by Hugo Beauzée-Luyssen at 2022-01-28T15:08:46+01:00
Media: Accept a temporary instance

- - - - -
43fb4106 by Hugo Beauzée-Luyssen at 2022-01-28T15:09:12+01:00
MediaDiscoverer: Accept a temporary instance

- - - - -
ce665381 by Hugo Beauzée-Luyssen at 2022-01-28T15:09:30+01:00
MediaList: Accept a temporary instance

- - - - -
c7ace350 by Hugo Beauzée-Luyssen at 2022-01-28T15:09:42+01:00
MediaListPlayer: Accept a temporary instance

- - - - -
5921ac9c by Hugo Beauzée-Luyssen at 2022-01-28T15:09:57+01:00
MediaPlayer: Accept a temporary instance

- - - - -
1029f7b5 by Hugo Beauzée-Luyssen at 2022-01-28T15:10:09+01:00
RendererDiscoverer: Accept a temporary instance

- - - - -


6 changed files:

- vlcpp/Media.hpp
- vlcpp/MediaDiscoverer.hpp
- vlcpp/MediaList.hpp
- vlcpp/MediaListPlayer.hpp
- vlcpp/MediaPlayer.hpp
- vlcpp/RendererDiscoverer.hpp


Changes:

=====================================
vlcpp/Media.hpp
=====================================
@@ -142,7 +142,7 @@ public:
      * @param mrl       A path, location, or node name, depending on the 3rd parameter
      * @param type      The type of the 2nd argument. \sa{FromType}
      */
-    Media(Instance& instance, const std::string& mrl, FromType type)
+    Media(const Instance& instance, const std::string& mrl, FromType type)
         : Internal{ libvlc_media_release }
     {
         InternalPtr ptr = nullptr;
@@ -185,7 +185,7 @@ public:
      * \param fd open file descriptor
      * \return the newly created media
      */
-    Media(Instance& instance, int fd)
+    Media(const Instance& instance, int fd)
         : Internal { libvlc_media_new_fd( getInternalPtr<libvlc_instance_t>( instance ), fd ),
                      libvlc_media_release }
     {
@@ -293,7 +293,7 @@ public:
      */
 
     template <typename OpenCb, typename ReadCb, typename SeekCb, typename CloseCb>
-    Media( Instance& instance, OpenCb&& openCb, ReadCb&& readCb, SeekCb&& seekCb, CloseCb&& closeCb )
+    Media( const Instance& instance, OpenCb&& openCb, ReadCb&& readCb, SeekCb&& seekCb, CloseCb&& closeCb )
     {
         static_assert( signature_match_or_nullptr<OpenCb, ExpectedMediaOpenCb>::value, "Mismatched Open callback prototype" );
         static_assert( signature_match_or_nullptr<SeekCb, ExpectedMediaSeekCb>::value, "Mismatched Seek callback prototype" );


=====================================
vlcpp/MediaDiscoverer.hpp
=====================================
@@ -88,7 +88,7 @@ public:
      *
      * \param psz_name  service name
      */
-    MediaDiscoverer(Instance& inst, const std::string& name)
+    MediaDiscoverer(const Instance& inst, const std::string& name)
 #if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
         : Internal{ libvlc_media_discoverer_new(getInternalPtr<libvlc_instance_t>( inst ), name.c_str()),
 #else


=====================================
vlcpp/MediaList.hpp
=====================================
@@ -96,7 +96,7 @@ public:
      *
      * \param p_instance  libvlc instance
      */
-    MediaList(Instance& instance)
+    MediaList(const Instance& instance)
         : Internal{ libvlc_media_list_new( getInternalPtr<libvlc_instance_t>( instance ) ),
                                            libvlc_media_list_release }
     {


=====================================
vlcpp/MediaListPlayer.hpp
=====================================
@@ -53,7 +53,7 @@ public:
      *
      * \param p_instance  libvlc instance
      */
-    MediaListPlayer(Instance& instance)
+    MediaListPlayer(const Instance& instance)
         : Internal{ libvlc_media_list_player_new( getInternalPtr<libvlc_instance_t>( instance ) ),
                     libvlc_media_list_player_release }
     {


=====================================
vlcpp/MediaPlayer.hpp
=====================================
@@ -91,7 +91,7 @@ public:
      * \param p_libvlc_instance  the libvlc instance in which the Media
      * Player should be created.
      */
-    MediaPlayer( Instance& instance )
+    MediaPlayer( const Instance& instance )
         : Internal{ libvlc_media_player_new( instance ), libvlc_media_player_release }
     {
     }


=====================================
vlcpp/RendererDiscoverer.hpp
=====================================
@@ -74,7 +74,7 @@ public:
         friend RendererDiscovererEventManager;
     };
 
-    RendererDiscoverer( Instance& instance, const std::string& name )
+    RendererDiscoverer( const Instance& instance, const std::string& name )
         : Internal( libvlc_renderer_discoverer_new( getInternalPtr<libvlc_instance_t>( instance ),
                                                     name.c_str() ), libvlc_renderer_discoverer_release )
     {



View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/d41003f7f2af71ddf7578c88bb8c06be18723cfa...1029f7b538657d84d323a4888094788983514fac

-- 
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/d41003f7f2af71ddf7578c88bb8c06be18723cfa...1029f7b538657d84d323a4888094788983514fac
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list