[vlc-devel] [PATCH 3/7] npapi win32: move attaching to libvlc from set_player_window to on_media_player_new
Sergey Radionov
rsatom at gmail.com
Sat Dec 24 02:17:10 CET 2011
---
npapi/vlcplugin_win.cpp | 11 ++++++-----
npapi/vlcplugin_win.h | 3 ++-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/npapi/vlcplugin_win.cpp b/npapi/vlcplugin_win.cpp
index 260c77e..8ff89cf 100644
--- a/npapi/vlcplugin_win.cpp
+++ b/npapi/vlcplugin_win.cpp
@@ -86,11 +86,6 @@ VlcPluginWin::~VlcPluginWin()
destroy_windows();
}
-void VlcPluginWin::set_player_window()
-{
- _WindowsManager.LibVlcAttach(libvlc_media_player);
-}
-
void VlcPluginWin::toggle_fullscreen()
{
_WindowsManager.ToggleFullScreen();
@@ -177,6 +172,12 @@ bool VlcPluginWin::destroy_windows()
return true;
}
+
+void VlcPluginWin::on_media_player_new()
+{
+ _WindowsManager.LibVlcAttach(libvlc_media_player);
+}
+
void VlcPluginWin::on_media_player_release()
{
_WindowsManager.LibVlcDetach();
diff --git a/npapi/vlcplugin_win.h b/npapi/vlcplugin_win.h
index 249c9f4..5c1206d 100644
--- a/npapi/vlcplugin_win.h
+++ b/npapi/vlcplugin_win.h
@@ -63,10 +63,11 @@ public:
{ pf_wndproc = wndproc; };
protected:
+ virtual void on_media_player_new();
virtual void on_media_player_release();
private:
- void set_player_window();
+ void set_player_window(){};
unsigned int i_width, i_height;
unsigned int i_tb_width, i_tb_height;
--
1.7.7.1.msysgit.0
More information about the vlc-devel
mailing list