FFmpeg
Functions
rdt.h File Reference
#include <stdint.h>
#include "avformat.h"
#include "rtpdec.h"

Go to the source code of this file.

Functions

RDTDemuxContextff_rdt_parse_open (AVFormatContext *ic, int first_stream_of_set_idx, void *priv_data, const RTPDynamicProtocolHandler *handler)
 Allocate and init the RDT parsing context. More...
 
void ff_rdt_parse_close (RDTDemuxContext *s)
 
void ff_rdt_calc_response_and_checksum (char response[41], char chksum[9], const char *challenge)
 Calculate the response (RealChallenge2 in the RTSP header) to the challenge (RealChallenge1 in the RTSP header from the Real/Helix server), which is used as some sort of client validation. More...
 
void ff_rdt_subscribe_rule (char *cmd, int size, int stream_nr, int rule_nr)
 Add subscription information to Subscribe parameter string. More...
 
int ff_rdt_parse_header (const uint8_t *buf, int len, int *pset_id, int *pseq_no, int *pstream_id, int *pis_keyframe, uint32_t *ptimestamp)
 Parse RDT-style packet header. More...
 
int ff_rdt_parse_packet (RDTDemuxContext *s, AVPacket *pkt, uint8_t **buf, int len)
 Parse RDT-style packet data (header + media data). More...
 
void ff_real_parse_sdp_a_line (AVFormatContext *s, int stream_index, const char *buf)
 Parse a server-related SDP line. More...
 

Function Documentation

◆ ff_rdt_parse_open()

RDTDemuxContext* ff_rdt_parse_open ( AVFormatContext ic,
int  first_stream_of_set_idx,
void *  priv_data,
const RTPDynamicProtocolHandler handler 
)

Allocate and init the RDT parsing context.

Parameters
icthe containing RTSP demuxer context
first_stream_of_set_idxindex to the first AVStream in the RTSP demuxer context's ic->streams array that is part of this particular stream's set of streams (with identical content)
priv_dataprivate data of the payload data handler context
handlerpointer to the parse_packet() payload parsing function
Returns
a newly allocated RDTDemuxContext. Free with ff_rdt_parse_close().

Definition at line 55 of file rdt.c.

Referenced by ff_rtsp_open_transport_ctx().

◆ ff_rdt_parse_close()

void ff_rdt_parse_close ( RDTDemuxContext s)

Definition at line 78 of file rdt.c.

Referenced by ff_rtsp_undo_setup(), and rtsp_read_setup().

◆ ff_rdt_calc_response_and_checksum()

void ff_rdt_calc_response_and_checksum ( char  response[41],
char  chksum[9],
const char *  challenge 
)

Calculate the response (RealChallenge2 in the RTSP header) to the challenge (RealChallenge1 in the RTSP header from the Real/Helix server), which is used as some sort of client validation.

Parameters
responsepointer to response buffer, it should be at least 41 bytes (40 data + 1 zero) bytes long.
chksumpointer to buffer containing a checksum of the response, it should be at least 9 (8 data + 1 zero) bytes long.
challengepointer to the RealChallenge1 value provided by the server.

Definition at line 94 of file rdt.c.

◆ ff_rdt_subscribe_rule()

void ff_rdt_subscribe_rule ( char *  cmd,
int  size,
int  stream_nr,
int  rule_nr 
)

Add subscription information to Subscribe parameter string.

Parameters
cmdstring to write the subscription information into.
sizesize of cmd.
stream_nrstream number.
rule_nrrule number to conform to.

Definition at line 384 of file rdt.c.

Referenced by rtsp_read_packet().

◆ ff_rdt_parse_header()

int ff_rdt_parse_header ( const uint8_t buf,
int  len,
int pset_id,
int pseq_no,
int pstream_id,
int pis_keyframe,
uint32_t *  ptimestamp 
)

Parse RDT-style packet header.

Parameters
bufinput buffer
lenlength of input buffer
pset_idwill be set to the set ID this packet belongs to
pseq_nowill be set to the sequence number of the packet
pstream_idwill be set to the stream ID this packet belongs to
pis_keyframewill be whether this packet belongs to a keyframe
ptimestampwill be set to the timestamp of the packet
Returns
the amount of bytes consumed, or negative on error

Referenced by ff_rdt_parse_packet(), and ff_rtsp_tcp_read_packet().

◆ ff_rdt_parse_packet()

int ff_rdt_parse_packet ( RDTDemuxContext s,
AVPacket pkt,
uint8_t **  buf,
int  len 
)

Parse RDT-style packet data (header + media data).

Usage similar to rtp_parse_packet().

< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....

Definition at line 335 of file rdt.c.

◆ ff_real_parse_sdp_a_line()

void ff_real_parse_sdp_a_line ( AVFormatContext s,
int  stream_index,
const char *  buf 
)

Parse a server-related SDP line.

Parameters
sthe RTSP AVFormatContext
stream_indexthe index of the first stream in the set represented by the SDP m= line (in s->streams)
bufthe SDP line

Definition at line 515 of file rdt.c.