[vlc-commits] [Git][videolan/libvlcpp][master] Fix build when using VLC 2.2

Hugo Beauzée-Luyssen gitlab at videolan.org
Tue Feb 6 20:25:19 CET 2018


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


Commits:
be5670db by Hugo Beauzée-Luyssen at 2018-02-06T20:22:01+01:00
Fix build when using VLC 2.2

- - - - -


2 changed files:

- test/main.cpp
- vlcpp/structures.hpp


Changes:

=====================================
test/main.cpp
=====================================
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -36,9 +36,11 @@ int main(int ac, char** av)
     const char* vlcArgs = "-vv";
     auto instance = VLC::Instance(1, &vlcArgs);
 
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
     auto sds = instance.mediaDiscoverers( VLC::MediaDiscoverer::Category::Lan );
     for ( const auto& sd : sds )
         std::cout << "Found SD: " << sd.name() << "(" << sd.longName() << ")" << std::endl;
+#endif
 
     instance.setExitHandler([] {
         std::cout << "Libvlc is exiting" << std::endl;


=====================================
vlcpp/structures.hpp
=====================================
--- a/vlcpp/structures.hpp
+++ b/vlcpp/structures.hpp
@@ -319,6 +319,7 @@ public:
         return m_fpsDen;
     }
 
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
     ///
     /// \brief Orientation
     ///
@@ -338,6 +339,7 @@ public:
     {
         return m_projection;
     }
+#endif
 
     ////////////////////////////////////////////////////////////////////////////
     // Subtitles specific
@@ -378,8 +380,10 @@ public:
                 m_sarDen = c->video->i_sar_den;
                 m_fpsNum = c->video->i_frame_rate_num;
                 m_fpsDen = c->video->i_frame_rate_den;
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
                 m_orientation = static_cast<Orientation>( c->video->i_orientation );
                 m_projection = static_cast<Projection>( c->video->i_projection );
+#endif
                 break;
             case libvlc_track_text:
                 m_type = Subtitle;
@@ -413,8 +417,10 @@ private:
     uint32_t m_sarDen;
     uint32_t m_fpsNum;
     uint32_t m_fpsDen;
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
     Orientation m_orientation;
     Projection m_projection;
+#endif
     // Subtitles
     std::string m_encoding;
 };



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

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


More information about the vlc-commits mailing list