]> git.sesse.net Git - vlc/blobdiff - src/stream_output/stream_output.h
svg module: fix memleak.
[vlc] / src / stream_output / stream_output.h
index b0d8f817f582fe52a3c0d746aa7ccf4599371689..7745a9ebf18c6cfa9919bbc63f0e945fa7336bfc 100644 (file)
@@ -2,7 +2,7 @@
  * stream_output.h : internal stream output
  *****************************************************************************
  * Copyright (C) 2002-2005 the VideoLAN team
- * $Id: stream_output.h 16916 2006-10-01 16:08:37Z dionoea $
+ * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. ***************************************************************************/
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ ***************************************************************************/
 
-#include <vlc_sout.h>
+#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
+# error This header file can only be included from LibVLC.
+#endif
+
+#ifndef VLC_SRC_STREAMOUT_H
+# define VLC_SRC_STREAMOUT_H 1
+
+# include <vlc_sout.h>
+# include <vlc_network.h>
 
 /****************************************************************************
  * sout_packetizer_input_t: p_sout <-> p_packetizer
@@ -47,18 +56,6 @@ VLC_EXPORT( int,                sout_InputSendBuffer,  ( sout_packetizer_input_t
 
 /* Announce system */
 
-/* A SAP session descriptor, enqueued in the SAP handler queue */
-struct sap_session_t {
-    char          *psz_sdp;
-    uint8_t       *psz_data;
-    unsigned      i_length;
-    sap_address_t *p_address;
-
-    /* Last and next send */
-    mtime_t        i_last;
-    mtime_t        i_next;
-};
-
 /* The SAP handler, running in a separate thread */
 struct sap_handler_t
 {
@@ -67,7 +64,7 @@ struct sap_handler_t
     sap_session_t **pp_sessions;
     sap_address_t **pp_addresses;
 
-    vlc_bool_t b_control;
+    bool b_control;
 
     int i_sessions;
     int i_addresses;
@@ -80,6 +77,17 @@ struct sap_handler_t
     /* private data, not in p_sys as there is one kind of sap_handler_t */
 };
 
+struct session_descriptor_t
+{
+    struct sockaddr_storage orig;
+    socklen_t origlen;
+    struct sockaddr_storage addr;
+    socklen_t addrlen;
+
+    char *psz_sdp;
+    bool b_ssm;
+};
+
 /* The main announce handler object */
 struct announce_handler_t
 {
@@ -88,16 +96,9 @@ struct announce_handler_t
     sap_handler_t *p_sap;
 };
 
-#define announce_HandlerCreate(a) __announce_HandlerCreate(VLC_OBJECT(a))
-announce_handler_t*  __announce_HandlerCreate( vlc_object_t *);
-
-/* Private functions for the announce handler */
 int announce_HandlerDestroy( announce_handler_t * );
-int announce_Register( announce_handler_t *p_announce,
-                       session_descriptor_t *p_session,
-                       announce_method_t *p_method );
-int announce_UnRegister( announce_handler_t *p_announce,
-                         session_descriptor_t *p_session );
 
+/* Release it with vlc_object_release() */
 sap_handler_t *announce_SAPHandlerCreate( announce_handler_t *p_announce );
-void announce_SAPHandlerDestroy( sap_handler_t *p_sap );
+
+#endif