]> git.sesse.net Git - vlc/blob - modules/stream_out/rtp.h
Hide sout ID from RTSP code
[vlc] / modules / stream_out / rtp.h
1 /*****************************************************************************
2  * rtp.h: rtp stream output module header
3  *****************************************************************************
4  * Copyright (C) 2003-2007 the VideoLAN team
5  * $Id: rtp.c 21407 2007-08-22 20:10:41Z courmisch $
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *          RĂ©mi Denis-Courmont
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 /*ypedef struct rtsp_stream_t rtsp_stream_t;*/
26 typedef struct rtsp_stream_id_t rtsp_stream_id_t;
27 typedef struct rtsp_client_t rtsp_client_t;
28
29 int RtspSetup( sout_stream_t *p_stream, const vlc_url_t *url );
30 void RtspUnsetup( sout_stream_t *p_stream );
31
32 rtsp_stream_id_t *RtspAddId( sout_stream_t *p_stream, sout_stream_id_t *sid,
33                              unsigned loport, unsigned hiport );
34 void RtspDelId( sout_stream_t *p_stream, rtsp_stream_id_t * );
35
36 char *SDPGenerate( const sout_stream_t *p_stream,
37                    const char *psz_destination, vlc_bool_t b_rtsp );
38
39 int rtp_add_sink( sout_stream_id_t *id, sout_access_out_t *access );
40 void rtp_del_sink( sout_stream_id_t *id, sout_access_out_t *access );
41
42 typedef int (*pf_rtp_packetizer_t)( sout_stream_t *, sout_stream_id_t *,
43                                     block_t * );
44
45 struct sout_stream_sys_t
46 {
47     /* sdp */
48     int64_t i_sdp_id;
49     int     i_sdp_version;
50     char    *psz_sdp;
51     vlc_mutex_t  lock_sdp;
52
53     char        *psz_session_name;
54     char        *psz_session_description;
55     char        *psz_session_url;
56     char        *psz_session_email;
57
58     /* */
59     vlc_bool_t b_export_sdp_file;
60     char *psz_sdp_file;
61     /* sap */
62     vlc_bool_t b_export_sap;
63     session_descriptor_t *p_session;
64
65     httpd_host_t *p_httpd_host;
66     httpd_file_t *p_httpd_file;
67
68     httpd_host_t *p_rtsp_host;
69     httpd_url_t  *p_rtsp_url;
70     char         *psz_rtsp_control;
71     char         *psz_rtsp_path;
72
73     /* */
74     char *psz_destination;
75     int  i_port;
76     int  i_port_audio;
77     int  i_port_video;
78     int  i_ttl;
79     vlc_bool_t b_latm;
80
81     /* when need to use a private one or when using muxer */
82     int i_payload_type;
83
84     /* in case we do TS/PS over rtp */
85     sout_mux_t        *p_mux;
86     sout_access_out_t *p_access;
87     int               i_mtu;
88     sout_access_out_t *p_grab;
89     uint16_t          i_sequence;
90     uint32_t          i_timestamp_start;
91     uint8_t           ssrc[4];
92     block_t           *packet;
93
94     /* */
95     vlc_mutex_t      lock_es;
96     int              i_es;
97     sout_stream_id_t **es;
98
99     /* */
100     int              i_rtsp;
101     rtsp_client_t    **rtsp;
102 };