Commit 043b5c89 authored by Sam Hocevar's avatar Sam Hocevar

  * Automatic handling of the Channel Server's response in network mode.
parent b70a26fa
.*
core
core.*
.dep
gmon.out
vlc-debug.log
......
......@@ -4,7 +4,7 @@
* modules.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: netutils.h,v 1.15 2001/10/22 12:28:53 massiot Exp $
* $Id: netutils.h,v 1.16 2001/11/12 04:12:37 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Henri Fallon <henri@videolan.org>
......@@ -31,8 +31,8 @@
* Prototypes
*****************************************************************************/
struct sockaddr_in;
int network_BuildLocalAddr ( struct sockaddr_in *, int, char * );
int network_BuildRemoteAddr( struct sockaddr_in *, char * );
int network_ChannelJoin ( int );
int network_ChannelCreate ( void );
int network_BuildLocalAddr ( struct sockaddr_in *, int, char * );
int network_BuildRemoteAddr ( struct sockaddr_in *, char * );
int network_ChannelJoin ( int );
int network_ChannelCreate ( void );
......@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.24 2001/05/31 16:10:05 stef Exp $
* $Id: gtk_callbacks.c,v 1.25 2001/11/12 04:12:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -326,12 +326,16 @@ void GtkChannelGo( GtkButton * button, gpointer user_data )
/* FIXME: ugly hack to close input and outputs */
p_intf->pf_manage( p_intf );
p_main->p_playlist->b_stopped = 0;
p_intf->pf_manage( p_intf );
}
vlc_mutex_unlock( &p_intf->change_lock );
network_ChannelJoin( i_channel );
/* FIXME 2 */
p_main->p_playlist->b_stopped = 0;
p_intf->pf_manage( p_intf );
vlc_mutex_unlock( &p_intf->change_lock );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
}
......
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.152 2001/11/09 13:49:26 massiot Exp $
* $Id: input.c,v 1.153 2001/11/12 04:12:37 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -534,7 +534,6 @@ static void EndThread( input_thread_t * p_input )
/* Release modules */
module_Unneed( p_input->p_input_module );
}
/*****************************************************************************
......@@ -812,6 +811,11 @@ static void NetworkOpen( input_thread_t * p_input )
psz_server = NULL;
}
}
else
{
/* This is required or NetworkClose will never be called */
p_input->p_source = "ts: network input";
}
/* Check that we got a valid server */
if( psz_server == NULL )
......@@ -986,6 +990,8 @@ static void NetworkOpen( input_thread_t * p_input )
*****************************************************************************/
static void NetworkClose( input_thread_t * p_input )
{
intf_WarnMsg( 2, "input: closing network target `%s'", p_input->p_source );
close( p_input->i_handle );
#ifdef WIN32
......
......@@ -2,7 +2,7 @@
* intf_playlist.c : Playlist management functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_playlist.c,v 1.8 2001/08/09 08:20:26 sam Exp $
* $Id: intf_playlist.c,v 1.9 2001/11/12 04:12:38 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -164,7 +164,7 @@ void intf_PlaylistNext( playlist_t * p_playlist )
void intf_PlaylistPrev( playlist_t * p_playlist )
{
vlc_mutex_lock( &p_playlist->change_lock );
p_playlist->i_mode = -p_playlist->i_mode;
NextItem( p_playlist );
p_playlist->i_mode = -p_playlist->i_mode;
......@@ -202,15 +202,15 @@ int intf_PlaylistDelete( playlist_t * p_playlist, int i_pos )
if( i_pos < p_playlist->i_index )
p_playlist->i_index--;
/* Decrement playlist size */
p_playlist->i_size--;
p_playlist->p_item = realloc( p_playlist->p_item,
p_playlist->i_size * sizeof( playlist_item_t ) );
intf_WarnMsg( 3, "intf: removed `%s' from playlist", psz_name );
/* Delete the item */
free( psz_name );
......@@ -252,9 +252,9 @@ void intf_PlaylistDestroy( playlist_t * p_playlist )
void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
{
vlc_mutex_lock( &p_playlist->change_lock );
p_playlist->i_index = i_pos;
if( p_playlist->i_index != -1 )
{
if( p_playlist->current.psz_name != NULL )
......@@ -270,7 +270,7 @@ void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
p_main->p_playlist->b_stopped = 0;
vlc_mutex_unlock( &p_playlist->change_lock );
}
}
/* URL-decode a file: URL path, return NULL if it's not what we expect */
void intf_UrlDecode( char *encoded_path )
......@@ -282,11 +282,11 @@ void intf_UrlDecode( char *encoded_path )
{
return;
}
cur = encoded_path ;
tmp = calloc(strlen(encoded_path) + 1, sizeof(char) );
while ( ( ext = strchr(cur, '%') ) != NULL)
{
strncat(tmp, cur, (ext - cur) / sizeof(char));
......@@ -299,7 +299,7 @@ void intf_UrlDecode( char *encoded_path )
}
tmp[strlen(tmp)] = (char)realchar;
cur = ext + 2;
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment