FFmpeg
Data Fields
RTSPState Struct Reference

Private data for the RTSP demuxer. More...

#include <rtsp.h>

Data Fields

const AVClassclass
 Class for private options. More...
 
URLContextrtsp_hd
 
int nb_rtsp_streams
 number of items in the 'rtsp_streams' variable More...
 
struct RTSPStream ** rtsp_streams
 streams in this session More...
 
enum RTSPClientState state
 indicator of whether we are currently receiving data from the server. More...
 
int64_t seek_timestamp
 the seek value requested when calling av_seek_frame(). More...
 
int seq
 RTSP command sequence number. More...
 
char session_id [512]
 copy of RTSPMessageHeader->session_id, i.e. More...
 
int timeout
 copy of RTSPMessageHeader->timeout, i.e. More...
 
int64_t last_cmd_time
 timestamp of the last RTSP command that we sent to the RTSP server. More...
 
enum RTSPTransport transport
 the negotiated data/packet transport protocol; e.g. More...
 
enum RTSPLowerTransport lower_transport
 the negotiated network layer transport protocol; e.g. More...
 
enum RTSPServerType server_type
 brand of server that we're talking to; e.g. More...
 
char real_challenge [64]
 the "RealChallenge1:" field from the server More...
 
char auth [128]
 plaintext authorization line (username:password) More...
 
HTTPAuthState auth_state
 authentication state More...
 
char last_reply [2048]
 The last reply of the server to a RTSP command. More...
 
void * cur_transport_priv
 RTSPStream->transport_priv of the last stream that we read a packet from. More...
 
int need_subscription
 The following are used for Real stream selection. More...
 
enum AVDiscardreal_setup_cache
 stream setup during the last frame read. More...
 
enum AVDiscardreal_setup
 current stream setup. More...
 
char last_subscription [1024]
 the last value of the "SET_PARAMETER Subscribe:" RTSP command. More...
 
AVFormatContextasf_ctx
 The following are used for RTP/ASF streams. More...
 
uint64_t asf_pb_pos
 cache for position of the asf demuxer, since we load a new data packet in the bytecontext for each incoming RTSP packet. More...
 
char control_uri [MAX_URL_SIZE]
 some MS RTSP streams contain a URL in the SDP that we need to use for all subsequent RTSP requests, rather than the input URI; in other cases, this is a copy of AVFormatContext->filename. More...
 
struct MpegTSContextts
 The following are used for parsing raw mpegts in udp. More...
 
int recvbuf_pos
 
int recvbuf_len
 
URLContextrtsp_hd_out
 Additional output handle, used when input and output are done separately, eg for HTTP tunneling. More...
 
enum RTSPControlTransport control_transport
 RTSP transport mode, such as plain or tunneled. More...
 
int nb_byes
 
uint8_t * recvbuf
 Reusable buffer for receiving packets. More...
 
int lower_transport_mask
 A mask with all requested transport methods. More...
 
uint64_t packets
 The number of returned packets. More...
 
struct pollfd * p
 Polling array for udp. More...
 
int max_p
 
int get_parameter_supported
 Whether the server supports the GET_PARAMETER method. More...
 
int initial_pause
 Do not begin to play the stream immediately. More...
 
int rtp_muxer_flags
 Option flags for the chained RTP muxer. More...
 
int accept_dynamic_rate
 Whether the server accepts the x-Dynamic-Rate header. More...
 
int rtsp_flags
 Various option flags for the RTSP muxer/demuxer. More...
 
int media_type_mask
 Mask of all requested media types. More...
 
int rtp_port_min
 Minimum and maximum local UDP ports. More...
 
int rtp_port_max
 
int initial_timeout
 Timeout to wait for incoming connections. More...
 
int64_t stimeout
 timeout of socket i/o operations. More...
 
int reordering_queue_size
 Size of RTP packet reordering queue. More...
 
char * user_agent
 User-Agent string. More...
 
char default_lang [4]
 
int buffer_size
 
int pkt_size
 
char * localaddr
 

Detailed Description

Private data for the RTSP demuxer.

Todo:
Use AVIOContext instead of URLContext

Definition at line 225 of file rtsp.h.

Field Documentation

◆ class

const AVClass* RTSPState::class

Class for private options.

Definition at line 226 of file rtsp.h.

◆ rtsp_hd

URLContext* RTSPState::rtsp_hd

◆ nb_rtsp_streams

int RTSPState::nb_rtsp_streams

◆ rtsp_streams

struct RTSPStream** RTSPState::rtsp_streams

◆ state

enum RTSPClientState RTSPState::state

indicator of whether we are currently receiving data from the server.

Basically this isn't more than a simple cache of the last PLAY/PAUSE command sent to the server, to make sure we don't send 2x the same unexpectedly or commands in the wrong state.

Definition at line 238 of file rtsp.h.

Referenced by ff_rtsp_parse_streaming_commands(), ff_rtsp_tcp_read_packet(), parse_command_line(), rtsp_listen(), rtsp_read_packet(), rtsp_read_pause(), rtsp_read_play(), rtsp_read_record(), rtsp_read_seek(), rtsp_read_setup(), rtsp_write_packet(), and rtsp_write_record().

◆ seek_timestamp

int64_t RTSPState::seek_timestamp

the seek value requested when calling av_seek_frame().

This value is subsequently used as part of the "Range" parameter when emitting the RTSP PLAY command. If we are currently playing, this command is called instantly. If we are currently paused, this command is called whenever we resume playback. Either way, the value is only used once, see rtsp_read_play() and rtsp_read_seek().

Definition at line 246 of file rtsp.h.

Referenced by rtsp_read_play(), and rtsp_read_seek().

◆ seq

int RTSPState::seq

RTSP command sequence number.

Definition at line 248 of file rtsp.h.

Referenced by ff_rtsp_parse_streaming_commands(), rtsp_read_announce(), rtsp_read_options(), rtsp_read_record(), rtsp_read_request(), and rtsp_read_setup().

◆ session_id

char RTSPState::session_id[512]

copy of RTSPMessageHeader->session_id, i.e.

the server-provided session identifier that the client should re-transmit in each RTSP command

Definition at line 252 of file rtsp.h.

Referenced by check_sessionid(), rtsp_read_packet(), rtsp_read_record(), rtsp_read_request(), and rtsp_read_setup().

◆ timeout

int RTSPState::timeout

copy of RTSPMessageHeader->timeout, i.e.

the time (in seconds) that the server will go without traffic on the RTSP/TCP line before it closes the connection.

Definition at line 257 of file rtsp.h.

Referenced by rtsp_read_packet().

◆ last_cmd_time

int64_t RTSPState::last_cmd_time

timestamp of the last RTSP command that we sent to the RTSP server.

This is used to calculate when to send dummy commands to keep the connection alive, in conjunction with timeout.

Definition at line 262 of file rtsp.h.

Referenced by rtsp_read_packet().

◆ transport

enum RTSPTransport RTSPState::transport

the negotiated data/packet transport protocol; e.g.

RTP or RDT

Definition at line 265 of file rtsp.h.

Referenced by ff_rtsp_open_transport_ctx(), ff_rtsp_tcp_read_packet(), ff_rtsp_undo_setup(), rtsp_read_play(), and rtsp_read_setup().

◆ lower_transport

enum RTSPLowerTransport RTSPState::lower_transport

the negotiated network layer transport protocol; e.g.

TCP or UDP uni-/multicast

Definition at line 269 of file rtsp.h.

Referenced by ff_rtsp_open_transport_ctx(), ff_rtsp_undo_setup(), rtsp_read_packet(), rtsp_read_play(), rtsp_read_setup(), and rtsp_write_packet().

◆ server_type

enum RTSPServerType RTSPState::server_type

brand of server that we're talking to; e.g.

WMS, REAL or other. Detected based on the value of RTSPMessageHeader->server or the presence of RTSPMessageHeader->real_challenge

Definition at line 274 of file rtsp.h.

