libavformat/rtp.c File Reference

#include "avformat.h"
#include "rtp.h"

Go to the source code of this file.

Functions

int ff_rtp_get_codec_info (AVCodecContext *codec, int payload_type)
 Initialize a codec context based on the payload type.
int ff_rtp_get_payload_type (AVCodecContext *codec)
 Return the payload type for a given codec.
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.
enum CodecID ff_rtp_codec_id (const char *buf, enum AVMediaType codec_type)
 Return the codec id for the given encoding name and codec type.

Variables

struct {
   int   pt
   const char   enc_name [6]
   enum AVMediaType   codec_type
   enum CodecID   codec_id
   int   clock_rate
   int   audio_channels
AVRtpPayloadTypes []


Function Documentation

enum CodecID ff_rtp_codec_id ( const char *  buf,
enum AVMediaType  codec_type 
)

Return the codec id for the given encoding name and codec type.

Parameters:
buf A pointer to the string containing the encoding name
codec_type The codec type
Returns:
In case of unknown encoding name, CODEC_ID_NONE is returned; otherwise, the codec id is returned

Definition at line 121 of file rtp.c.

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.

Parameters:
payload_type The payload type (the 'PT' field in the RTP header)
Returns:
In case of unknown payload type or dynamic payload type, a pointer to an empty string is returned; otherwise, a pointer to a string containing the encoding name is returned

Definition at line 109 of file rtp.c.

Referenced by rtp_parse_close(), and rtp_parse_open().

int ff_rtp_get_codec_info ( AVCodecContext codec,
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.

Parameters:
codec The context of the codec
payload_type The payload type (the 'PT' field in the RTP header)
Returns:
In case of unknown payload type or dynamic payload type, a negative value is returned; otherwise, 0 is returned

Definition at line 73 of file rtp.c.

int ff_rtp_get_payload_type ( AVCodecContext codec  ) 

Return the payload type for a given codec.

Parameters:
codec The context of the codec
Returns:
In case of unknown payload type or dynamic payload type, a negative value is returned; otherwise, the payload type (the 'PT' field in the RTP header) is returned.

Definition at line 92 of file rtp.c.

Referenced by rtp_write_header().


Variable Documentation

Definition at line 41 of file rtp.c.

struct { ... } AVRtpPayloadTypes[] [static]

Definition at line 40 of file rtp.c.

Referenced by ff_rtp_get_codec_info().

Definition at line 38 of file rtp.c.

Referenced by avi_read_header(), build_feed_streams(), opt_bitrate(), and opt_codec().

const char enc_name[6]

Definition at line 37 of file rtp.c.

Referenced by ff_rtp_codec_id().

int pt


Generated on Fri Oct 26 02:38:21 2012 for FFmpeg by  doxygen 1.5.8