/*****************************************************************************
* Exported prototypes
*****************************************************************************/
-static int Write( sout_access_out_t *, block_t * );
+static ssize_t Write( sout_access_out_t *, block_t * );
static int Seek ( sout_access_out_t *, off_t );
-static int Read ( sout_access_out_t *, block_t * );
struct sout_access_out_sys_t
{
i_ret = shout_get_connected( p_shout );
}
*/
- /* Only wait when we have no connection */
if ( i_ret != SHOUTERR_CONNECTED )
{
- msg_Warn( p_access, "unable to establish connection. waiting 30 seconds to retry..." );
+ msg_Warn( p_access, "unable to establish connection, retrying..." );
msleep( 30000000 );
}
}
}
p_access->pf_write = Write;
- p_access->pf_read = Read;
p_access->pf_seek = Seek;
msg_Dbg( p_access, "shout access output opened (%s@%s:%i/%s)",
msg_Dbg( p_access, "shout access output closed" );
}
-/*****************************************************************************
- * Read: standard read -- not supported
- *****************************************************************************/
-static int Read( sout_access_out_t *p_access, block_t *p_buffer )
-{
- msg_Err( p_access, "cannot read from shout" );
- return VLC_EGENERIC;
-}
-
/*****************************************************************************
* Write: standard write
*****************************************************************************/
-static int Write( sout_access_out_t *p_access, block_t *p_buffer )
+static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
{
size_t i_write = 0;
Since we already began with a working connection, the most feasable
approach to get out of this error status is a (timed) reconnect approach. */
shout_close( p_access->p_sys->p_shout );
- msg_Warn( p_access, "server unavailable? waiting 30 seconds to reconnect..." );
- msleep( 30000000 );
+ msg_Warn( p_access, "server unavailable? trying to reconnect..." );
/* Re-open the connection (protocol params have already been set) and re-sync */
if( shout_open( p_access->p_sys->p_shout ) == SHOUTERR_SUCCESS )
{