]> git.sesse.net Git - vlc/blobdiff - src/stream_output/stream_output.c
Removes trailing spaces. Removes tabs.
[vlc] / src / stream_output / stream_output.c
index c4532c4a57a0ad6fbab08c13213e67cb3737cf3b..d200fc0e95efef118c3919f52450b326c48db9ca 100644 (file)
@@ -34,6 +34,7 @@
 #include <string.h>                                            /* strerror() */
 
 #include <vlc_sout.h>
+#include <vlc_playlist.h>
 
 #include "stream_output.h"
 
@@ -72,46 +73,6 @@ static void mrl_Clean( mrl_t *p_mrl );
 sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
 {
     sout_instance_t *p_sout;
-    vlc_value_t keep;
-
-    if( var_Get( p_parent, "sout-keep", &keep ) < 0 )
-    {
-        msg_Warn( p_parent, "cannot get sout-keep value" );
-        keep.b_bool = VLC_FALSE;
-    }
-    if( keep.b_bool )
-    {
-        if( ( p_sout = vlc_object_find( p_parent, VLC_OBJECT_SOUT,
-                                        FIND_ANYWHERE ) ) != NULL )
-        {
-            if( !strcmp( p_sout->psz_sout, psz_dest ) )
-            {
-                msg_Dbg( p_parent, "sout keep: reusing sout" );
-                msg_Dbg( p_parent, "sout keep: you probably want to use "
-                          "gather stream_out" );
-                vlc_object_detach( p_sout );
-                vlc_object_attach( p_sout, p_parent );
-                vlc_object_release( p_sout );
-                return p_sout;
-            }
-            else
-            {
-                msg_Dbg( p_parent, "sout keep: destroying unusable sout" );
-                vlc_object_release( p_sout );
-                sout_DeleteInstance( p_sout );
-            }
-        }
-    }
-    else if( !keep.b_bool )
-    {
-        while( ( p_sout = vlc_object_find( p_parent, VLC_OBJECT_SOUT,
-                                           FIND_PARENT ) ) != NULL )
-        {
-            msg_Dbg( p_parent, "sout keep: destroying old sout" );
-            vlc_object_release( p_sout );
-            sout_DeleteInstance( p_sout );
-        }
-    }
 
     /* *** Allocate descriptor *** */
     p_sout = vlc_object_create( p_parent, VLC_OBJECT_SOUT );
@@ -164,9 +125,6 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
  *****************************************************************************/
 void sout_DeleteInstance( sout_instance_t * p_sout )
 {
-    /* Unlink object */
-    vlc_object_detach( p_sout );
-
     /* remove the stream out chain */
     sout_StreamDelete( p_sout->p_stream );
 
@@ -374,11 +332,11 @@ int sout_AccessOutWrite( sout_access_out_t *p_access, block_t *p_buffer )
         if( p_input )
         {
             stats_UpdateInteger( p_input, p_input->p->counters.p_sout_sent_packets,
-                                30, NULL );
+                     30, NULL );
             stats_UpdateInteger( p_input, p_input->p->counters.p_sout_sent_bytes,
                                  p_access->i_sent_bytes, &i_total );
             stats_UpdateFloat( p_input, p_input->p->counters.p_sout_send_bitrate,
-                                (float)i_total, NULL );
+                    (float)i_total, NULL );
             p_access->i_sent_bytes = 0;
             vlc_object_release( p_input );
         }