]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/es.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / stream_out / es.c
index 34fc63d342116ec94fb479f2d1cf48c597b05ce8..33defdadd891fa6150c945013f56959ea263f023 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * es.c: Elementary stream output module
  *****************************************************************************
- * Copyright (C) 2003-2004 VideoLAN
+ * Copyright (C) 2003-2004 the VideoLAN team
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
-#include <string.h>
 
 #include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/sout.h>
+#include <vlc_input.h>
+#include <vlc_sout.h>
+#include <vlc_interface.h>
 
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
 #define ACCESS_TEXT N_("Output access method")
 #define ACCESS_LONGTEXT N_( \
-    "Allows you to specify the output access method used for the streaming " \
-    "output." )
+    "This is the default output access method that will be used." )
+
 #define ACCESSA_TEXT N_("Audio output access method")
 #define ACCESSA_LONGTEXT N_( \
-    "Allows you to specify the output access method used for the audio " \
-    "streaming output." )
+    "This is the output access method that will be used for audio." )
 #define ACCESSV_TEXT N_("Video output access method")
 #define ACCESSV_LONGTEXT N_( \
-    "Allows you to specify the output access method used for the video " \
-    "streaming output." )
+    "This is the output access method that will be used for video." )
 
 #define MUX_TEXT N_("Output muxer")
 #define MUX_LONGTEXT N_( \
-    "Allows you to specify the muxer used for the streaming output." )
+    "This is the default muxer method that will be used." )
 #define MUXA_TEXT N_("Audio output muxer")
 #define MUXA_LONGTEXT N_( \
-    "Allows you to specify the muxer used for the audio streaming output." )
+    "This is the muxer that will be used for audio." )
 #define MUXV_TEXT N_("Video output muxer")
 #define MUXV_LONGTEXT N_( \
-    "Allows you to specify the muxer used for the video streaming output." )
+    "This is the muxer that will be used for video." )
 
 #define DEST_TEXT N_("Output URL")
 #define DEST_LONGTEXT N_( \
-    "Allows you to specify the output URL used for the streaming output." )
+    "This is the default output URI." )
 #define DESTA_TEXT N_("Audio output URL")
 #define DESTA_LONGTEXT N_( \
-    "Allows you to specify the output URL used for the audio streaming " \
-    "output." )
+    "This is the output URI that will be used for audio." )
 #define DESTV_TEXT N_("Video output URL")
 #define DESTV_LONGTEXT N_( \
-    "Allows you to specify the output URL used for the video streaming " \
-    "output." )
+    "This is the output URI that will be used for video." )
 
 static int      Open    ( vlc_object_t * );
 static void     Close   ( vlc_object_t * );
@@ -106,8 +101,6 @@ vlc_module_begin();
     set_callbacks( Open, Close );
 vlc_module_end();
 
-
-#define FREE( p ) if( p ) { free( p ); (p) = NULL; }
 /*****************************************************************************
  * Exported prototypes
  *****************************************************************************/
@@ -150,7 +143,7 @@ static int Open( vlc_object_t *p_this )
     sout_stream_sys_t   *p_sys;
     vlc_value_t         val;
 
-    sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options, p_stream->p_cfg );
+    config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options, p_stream->p_cfg );
     p_sys                   = malloc( sizeof( sout_stream_sys_t ) );
 
     p_sys->i_count          = 0;
@@ -366,6 +359,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     {
         msg_Err( p_stream, "no suitable sout access module for `%s/%s://%s'",
                  psz_access, psz_mux, psz_dst );
+        intf_UserFatal( p_stream, VLC_FALSE,
+                    _("Streaming / Transcoding failed"),
+                    _("There is no suitable stream-output access module for \"%s/%s://%s\"."),
+                          psz_access,
+                          psz_mux, psz_dst );
         return( NULL );
     }
 
@@ -375,6 +373,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     {
         msg_Err( p_stream, "no suitable sout mux module for `%s/%s://%s'",
                  psz_access, psz_mux, psz_dst );
+        intf_UserFatal( p_stream, VLC_FALSE,
+                        _("Streaming / Transcoding failed"),
+                        _("There is no suitable stream-output access module "\
+                          "for \"%s/%s://%s\"."),
+                          psz_access, psz_mux, psz_dst );
         sout_AccessOutDelete( p_access );
         return( NULL );
     }
@@ -399,7 +402,7 @@ 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 )
 {
     sout_access_out_t *p_access = id->p_mux->p_access;
-
+    sout_MuxDelete( id->p_mux );
     sout_MuxDeleteStream( id->p_mux, id->p_input );
     sout_AccessOutDelete( p_access );