]> git.sesse.net Git - vlc/blobdiff - modules/misc/dummy/input.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / misc / dummy / input.c
index 5a8c1d05c6d73d21bd4e717aae471c6cfcc1b460..d4a0d76247c72ed5a9eba3a439f1353ccde8725d 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
-#include <string.h>
 
 #include <vlc/vlc.h>
-#include <vlc/intf.h>
-#include <vlc/input.h>
+#include <vlc_interface.h>
+#include <vlc_access.h>
+#include <vlc_demux.h>
+#include <vlc_playlist.h>
+
+#include "dummy.h"
 
 /*****************************************************************************
  * Access functions.
@@ -70,6 +72,7 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
         /* */
         case ACCESS_SET_PAUSE_STATE:
         case ACCESS_GET_TITLE_INFO:
+        case ACCESS_GET_META:
         case ACCESS_SET_TITLE:
         case ACCESS_SET_SEEKPOINT:
             return VLC_EGENERIC;
@@ -115,7 +118,7 @@ struct demux_sys_t
 
     /* Used for the pause command */
     mtime_t expiration;
-    
     /* The command to run */
     char* psz_command;
 };
@@ -123,9 +126,7 @@ enum
 {
     COMMAND_NOP  = 0,
     COMMAND_QUIT = 1,
-    COMMAND_LOOP = 2,
     COMMAND_PAUSE= 3,
-    COMMAND_RUN  = 4,
 };
 
 static int Demux( demux_t * );
@@ -164,14 +165,6 @@ int E_(OpenDemux) ( vlc_object_t *p_this )
         return VLC_SUCCESS;
     }
 
-    /* Check for a "vlc:loop" command */
-    if( i_len == 4 && !strncasecmp( psz_name, "loop", 4 ) )
-    {
-        msg_Info( p_demux, "command `loop'" );
-        p_sys->i_command = COMMAND_LOOP;
-        return VLC_SUCCESS;
-    }
-
     /* Check for a "vlc:pause:***" command */
     if( i_len > 6 && !strncasecmp( psz_name, "pause:", 6 ) )
     {
@@ -181,17 +174,7 @@ int E_(OpenDemux) ( vlc_object_t *p_this )
         p_sys->expiration = mdate() + (mtime_t)i_arg * (mtime_t)1000000;
         return VLC_SUCCESS;
     }
-    
-    /* Check for a "vlc:run:***" command */
-    if ( i_len > 4 && !strncasecmp( psz_name, "run:", 4 ) )
-    {
-       p_sys->psz_command = malloc( i_len - 4 );
-       strcpy( p_sys->psz_command, psz_name + 4 );
-       msg_Info( p_demux, "command `run program %s'", p_sys->psz_command );
-       p_sys->i_command = COMMAND_RUN;
-       return VLC_SUCCESS;
-    } 
-
     msg_Err( p_demux, "unknown command `%s'", psz_name );
 
     free( p_sys );
@@ -228,11 +211,8 @@ static int Demux( demux_t *p_demux )
     switch( p_sys->i_command )
     {
         case COMMAND_QUIT:
-            b_eof = p_demux->p_vlc->b_die = VLC_TRUE;
-            break;
-
-        case COMMAND_LOOP:
-            playlist_Goto( p_playlist, 0 );
+            b_eof = VLC_TRUE;
+            vlc_object_kill( p_demux->p_libvlc );
             break;
 
         case COMMAND_PAUSE:
@@ -241,17 +221,11 @@ static int Demux( demux_t *p_demux )
             else
                 msleep( 10000 );
             break;
-        
-        case COMMAND_RUN:
-            var_SetString( p_playlist, "run-program-command", p_sys->psz_command );
-            free( p_sys->psz_command );
-            b_eof = VLC_TRUE;
-            break;
-
         case COMMAND_NOP:
         default:
             b_eof = VLC_TRUE;
-            break;       
+            break;
     }
 
     vlc_object_release( p_playlist );