/*****************************************************************************
* sgimb.c: a meta demux to parse sgimb referrer files
*****************************************************************************
- * Copyright (C) 2004 the VideoLAN team
+ * Copyright (C) 2004 VLC authors and VideoLAN
* $Id$
*
* Authors: Derk-Jan Hartman <hartman at videolan dot 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.
*****************************************************************************/
/*****************************************************************************
};
static int Demux ( demux_t *p_demux );
-static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Activate: initializes m3u demux structures
p_demux->p_sys->i_sid = 0;
p_demux->p_sys->b_rtsp_kasenna = false;
p_demux->p_sys->b_concert = false;
-
+
return VLC_SUCCESS;
}
}
else if( !strncasecmp( psz_bol, "Stream=\"", sizeof("Stream=\"") - 1 ) )
{
psz_bol += sizeof("Stream=\"") - 1;
- if ( !psz_bol )
- return 0;
char* psz_tmp = strrchr( psz_bol, '"' );
if( !psz_tmp )
return 0;
return -1;
}
- free( p_sys->psz_uri );
- if( asprintf( &p_sys->psz_uri, "%s%%3FMeDiAbAsEshowingId=%d%%26MeDiAbAsEconcert%%3FMeDiAbAsE",
- p_sys->psz_uri, p_sys->i_sid ) == -1 )
- {
- p_sys->psz_uri = NULL;
+ char *uri;
+ if( asprintf( &uri, "%s%%3FMeDiAbAsEshowingId=%d%%26MeDiAbAsEconcert"
+ "%%3FMeDiAbAsE", p_sys->psz_uri, p_sys->i_sid ) == -1 )
return -1;
- }
+ free( p_sys->psz_uri );
+ p_sys->psz_uri = uri;
}
- p_child = input_item_NewWithType( VLC_OBJECT(p_demux), p_sys->psz_uri,
+ p_child = input_item_NewWithType( p_sys->psz_uri,
p_sys->psz_name ? p_sys->psz_name : p_sys->psz_uri,
- 0, NULL, 0, p_sys->i_duration, ITEM_TYPE_NET );
-
+ 0, NULL, 0, p_sys->i_duration, ITEM_TYPE_STREAM );
+
if( !p_child )
{
msg_Err( p_demux, "A valid playlistitem could not be created" );
if( !p_sys->psz_mcast_ip && p_sys->b_rtsp_kasenna )
input_item_AddOption( p_child, "rtsp-kasenna", VLC_INPUT_OPTION_TRUSTED );
- input_item_AddSubItem( p_current_input, p_child );
- input_item_AddSubItem2( p_current_input, p_child );
+ input_item_PostSubItem( p_current_input, p_child );
vlc_gc_decref( p_child );
vlc_gc_decref(p_current_input);
return 0; /* Needed for correct operation of go back */
}
-
-static int Control( demux_t *p_demux, int i_query, va_list args )
-{
- VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
- return VLC_EGENERIC;
-}
-