rtp.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * rtp.h: rtp stream output module header
00003  *****************************************************************************
00004  * Copyright (C) 2003-2007 the VideoLAN team
00005  * $Id: 01e7288ece697dcef4a0641609109fe489ed65b8 $
00006  *
00007  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
00008  *          Rémi Denis-Courmont
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 typedef struct rtsp_stream_t rtsp_stream_t;
00026 typedef struct rtsp_stream_id_t rtsp_stream_id_t;
00027 
00028 rtsp_stream_t *RtspSetup( sout_stream_t *p_stream, const vlc_url_t *url );
00029 void RtspUnsetup( rtsp_stream_t *rtsp );
00030 
00031 rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid,
00032                              uint32_t ssrc,
00033                              const char *dst, int ttl,
00034                              unsigned loport, unsigned hiport );
00035 void RtspDelId( rtsp_stream_t *rtsp, rtsp_stream_id_t * );
00036 
00037 char *RtspAppendTrackPath( rtsp_stream_id_t *id, const char *base );
00038 
00039 char *SDPGenerate( sout_stream_t *p_stream, const char *rtsp_url );
00040 
00041 uint32_t rtp_compute_ts( const sout_stream_id_t *id, int64_t i_pts );
00042 int rtp_add_sink( sout_stream_id_t *id, int fd, bool rtcp_mux, uint16_t *seq );
00043 void rtp_del_sink( sout_stream_id_t *id, int fd );
00044 uint16_t rtp_get_seq( sout_stream_id_t *id );
00045 int64_t rtp_get_ts( const sout_stream_t *p_stream );
00046 
00047 /* RTP packetization */
00048 void rtp_packetize_common (sout_stream_id_t *id, block_t *out,
00049                            int b_marker, int64_t i_pts);
00050 void rtp_packetize_send (sout_stream_id_t *id, block_t *out);
00051 size_t rtp_mtu (const sout_stream_id_t *id);
00052 
00053 int rtp_packetize_mpa  (sout_stream_id_t *, block_t *);
00054 int rtp_packetize_mpv  (sout_stream_id_t *, block_t *);
00055 int rtp_packetize_ac3  (sout_stream_id_t *, block_t *);
00056 int rtp_packetize_split(sout_stream_id_t *, block_t *);
00057 int rtp_packetize_swab (sout_stream_id_t *, block_t *);
00058 int rtp_packetize_mp4a (sout_stream_id_t *, block_t *);
00059 int rtp_packetize_mp4a_latm (sout_stream_id_t *, block_t *);
00060 int rtp_packetize_h263 (sout_stream_id_t *, block_t *);
00061 int rtp_packetize_h264 (sout_stream_id_t *, block_t *);
00062 int rtp_packetize_amr  (sout_stream_id_t *, block_t *);
00063 int rtp_packetize_spx  (sout_stream_id_t *, block_t *);
00064 int rtp_packetize_t140 (sout_stream_id_t *, block_t *);
00065 int rtp_packetize_g726_16 (sout_stream_id_t *, block_t *);
00066 int rtp_packetize_g726_24 (sout_stream_id_t *, block_t *);
00067 int rtp_packetize_g726_32 (sout_stream_id_t *, block_t *);
00068 int rtp_packetize_g726_40 (sout_stream_id_t *, block_t *);
00069 
00070 /* RTCP */
00071 typedef struct rtcp_sender_t rtcp_sender_t;
00072 rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto,
00073                          bool mux);
00074 void CloseRTCP (rtcp_sender_t *rtcp);
00075 void SendRTCP (rtcp_sender_t *restrict rtcp, const block_t *rtp);

Generated on Tue May 25 08:04:53 2010 for VLC by  doxygen 1.5.6