]> git.sesse.net Git - vlc/blobdiff - projects/mozilla/vlcplugin.cpp
mozilla: introduce new property text
[vlc] / projects / mozilla / vlcplugin.cpp
index 0ed4a19a9e6483a1e2b13d9d1c0ee978e668e194..3a49e8e4c7f6e04aa98465ccf09b58ff874ad82f 100644 (file)
@@ -45,6 +45,7 @@ VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) :
     b_stream(0),
     b_autoplay(1),
     b_toolbar(0),
+    psz_text(NULL),
     psz_target(NULL),
     playlist_index(-1),
     libvlc_instance(NULL),
@@ -144,6 +145,10 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
         {
             psz_target = argv[i];
         }
+        else if( !strcmp( argn[i], "text" ) )
+        {
+            psz_text = strdup( argv[i] );
+        }
         else if( !strcmp( argn[i], "autoplay")
               || !strcmp( argn[i], "autostart") )
         {
@@ -266,6 +271,7 @@ VlcPlugin::~VlcPlugin()
 {
     free(psz_baseURL);
     free(psz_target);
+    free(psz_text);
     if( libvlc_media_player )
         libvlc_media_player_release( libvlc_media_player );
     if( libvlc_media_list )