]> git.sesse.net Git - vlc/blobdiff - src/input/stream_memory.c
fingerprinter: don't hardcode acoustid module selection
[vlc] / src / input / stream_memory.c
index d73d846cdf17bb2c2bb59788eb9729988ef4f578..87b7f1bb6863ae87b3e13c7e4dda24f636897d56 100644 (file)
@@ -1,24 +1,24 @@
 /*****************************************************************************
  * stream_memory.c: stream_t wrapper around memory buffer
  *****************************************************************************
- * Copyright (C) 1999-2008 the VideoLAN team
+ * Copyright (C) 1999-2008 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -76,14 +76,7 @@ stream_t *stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
     s->pf_peek    = Peek;
     s->pf_control = Control;
     s->pf_destroy = Delete;
-
-    vlc_object_attach( s, p_this );
-
-    /* Get a weak link to the parent input */
-    /* FIXME: The usage of vlc_object_find has to be removed. */
-    s->p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT );
-    if(s->p_input)
-        vlc_object_release((vlc_object_t*)s->p_input);
+    s->p_input = NULL;
 
     return s;
 }
@@ -102,9 +95,7 @@ static int Control( stream_t *s, int i_query, va_list args )
 {
     stream_sys_t *p_sys = s->p_sys;
 
-    bool *p_bool;
     uint64_t   *pi_64, i_64;
-    int        i_int;
 
     switch( i_query )
     {
@@ -114,13 +105,10 @@ static int Control( stream_t *s, int i_query, va_list args )
             break;
 
         case STREAM_CAN_SEEK:
-            p_bool = (bool*)va_arg( args, bool * );
-            *p_bool = true;
-            break;
-
         case STREAM_CAN_FASTSEEK:
-            p_bool = (bool*)va_arg( args, bool * );
-            *p_bool = true;
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
+            *va_arg( args, bool * ) = true;
             break;
 
         case STREAM_GET_POSITION:
@@ -134,11 +122,18 @@ static int Control( stream_t *s, int i_query, va_list args )
             p_sys->i_pos = i_64;
             break;
 
+        case STREAM_GET_TITLE_INFO:
+        case STREAM_GET_META:
         case STREAM_GET_CONTENT_TYPE:
+        case STREAM_GET_SIGNAL:
+        case STREAM_SET_TITLE:
+        case STREAM_SET_SEEKPOINT:
             return VLC_EGENERIC;
 
+        case STREAM_SET_PAUSE_STATE:
+            break; /* nothing to do */
+
         case STREAM_CONTROL_ACCESS:
-            i_int = (int) va_arg( args, int );
             msg_Err( s, "Hey, what are you thinking ?"
                      "DON'T USE STREAM_CONTROL_ACCESS !!!" );
             return VLC_EGENERIC;