Referenced by ff_rtsp_setup_input_streams(), rtsp_read_packet(), rtsp_read_pause(), and rtsp_read_play().

◆ real_challenge

char RTSPState::real_challenge[64]

the "RealChallenge1:" field from the server

Definition at line 277 of file rtsp.h.

Referenced by resetup_tcp().

◆ auth

char RTSPState::auth[128]

plaintext authorization line (username:password)

Definition at line 280 of file rtsp.h.

◆ auth_state

HTTPAuthState RTSPState::auth_state

authentication state

Definition at line 283 of file rtsp.h.

Referenced by rtsp_read_packet().

◆ last_reply

char RTSPState::last_reply[2048]

The last reply of the server to a RTSP command.

Definition at line 286 of file rtsp.h.

◆ cur_transport_priv

void* RTSPState::cur_transport_priv

RTSPStream->transport_priv of the last stream that we read a packet from.

Definition at line 290 of file rtsp.h.

◆ need_subscription

int RTSPState::need_subscription

The following are used for Real stream selection.

whether we need to send a "SET_PARAMETER Subscribe:" command

Definition at line 295 of file rtsp.h.

Referenced by rtsp_read_packet(), rtsp_read_pause(), and rtsp_read_play().

◆ real_setup_cache

enum AVDiscard* RTSPState::real_setup_cache

stream setup during the last frame read.

This is used to detect if we need to subscribe or unsubscribe to any new streams.

Definition at line 299 of file rtsp.h.

Referenced by rtsp_read_close(), rtsp_read_header(), and rtsp_read_packet().

◆ real_setup

enum AVDiscard* RTSPState::real_setup

current stream setup.

This is a temporary buffer used to compare current setup to previous frame setup.

Definition at line 303 of file rtsp.h.

Referenced by rtsp_read_close(), rtsp_read_header(), and rtsp_read_packet().

◆ last_subscription

char RTSPState::last_subscription[1024]

the last value of the "SET_PARAMETER Subscribe:" RTSP command.

this is used to send the same "Unsubscribe:" if stream setup changed, before sending a new "Subscribe:" command.

Definition at line 308 of file rtsp.h.

Referenced by rtsp_read_packet().

◆ asf_ctx

AVFormatContext* RTSPState::asf_ctx

The following are used for RTP/ASF streams.

ASF demuxer context for the embedded ASF stream from WMS servers

Definition at line 314 of file rtsp.h.

Referenced by asfrtp_parse_packet(), asfrtp_parse_sdp_line(), ff_rtsp_close_streams(), and ff_wms_parse_sdp_a_line().

◆ asf_pb_pos

uint64_t RTSPState::asf_pb_pos

cache for position of the asf demuxer, since we load a new data packet in the bytecontext for each incoming RTSP packet.

Definition at line 318 of file rtsp.h.

Referenced by asfrtp_parse_packet(), and ff_wms_parse_sdp_a_line().

◆ control_uri

char RTSPState::control_uri[MAX_URL_SIZE]

some MS RTSP streams contain a URL in the SDP that we need to use for all subsequent RTSP requests, rather than the input URI; in other cases, this is a copy of AVFormatContext->filename.

Definition at line 324 of file rtsp.h.

Referenced by ff_rtsp_setup_input_streams(), ff_rtsp_setup_output_streams(), parse_command_line(), rtsp_listen(), rtsp_read_close(), rtsp_read_packet(), rtsp_read_pause(), rtsp_read_play(), rtsp_write_close(), and rtsp_write_record().

◆ ts

struct MpegTSContext* RTSPState::ts

The following are used for parsing raw mpegts in udp.

Definition at line 328 of file rtsp.h.

Referenced by ff_rtsp_close_streams().

◆ recvbuf_pos

int RTSPState::recvbuf_pos

Definition at line 329 of file rtsp.h.

◆ recvbuf_len

int RTSPState::recvbuf_len

Definition at line 330 of file rtsp.h.

◆ rtsp_hd_out

URLContext* RTSPState::rtsp_hd_out

Additional output handle, used when input and output are done separately, eg for HTTP tunneling.

Definition at line 335 of file rtsp.h.

