]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/gather.c
Move last.fm password from PasswordShowOnEdit to Password.
[vlc] / modules / stream_out / gather.c
index ea70c182fe82f268485c410d7bff78c1dbf527b8..e14eb44d44562e547bc797000abfb51539ff2ead 100644 (file)
  * Preamble
  *****************************************************************************/
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_input.h>
 #include <vlc_sout.h>
 
@@ -36,7 +41,7 @@ static int      Open    ( vlc_object_t * );
 static void     Close   ( vlc_object_t * );
 
 vlc_module_begin();
-    set_description( _("Gathering stream output") );
+    set_description( N_("Gathering stream output") );
     set_capability( "sout stream", 50 );
     add_shortcut( "gather" );
     set_callbacks( Open, Close );
@@ -51,7 +56,7 @@ static int               Send( sout_stream_t *, sout_stream_id_t *, block_t* );
 
 struct sout_stream_id_t
 {
-    vlc_bool_t    b_used;
+    bool    b_used;
 
     es_format_t fmt;
     void          *id;
@@ -74,6 +79,9 @@ static int Open( vlc_object_t *p_this )
     sout_stream_sys_t *p_sys;
 
     p_stream->p_sys = p_sys = malloc( sizeof( sout_stream_sys_t ) );
+    if( p_sys == NULL )
+        return VLC_EGENERIC;
+
     p_sys->p_out    = sout_StreamNew( p_stream->p_sout, p_stream->psz_next );
     if( p_sys->p_out == NULL )
     {
@@ -149,7 +157,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
         /* */
         msg_Dbg( p_stream, "reusing already opened output" );
-        id->b_used = VLC_TRUE;
+        id->b_used = true;
         return id;
     }
 
@@ -171,8 +179,10 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
     msg_Dbg( p_stream, "creating new output" );
     id = malloc( sizeof( sout_stream_id_t ) );
+    if( id == NULL )
+        return NULL;
     es_format_Copy( &id->fmt, p_fmt );
-    id->b_used           = VLC_TRUE;
+    id->b_used           = true;
     id->id               = sout_StreamIdAdd( p_sys->p_out, &id->fmt );
     if( id->id == NULL )
     {
@@ -189,7 +199,8 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
  *****************************************************************************/
 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 {
-    id->b_used = VLC_FALSE;
+    VLC_UNUSED(p_stream);
+    id->b_used = false;
     return VLC_SUCCESS;
 }
 
@@ -203,4 +214,3 @@ static int Send( sout_stream_t *p_stream,
 
     return sout_StreamIdSend( p_sys->p_out, id->id, p_buffer );
 }
-