]> git.sesse.net Git - vlc/blobdiff - modules/gui/beos/VlcWrapper.cpp
* use var_Set/Get "state"/"position"/"rate" instead of old functions.
[vlc] / modules / gui / beos / VlcWrapper.cpp
index c16ef22a3fe47b25d224215d24c0503a527db6d0..299901eb90e244b9bb99681a4964108e157be91a 100644 (file)
@@ -2,7 +2,7 @@
  * VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.cpp,v 1.41 2004/01/05 13:07:03 zorglub Exp $
+ * $Id$
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -121,8 +121,7 @@ void VlcWrapper::InputSetRate( int rate )
     {
         return;
     }
-
-    input_SetRate( p_input, rate );
+    var_SetInteger( p_input, "rate", rate );
 }
 
 BList * VlcWrapper::GetChannels( int i_cat )
@@ -402,7 +401,7 @@ int VlcWrapper::PlaylistSize()
 
 char * VlcWrapper::PlaylistItemName( int i )
 {
-   return p_playlist->pp_items[i]->psz_name;
+   return p_playlist->pp_items[i]->input.psz_name;
 }
 
 int VlcWrapper::PlaylistCurrent()
@@ -423,7 +422,7 @@ void VlcWrapper::PlaylistPause()
 {
     if( p_input )
     {
-        input_SetStatus( p_input, INPUT_STATUS_PAUSE );
+        var_SetInteger( p_input, "state", PAUSE_S );
     }
 }
 
@@ -706,11 +705,9 @@ VlcWrapper::PlaylistCloneItem( void* castToItem ) const
                if ( copy )
                {
                        // make a copy of the item at index
-                       copy->psz_name = strdup( item->psz_name );
-                       copy->psz_uri  = strdup( item->psz_uri );
-                       copy->i_type = item->i_type;
-                       copy->i_status = item->i_status;
-                       copy->b_autodeletion = item->b_autodeletion;
+                        *copy = *item;
+                       copy->input.psz_name = strdup( item->input.psz_name );
+                       copy->input.psz_uri  = strdup( item->input.psz_uri );
                }
        }
        return (void*)copy;
@@ -788,7 +785,7 @@ bool VlcWrapper::IsUsingMenus()
         return false;
     }
     
-    char * psz_name = p_playlist->pp_items[p_playlist->i_index]->psz_name;
+    char * psz_name = p_playlist->pp_items[p_playlist->i_index]->input.psz_name;
     if( !strncmp( psz_name, "dvdplay:", 8 ) )
     {
         vlc_mutex_unlock( &p_playlist->object_lock );