Referenced by ff_rtsp_tcp_write_packet(), rtsp_listen(), and rtsp_send_reply().

◆ control_transport

enum RTSPControlTransport RTSPState::control_transport

RTSP transport mode, such as plain or tunneled.

Definition at line 338 of file rtsp.h.

◆ nb_byes

int RTSPState::nb_byes

Definition at line 343 of file rtsp.h.

Referenced by rtsp_read_play().

◆ recvbuf

uint8_t* RTSPState::recvbuf

Reusable buffer for receiving packets.

Definition at line 346 of file rtsp.h.

Referenced by ff_rtsp_close_streams().

◆ lower_transport_mask

int RTSPState::lower_transport_mask

A mask with all requested transport methods.

Definition at line 351 of file rtsp.h.

Referenced by rtsp_read_packet().

◆ packets

uint64_t RTSPState::packets

The number of returned packets.

Definition at line 356 of file rtsp.h.

Referenced by rtsp_read_packet().

◆ p

struct pollfd* RTSPState::p

Polling array for udp.

Definition at line 361 of file rtsp.h.

Referenced by ff_rtsp_close_streams().

◆ max_p

int RTSPState::max_p

Definition at line 362 of file rtsp.h.

◆ get_parameter_supported

int RTSPState::get_parameter_supported

Whether the server supports the GET_PARAMETER method.

Definition at line 367 of file rtsp.h.

Referenced by rtsp_read_packet().

◆ initial_pause

int RTSPState::initial_pause

Do not begin to play the stream immediately.

Definition at line 372 of file rtsp.h.

Referenced by rtsp_read_header().

◆ rtp_muxer_flags

int RTSPState::rtp_muxer_flags

Option flags for the chained RTP muxer.

Definition at line 377 of file rtsp.h.

◆ accept_dynamic_rate

int RTSPState::accept_dynamic_rate

Whether the server accepts the x-Dynamic-Rate header.

Definition at line 380 of file rtsp.h.

◆ rtsp_flags

int RTSPState::rtsp_flags

Various option flags for the RTSP muxer/demuxer.

Definition at line 385 of file rtsp.h.

Referenced by rtsp_read_close(), rtsp_read_header(), and rtsp_read_packet().

◆ media_type_mask

int RTSPState::media_type_mask

Mask of all requested media types.

Definition at line 390 of file rtsp.h.

◆ rtp_port_min

int RTSPState::rtp_port_min

Minimum and maximum local UDP ports.

Definition at line 395 of file rtsp.h.

Referenced by rtsp_read_setup().

◆ rtp_port_max

int RTSPState::rtp_port_max

Definition at line 395 of file rtsp.h.

Referenced by rtsp_read_setup().

◆ initial_timeout

int RTSPState::initial_timeout

Timeout to wait for incoming connections.

Definition at line 400 of file rtsp.h.

Referenced by rtsp_listen(), and rtsp_read_header().

◆ stimeout

int64_t RTSPState::stimeout

timeout of socket i/o operations.

Definition at line 405 of file rtsp.h.

◆ reordering_queue_size

int RTSPState::reordering_queue_size

Size of RTP packet reordering queue.

Definition at line 410 of file rtsp.h.

Referenced by ff_rtsp_open_transport_ctx().

◆ user_agent

char* RTSPState::user_agent

User-Agent string.

Definition at line 415 of file rtsp.h.

◆ default_lang

char RTSPState::default_lang[4]

Definition at line 417 of file rtsp.h.

◆ buffer_size

int RTSPState::buffer_size

Definition at line 418 of file rtsp.h.

Referenced by map_to_opts(), and rtsp_read_setup().

◆ pkt_size

int RTSPState::pkt_size

Definition at line 419 of file rtsp.h.

Referenced by ff_rtsp_open_transport_ctx(), ff_rtsp_tcp_write_packet(), and map_to_opts().

◆ localaddr

char* RTSPState::localaddr

Definition at line 420 of file rtsp.h.

Referenced by map_to_opts().


The documentation for this struct was generated from the following file: