]> git.sesse.net Git - vlc/blob - src/stream_output/stream_output.h
Merge branch 'master' into lpcm_encoder
[vlc] / src / stream_output / stream_output.h
1 /*****************************************************************************
2  * stream_output.h : internal stream output
3  *****************************************************************************
4  * Copyright (C) 2002-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Christophe Massiot <massiot@via.ecp.fr>
8  *          Laurent Aimar <fenrir@via.ecp.fr>
9  *          Eric Petit <titer@videolan.org>
10  *          Jean-Paul Saman <jpsaman #_at_# m2x.nl>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25  ***************************************************************************/
26
27 #if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
28 # error This header file can only be included from LibVLC.
29 #endif
30
31 #ifndef VLC_SRC_STREAMOUT_H
32 # define VLC_SRC_STREAMOUT_H 1
33
34 # include <vlc_sout.h>
35 # include <vlc_network.h>
36
37 /****************************************************************************
38  * sout_packetizer_input_t: p_sout <-> p_packetizer
39  ****************************************************************************/
40 struct sout_packetizer_input_t
41 {
42     sout_instance_t     *p_sout;
43
44     es_format_t         *p_fmt;
45
46     sout_stream_id_t    *id;
47 };
48
49 #define sout_NewInstance(a,b) __sout_NewInstance(VLC_OBJECT(a),b)
50 sout_instance_t *  __sout_NewInstance( vlc_object_t *, const char * );
51 void sout_DeleteInstance( sout_instance_t * );
52
53 sout_packetizer_input_t *sout_InputNew( sout_instance_t *, es_format_t * );
54 int sout_InputDelete( sout_packetizer_input_t * );
55 int sout_InputSendBuffer( sout_packetizer_input_t *, block_t* );
56
57 /* Announce system */
58
59 struct session_descriptor_t
60 {
61     struct sockaddr_storage orig;
62     socklen_t origlen;
63     struct sockaddr_storage addr;
64     socklen_t addrlen;
65
66     char *psz_sdp;
67     bool b_ssm;
68 };
69
70 struct sap_handler_t *SAP_Create (vlc_object_t *);
71 void SAP_Destroy (struct sap_handler_t *);
72 int SAP_Add (struct sap_handler_t *, session_descriptor_t *);
73 void SAP_Del (struct sap_handler_t *, const session_descriptor_t *);
74
75 #endif