]> git.sesse.net Git - vlc/blobdiff - modules/access_output/shout.c
revert [23722]
[vlc] / modules / access_output / shout.c
index 81974cecbd7ed3f9cb7de925f3406082509e1fe7..d3eea7f894d16444c31dbee29bdb88245aa01fd9 100644 (file)
@@ -144,9 +144,8 @@ static const char *ppsz_sout_options[] = {
 /*****************************************************************************
  * 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
 {
@@ -428,10 +427,9 @@ static int Open( vlc_object_t *p_this )
             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 );
         }
     }
@@ -446,7 +444,6 @@ static int Open( vlc_object_t *p_this )
     }
 
     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)",
@@ -486,19 +483,10 @@ static void Close( vlc_object_t * p_this )
     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;
 
@@ -523,8 +511,7 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
                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 )
             {