]> git.sesse.net Git - vlc/blobdiff - modules/access_output/udp.c
Revert "--stats: default to false" (fixes #14035)
[vlc] / modules / access_output / udp.c
index dae64f1e477c6adf1f2a42e85680276a67252dc7..2ce33a503a32b1466f0cecca7dc17b28d842362c 100644 (file)
@@ -1,25 +1,25 @@
 /*****************************************************************************
  * udp.c
  *****************************************************************************
- * Copyright (C) 2001-2007 the VideoLAN team
+ * Copyright (C) 2001-2007 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Eric Petit <titer@videolan.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
 #include <vlc_plugin.h>
 
 #include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <fcntl.h>
+#include <unistd.h>
 #include <assert.h>
+#include <errno.h>
 
 #include <vlc_sout.h>
 #include <vlc_block.h>
 
-#ifdef HAVE_UNISTD_H
-#   include <unistd.h>
-#endif
-
-#ifdef WIN32
+#ifdef _WIN32
 #   include <winsock2.h>
 #   include <ws2tcpip.h>
 #else
@@ -81,11 +76,9 @@ vlc_module_begin ()
     set_shortname( "UDP" )
     set_category( CAT_SOUT )
     set_subcategory( SUBCAT_SOUT_ACO )
-    add_integer( SOUT_CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true )
-    add_integer( SOUT_CFG_PREFIX "group", 1, NULL, GROUP_TEXT, GROUP_LONGTEXT,
+    add_integer( SOUT_CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, CACHING_TEXT, CACHING_LONGTEXT, true )
+    add_integer( SOUT_CFG_PREFIX "group", 1, GROUP_TEXT, GROUP_LONGTEXT,
                                  true )
-    add_obsolete_integer( SOUT_CFG_PREFIX "late" )
-    add_obsolete_bool( SOUT_CFG_PREFIX "raw" )
 
     set_capability( "sout access", 0 )
     add_shortcut( "udp" )
@@ -107,7 +100,6 @@ static const char *const ppsz_core_options[] = {
     "dscp",
     "ttl",
     "miface",
-    "miface-addr",
     NULL
 };
 
@@ -449,7 +441,7 @@ static void* ThreadWrite( void *data )
             i_to_send = i_group;
         }
         if ( send( p_sys->i_handle, p_pk->p_buffer, p_pk->i_buffer, 0 ) == -1 )
-            msg_Warn( p_access, "send error: %m" );
+            msg_Warn( p_access, "send error: %s", vlc_strerror_c(errno) );
         vlc_cleanup_pop();
 
         if( i_dropped_packets )