]> git.sesse.net Git - vlc/blobdiff - modules/access/slp.c
rtsp: connect to an RTSP server, issue a DESCRIBE command and return
[vlc] / modules / access / slp.c
index 1fd99be66e35c68d6de72466bcb4a24aaafa6e8a..de05f1abdfd0e72c8b27795c1d84f45398465949 100644 (file)
@@ -2,7 +2,7 @@
  * slp.c: SLP access plugin
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: slp.c,v 1.6 2003/01/21 21:19:36 lool Exp $
+ * $Id: slp.c,v 1.13 2003/07/23 01:13:47 gbazin Exp $
  *
  * Authors: Loïc Minier <lool@videolan.org>
  *
@@ -24,6 +24,8 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#include <stdlib.h>                                                /* malloc */
+
 #include <vlc/vlc.h>
 #include <vlc/input.h>
 
@@ -67,24 +69,24 @@ static int  Demux ( input_thread_t * );
 #define FILTER_LONGTEXT "This is a query formulated of attribute pattern " \
                         "matching expressions in the form of an LDAPv3 "   \
                         "search filter or empty for all answers"
-#define LANG_TEXT     "language requested in SLP requests"
+#define LANG_TEXT     "Language requested in SLP requests"
 #define LANG_LONGTEXT "RFC 1766 Language Tag for the natural language " \
                       "locale of requests, leave empty to use the "     \
                       "default locale; it is used in all SLP queries"
 
 vlc_module_begin();
-    set_description( _("SLP access module") );
-    add_category_hint( N_("slp"), NULL );
-    add_string( "slp-attrids", "", NULL, ATTRIDS_TEXT, ATTRIDS_LONGTEXT );
+    set_description( _("SLP input") );
+    add_category_hint( N_("slp"), NULL, VLC_TRUE );
+    add_string( "slp-attrids", "", NULL, ATTRIDS_TEXT, ATTRIDS_LONGTEXT, VLC_TRUE );
     add_string( "slp-scopelist", "", NULL, SCOPELIST_TEXT,
-                SCOPELIST_LONGTEXT );
+                SCOPELIST_LONGTEXT, VLC_TRUE );
     add_string( "slp-namingauthority", "*", NULL, NAMINGAUTHORITY_TEXT,
-                NAMINGAUTHORITY_LONGTEXT );
-    add_string( "slp-filter", "", NULL, FILTER_TEXT, FILTER_LONGTEXT );
-    add_string( "slp-lang", "", NULL, LANG_TEXT, LANG_LONGTEXT );
-    add_submodule();
-        set_capability( "access", 0 );
-        set_callbacks( Open, Close );
+                NAMINGAUTHORITY_LONGTEXT, VLC_TRUE );
+    add_string( "slp-filter", "", NULL, FILTER_TEXT, FILTER_LONGTEXT, VLC_TRUE );
+    add_string( "slp-lang", "", NULL, LANG_TEXT, LANG_LONGTEXT, VLC_TRUE );
+    set_capability( "access", 0 );
+    set_callbacks( Open, Close );
+
     add_submodule();
         add_shortcut( "demux_slp" );
         set_capability( "demux", 0 );
@@ -182,6 +184,8 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
     p_playlist_item->i_type = 0;
     p_playlist_item->i_status = 0;
     p_playlist_item->b_autodeletion = VLC_FALSE;
+    p_playlist_item->i_options = 0;
+    p_playlist_item->ppsz_options = 0;
 
     /* search the description of the stream */
     if( SLPOpen( config_GetPsz( p_input, "slp-lang" ),
@@ -338,7 +342,6 @@ static int Open( vlc_object_t * p_this )
     vlc_mutex_lock( &p_input->stream.stream_lock );
     p_input->stream.b_pace_control = VLC_FALSE;
     p_input->stream.b_seekable = VLC_FALSE;
-    p_input->stream.b_connected = VLC_TRUE;
     p_input->stream.p_selected_area->i_tell = 0;
     p_input->stream.p_selected_area->i_size = 0;
     p_input->stream.i_method = INPUT_METHOD_SLP;