21 #ifndef AVFORMAT_RTSP_H 22 #define AVFORMAT_RTSP_H 26 #include "rtspcodes.h" 31 #include "libavutil/log.h" 37 enum RTSPLowerTransport {
38 RTSP_LOWER_TRANSPORT_UDP = 0,
39 RTSP_LOWER_TRANSPORT_TCP = 1,
40 RTSP_LOWER_TRANSPORT_UDP_MULTICAST = 2,
41 RTSP_LOWER_TRANSPORT_NB,
42 RTSP_LOWER_TRANSPORT_HTTP = 8,
45 RTSP_LOWER_TRANSPORT_CUSTOM = 16,
67 enum RTSPControlTransport {
72 #define RTSP_DEFAULT_PORT 554 73 #define RTSPS_DEFAULT_PORT 322 74 #define RTSP_MAX_TRANSPORTS 8 75 #define RTSP_TCP_MAX_PACKET_SIZE 1472 76 #define RTSP_DEFAULT_NB_AUDIO_CHANNELS 1 77 #define RTSP_DEFAULT_AUDIO_SAMPLERATE 44100 78 #define RTSP_RTP_PORT_MIN 5000 79 #define RTSP_RTP_PORT_MAX 65000 131 enum RTSPStatusCode status_code;
148 char session_id[512];
155 char real_challenge[64];
187 char content_type[64];
195 enum RTSPClientState {
197 RTSP_STATE_STREAMING,
206 enum RTSPServerType {
231 enum RTSPClientState state;
245 char session_id[512];
267 enum RTSPServerType server_type;
270 char real_challenge[64];
279 char last_reply[2048];
301 char last_subscription[1024];
317 char control_uri[1024];
331 enum RTSPControlTransport control_transport;
410 char default_lang[4];
414 #define RTSP_FLAG_FILTER_SRC 0x1 417 #define RTSP_FLAG_LISTEN 0x2 418 #define RTSP_FLAG_CUSTOM_IO 0x4 419 #define RTSP_FLAG_RTCP_TO_SOURCE 0x8 421 #define RTSP_FLAG_PREFER_TCP 0x10 423 typedef struct RTSPSource { 435 void *transport_priv;
444 char control_url[1024];
450 int nb_include_source_addrs;
452 int nb_exclude_source_addrs;
455 int sdp_payload_type;
473 char crypto_suite[40];
474 char crypto_params[100];
487 const char *url,
const char *headers);
506 const char *method,
const char *url,
509 unsigned char **content_ptr,
510 const unsigned char *send_content,
511 int send_content_length);
519 const char *url,
const char *headers,
546 unsigned char **content_ptr,
547 int return_on_interleaved_data,
const char *method);
608 uint8_t *buf,
int buf_size);
626 int ff_rtsp_make_setup_request(
AVFormatContext *s,
const char *host,
int port,
640 extern const AVOption ff_rtsp_options[];
int interleaved_min
interleave ids, if TCP transport; each TCP/RTSP data packet starts with a '$', stream length and stre...
Definition: rtsp.h:93
int rtp_port_min
Minimum and maximum local UDP ports.
Definition: rtsp.h:388
AVOption.
Definition: opt.h:246
char source[INET6_ADDRSTRLEN+1]
source IP address
Definition: rtsp.h:115
struct pollfd * p
Polling array for udp.
Definition: rtsp.h:354
RTP/JPEG specific private data.
Definition: rdt.c:83
enum AVDiscard * real_setup
current stream setup.
Definition: rtsp.h:296
char * user_agent
User-Agent string.
Definition: rtsp.h:408
enum AVDiscard * real_setup_cache
stream setup during the last frame read.
Definition: rtsp.h:292
int mode_record
transport set to record data
Definition: rtsp.h:112
HTTP Authentication state structure.
Definition: httpauth.h:55
int64_t seek_timestamp
the seek value requested when calling av_seek_frame().
Definition: rtsp.h:239
enum RTSPLowerTransport lower_transport
network layer transport protocol; e.g.
Definition: rtsp.h:121
Format I/O context.
Definition: avformat.h:1342
int reordering_queue_size
Size of RTP packet reordering queue.
Definition: rtsp.h:403
int get_parameter_supported
Whether the server supports the GET_PARAMETER method.
Definition: rtsp.h:360
int ttl
time-to-live value (required for multicast); the amount of HOPs that packets will be allowed to make ...
Definition: rtsp.h:109
int initial_timeout
Timeout to wait for incoming connections.
Definition: rtsp.h:393
int rtp_muxer_flags
Option flags for the chained RTP muxer.
Definition: rtsp.h:370
int accept_dynamic_rate
Whether the server accepts the x-Dynamic-Rate header.
Definition: rtsp.h:373
URLContext * rtsp_hd_out
Additional output handle, used when input and output are done separately, eg for HTTP tunneling...
Definition: rtsp.h:328
Describe a single stream, as identified by a single m= line block in the SDP content.
Definition: rtsp.h:436
Private data for the RTSP demuxer.
Definition: rtsp.h:218
int64_t last_cmd_time
timestamp of the last RTSP command that we sent to the RTSP server.
Definition: rtsp.h:255
int timeout
copy of RTSPMessageHeader->timeout, i.e.
Definition: rtsp.h:250
struct RTSPStream ** rtsp_streams
streams in this session
Definition: rtsp.h:225
uint64_t asf_pb_pos
cache for position of the asf demuxer, since we load a new data packet in the bytecontext for each in...
Definition: rtsp.h:311
int seq
RTSP command sequence number.
Definition: rtsp.h:241
uint8_t * recvbuf
Reusable buffer for receiving packets.
Definition: rtsp.h:339
AVFormatContext * asf_ctx
The following are used for RTP/ASF streams.
Definition: rtsp.h:307
int nb_rtsp_streams
number of items in the 'rtsp_streams' variable
Definition: rtsp.h:223
void * cur_transport_priv
RTSPStream->transport_priv of the last stream that we read a packet from.
Definition: rtsp.h:283
This describes a single item in the "Transport:" line of one stream as negotiated by the SETUP RTSP c...
Definition: rtsp.h:88
struct MpegTSContext * ts
The following are used for parsing raw mpegts in udp.
Definition: rtsp.h:321
Definition: network.h:108
char addr[128]
Source-specific multicast include source IP address (from SDP content)
Definition: rtsp.h:427
int media_type_mask
Mask of all requested media types.
Definition: rtsp.h:383
int rtsp_flags
Various option flags for the RTSP muxer/demuxer.
Definition: rtsp.h:378
Describe the class of an AVClass context structure.
Definition: log.h:67
enum RTSPTransport transport
data/packet transport protocol; e.g.
Definition: rtsp.h:118
int need_subscription
The following are used for Real stream selection.
Definition: rtsp.h:288
int stimeout
timeout of socket i/o operations.
Definition: rtsp.h:398
HTTPAuthState auth_state
authentication state
Definition: rtsp.h:276
uint64_t packets
The number of returned packets.
Definition: rtsp.h:349
AVDiscard
Definition: avcodec.h:785
int lower_transport_mask
A mask with all requested transport methods.
Definition: rtsp.h:344
struct sockaddr_storage destination
destination IP address
Definition: rtsp.h:114
This structure stores compressed data.
Definition: avcodec.h:1407
int server_port_min
UDP unicast server port range; the ports to which we should connect to receive unicast UDP RTP/RTCP d...
Definition: rtsp.h:105
int port_min
UDP multicast port range; the ports to which we should connect to receive multicast UDP data...
Definition: rtsp.h:97
int client_port_min
UDP client ports; these should be the local ports of the UDP RTP (and RTCP) sockets over which we rec...
Definition: rtsp.h:101
int initial_pause
Do not begin to play the stream immediately.
Definition: rtsp.h:365