[vlc-commits] windowsless: Simplfications

Hugo Beauzée-Luyssen git at videolan.org
Mon May 11 15:49:17 CEST 2015


npapi-vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon May 11 15:27:43 2015 +0200| [b0b3501ee715ce230093c30568ea19db767ce547] | committer: Hugo Beauzée-Luyssen

windowsless: Simplfications

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=b0b3501ee715ce230093c30568ea19db767ce547
---

 npapi/vlcwindowless_base.h  |    2 +-
 npapi/vlcwindowless_mac.cpp |   11 -----------
 npapi/vlcwindowless_mac.h   |    6 +-----
 3 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/npapi/vlcwindowless_base.h b/npapi/vlcwindowless_base.h
index 0e5614b..f783cf6 100644
--- a/npapi/vlcwindowless_base.h
+++ b/npapi/vlcwindowless_base.h
@@ -54,7 +54,7 @@ public:
 
     //for libvlc_video_set_callbacks
     void* video_lock_cb(void **planes);
-    void video_display_cb(void *picture);
+    virtual void video_display_cb(void *picture);
     //end (for libvlc_video_set_callbacks)
 
     static void invalidate_window_proxy(void *opaque)
diff --git a/npapi/vlcwindowless_mac.cpp b/npapi/vlcwindowless_mac.cpp
index efeaf8a..2000ed0 100644
--- a/npapi/vlcwindowless_mac.cpp
+++ b/npapi/vlcwindowless_mac.cpp
@@ -334,14 +334,3 @@ void VlcWindowlessMac::video_display_cb(void * /*picture*/)
             invalidate_window();
     }
 }
-
-void VlcWindowlessMac::set_player_window() {
-    libvlc_video_set_format_callbacks(getMD(),
-                                      video_format_proxy,
-                                      video_cleanup_proxy);
-    libvlc_video_set_callbacks(getMD(),
-                               video_lock_proxy,
-                               video_unlock_proxy,
-                               video_display_proxy,
-                               this);
-}
diff --git a/npapi/vlcwindowless_mac.h b/npapi/vlcwindowless_mac.h
index 93646eb..f1c19ba 100644
--- a/npapi/vlcwindowless_mac.h
+++ b/npapi/vlcwindowless_mac.h
@@ -34,11 +34,7 @@ public:
 
     bool handle_event(void *event);
     NPError get_root_layer(void *value);
-    void video_display_cb(void *picture);
-    void set_player_window();
-
-    static void video_display_proxy(void *opaque, void *picture)
-    { reinterpret_cast<VlcWindowlessMac*>(opaque)->video_display_cb(picture); }
+    virtual void video_display_cb(void *picture) override;
 
 protected:
     void drawNoPlayback(CGContextRef cgContext);



More information about the vlc-commits mailing list