1 /*****************************************************************************
2 * rtp.h: rtp stream output module header
3 *****************************************************************************
4 * Copyright (C) 2003-2007 the VideoLAN team
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
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.
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.
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 *****************************************************************************/
25 typedef struct rtsp_stream_t rtsp_stream_t
;
26 typedef struct rtsp_stream_id_t rtsp_stream_id_t
;
28 rtsp_stream_t
*RtspSetup( sout_stream_t
*p_stream
, const vlc_url_t
*url
);
29 void RtspUnsetup( rtsp_stream_t
*rtsp
);
31 rtsp_stream_id_t
*RtspAddId( rtsp_stream_t
*rtsp
, sout_stream_id_t
*sid
,
33 const char *dst
, int ttl
,
34 unsigned loport
, unsigned hiport
);
35 void RtspDelId( rtsp_stream_t
*rtsp
, rtsp_stream_id_t
* );
37 char *RtspAppendTrackPath( rtsp_stream_id_t
*id
, const char *base
);
39 char *SDPGenerate( sout_stream_t
*p_stream
, const char *rtsp_url
);
41 uint32_t rtp_compute_ts( const sout_stream_id_t
*id
, int64_t i_pts
);
42 int rtp_add_sink( sout_stream_id_t
*id
, int fd
, bool rtcp_mux
, uint16_t *seq
);
43 void rtp_del_sink( sout_stream_id_t
*id
, int fd
);
44 uint16_t rtp_get_seq( sout_stream_id_t
*id
);
45 int64_t rtp_get_ts( const sout_stream_t
*p_stream
);
47 /* RTP packetization */
48 void rtp_packetize_common (sout_stream_id_t
*id
, block_t
*out
,
49 int b_marker
, int64_t i_pts
);
50 void rtp_packetize_send (sout_stream_id_t
*id
, block_t
*out
);
51 size_t rtp_mtu (const sout_stream_id_t
*id
);
53 int rtp_packetize_mpa (sout_stream_id_t
*, block_t
*);
54 int rtp_packetize_mpv (sout_stream_id_t
*, block_t
*);
55 int rtp_packetize_ac3 (sout_stream_id_t
*, block_t
*);
56 int rtp_packetize_split(sout_stream_id_t
*, block_t
*);
57 int rtp_packetize_swab (sout_stream_id_t
*, block_t
*);
58 int rtp_packetize_mp4a (sout_stream_id_t
*, block_t
*);
59 int rtp_packetize_mp4a_latm (sout_stream_id_t
*, block_t
*);
60 int rtp_packetize_h263 (sout_stream_id_t
*, block_t
*);
61 int rtp_packetize_h264 (sout_stream_id_t
*, block_t
*);
62 int rtp_packetize_amr (sout_stream_id_t
*, block_t
*);
63 int rtp_packetize_spx (sout_stream_id_t
*, block_t
*);
64 int rtp_packetize_t140 (sout_stream_id_t
*, block_t
*);
65 int rtp_packetize_g726_16 (sout_stream_id_t
*, block_t
*);
66 int rtp_packetize_g726_24 (sout_stream_id_t
*, block_t
*);
67 int rtp_packetize_g726_32 (sout_stream_id_t
*, block_t
*);
68 int rtp_packetize_g726_40 (sout_stream_id_t
*, block_t
*);
71 typedef struct rtcp_sender_t rtcp_sender_t
;
72 rtcp_sender_t
*OpenRTCP (vlc_object_t
*obj
, int rtp_fd
, int proto
,
74 void CloseRTCP (rtcp_sender_t
*rtcp
);
75 void SendRTCP (rtcp_sender_t
*restrict rtcp
, const block_t
*rtp
);