FFmpeg
|
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavutil/mathematics.h"
Go to the source code of this file.
Macros | |
#define | RTP_PT_PRIVATE 96 |
#define | RTP_VERSION 2 |
#define | RTP_MAX_SDES 256 |
maximum text length for SDES More... | |
#define | RTCP_TX_RATIO_NUM 5 |
#define | RTCP_TX_RATIO_DEN 1000 |
#define | RTP_XIPH_IDENT 0xfecdba |
#define | RTP_PT_IS_RTCP(x) |
#define | NTP_TO_RTP_FORMAT(x) av_rescale((x), INT64_C(1) << 32, 1000000) |
Enumerations | |
enum | RTCPType { RTCP_FIR = 192, RTCP_NACK, RTCP_SMPTETC, RTCP_IJ, RTCP_SR = 200, RTCP_RR, RTCP_SDES, RTCP_BYE, RTCP_APP, RTCP_RTPFB, RTCP_PSFB, RTCP_XR, RTCP_AVB, RTCP_RSI, RTCP_TOKEN } |
Functions | |
int | ff_rtp_get_payload_type (AVFormatContext *fmt, AVCodecParameters *par, int idx) |
Return the payload type for a given stream used in the given format context. More... | |
int | ff_rtp_get_codec_info (AVCodecParameters *par, int payload_type) |
Initialize a codec context based on the payload type. More... | |
const char * | ff_rtp_enc_name (int payload_type) |
Return the encoding name (as defined in http://www.iana.org/assignments/rtp-parameters) for a given payload type. More... | |
enum AVCodecID | ff_rtp_codec_id (const char *buf, enum AVMediaType codec_type) |
Return the codec id for the given encoding name and codec type. More... | |
#define RTP_PT_PRIVATE 96 |
Definition at line 77 of file rtp.h.
Referenced by ff_rtp_chain_mux_open(), ff_rtp_get_payload_type(), and rtp_write_header().
#define RTP_VERSION 2 |
Definition at line 78 of file rtp.h.
Referenced by ff_rtp_check_and_send_back_rr(), ff_rtp_send_data(), ff_rtp_send_punch_packets(), ff_rtp_send_rtcp_feedback(), rtp_parse_one_packet(), and rtp_write().
#define RTCP_TX_RATIO_NUM 5 |
Definition at line 82 of file rtp.h.
Referenced by ff_rtp_check_and_send_back_rr(), and rtp_write_packet().
#define RTCP_TX_RATIO_DEN 1000 |
Definition at line 83 of file rtp.h.
Referenced by ff_rtp_check_and_send_back_rr(), and rtp_write_packet().
#define RTP_XIPH_IDENT 0xfecdba |
Definition at line 89 of file rtp.h.
Referenced by ff_rtp_send_xiph().
#define RTP_PT_IS_RTCP | ( | x | ) |
Definition at line 110 of file rtp.h.
Referenced by ff_rtsp_tcp_write_packet(), ff_srtp_decrypt(), ff_srtp_encrypt(), rtp_parse_one_packet(), rtp_write(), and write_hint_packets().
#define NTP_TO_RTP_FORMAT | ( | x | ) | av_rescale((x), INT64_C(1) << 32, 1000000) |
enum RTCPType |
int ff_rtp_get_payload_type | ( | AVFormatContext * | fmt, |
AVCodecParameters * | par, | ||
int | idx | ||
) |
Return the payload type for a given stream used in the given format context.
Static payload types are derived from the codec. Dynamic payload type are derived from the id field in AVStream. The format context private option payload_type overrides both.
fmt | The context of the format |
par | The codec parameters |
idx | The stream index |
Definition at line 90 of file rtp.c.
Referenced by ff_rtp_chain_mux_open(), and rtp_write_header().
int ff_rtp_get_codec_info | ( | AVCodecParameters * | par, |
int | payload_type | ||
) |
Initialize a codec context based on the payload type.
Fill the codec_type and codec_id fields of a codec context with information depending on the payload type; for audio codecs, the channels and sample_rate fields are also filled.
par | The codec parameters |
payload_type | The payload type (the 'PT' field in the RTP header) |
const char* ff_rtp_enc_name | ( | int | payload_type | ) |
Return the encoding name (as defined in http://www.iana.org/assignments/rtp-parameters) for a given payload type.
payload_type | The payload type (the 'PT' field in the RTP header) |
enum AVCodecID ff_rtp_codec_id | ( | const char * | buf, |
enum AVMediaType | codec_type | ||
) |
Return the codec id for the given encoding name and codec type.
buf | A pointer to the string containing the encoding name |
codec_type | The codec type |