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

Hugo Beauzée-Luyssen gitlab at videolan.org
Thu May 10 05:45:31 CEST 2018


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


Commits:
28e2c7a6 by Hugo Beauzée-Luyssen at 2018-05-09T20:44:56-07:00
MediaPlayer: Update to recent set_deinterlace changes

- - - - -


1 changed file:

- vlcpp/MediaPlayer.hpp


Changes:

=====================================
vlcpp/MediaPlayer.hpp
=====================================
--- a/vlcpp/MediaPlayer.hpp
+++ b/vlcpp/MediaPlayer.hpp
@@ -65,6 +65,15 @@ private:
         VideoCleanup,
     };
 public:
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+    enum class DeinterlaceState : char
+    {
+        Auto     = -1,
+        Disabled =  0,
+        Enabled  =  1
+    };
+#endif
+
     /**
      * Check if 2 MediaPlayer objects contain the same libvlc_media_player_t.
      * \param another another MediaPlayer
@@ -1500,13 +1509,27 @@ public:
     /**
      * Enable or disable deinterlace filter
      *
-     * \param psz_mode  type of deinterlace filter, empty string to disable
+     * \version{2.x}
+     * \version{3.x}
+     * \param psz_mode  type of deinterlace filter, empty string to disable.
+     * \version{4.x}
+     * \param state     The required deinterlacing state.
+     * \param mode      The deinterlace mode, or empty string for the current
+     *                  or default filter.
      */
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+    void setDeinterlace(DeinterlaceState state, const std::string& mode)
+    {
+        libvlc_video_set_deinterlace(*this, static_cast<int>( state ),
+                                     mode.empty() ? NULL : mode.c_str());
+    }
+#else
     void setDeinterlace(const std::string& mode)
     {
         libvlc_video_set_deinterlace(*this,
                                      mode.empty() ? NULL : mode.c_str());
     }
+#endif
 
     /**
      * Get an integer marquee option value



View it on GitLab: https://code.videolan.org/videolan/libvlcpp/commit/28e2c7a668e740471c80eb3e7d66162aeffee4cf

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


More information about the vlc-commits mailing list