[vlc-commits] [Git][videolan/libvlcpp][master] MediaPlayer: Update to recent set_time/set_position changes

Hugo Beauzée-Luyssen gitlab at videolan.org
Mon Jul 2 11:44:37 CEST 2018


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


Commits:
57b762eb by Zhao Zhili at 2018-07-02T11:43:44+02:00
MediaPlayer: Update to recent set_time/set_position changes

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

- - - - -


1 changed file:

- vlcpp/MediaPlayer.hpp


Changes:

=====================================
vlcpp/MediaPlayer.hpp
=====================================
--- a/vlcpp/MediaPlayer.hpp
+++ b/vlcpp/MediaPlayer.hpp
@@ -322,12 +322,23 @@ public:
      * Set the movie time (in ms). This has no effect if no media is being
      * played. Not all formats and protocols support this.
      *
+     * \version{2.x}
+     * \version{3.x}
      * \param i_time  the movie time (in ms).
+     * \version{4.x}
+     * \param b_fast  prefer fast seeking or precise seeking
      */
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+    void setTime(libvlc_time_t i_time, bool b_fast)
+    {
+        libvlc_media_player_set_time(*this, i_time, b_fast);
+    }
+#else
     void setTime(libvlc_time_t i_time)
     {
         libvlc_media_player_set_time(*this, i_time);
     }
+#endif
 
     /**
      * Get movie position as percentage between 0.0 and 1.0.
@@ -344,12 +355,23 @@ public:
      * effect if playback is not enabled. This might not work depending on
      * the underlying input format and protocol.
      *
+     * \version{2.x}
+     * \version{3.x}
      * \param f_pos  the position
+     * \version{4.x}
+     * \param b_fast prefer fast seeking or precise seeking
      */
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+    void setPosition(float f_pos, bool b_fast)
+    {
+        libvlc_media_player_set_position(*this, f_pos, b_fast);
+    }
+#else
     void setPosition(float f_pos)
     {
         libvlc_media_player_set_position(*this, f_pos);
     }
+#endif
 
     /**
      * Set movie chapter (if applicable).



View it on GitLab: https://code.videolan.org/videolan/libvlcpp/commit/57b762ebc401e2f4ec737fddf0a517b597680b09

-- 
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/commit/57b762ebc401e2f4ec737fddf0a517b597680b09
You're receiving this email because of your account on code.videolan.org.


More information about the vlc-commits mailing list