From fa67dc420958c50b6e6d36cd0f9effc14278893f Mon Sep 17 00:00:00 2001 From: lucabe Date: Sat, 28 Feb 2009 17:24:56 +0000 Subject: [PATCH] Document ff_rtp_get_codec_info() git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17661 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavformat/rtp.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavformat/rtp.h b/libavformat/rtp.h index f340f413c..dbed54e31 100644 --- a/libavformat/rtp.h +++ b/libavformat/rtp.h @@ -33,6 +33,18 @@ */ int ff_rtp_get_payload_type(AVCodecContext *codec); +/** + * 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. + * + * @param codec The context of the codec + * @param payload_type The the payload type (the 'PT' field in the RTP header) + * @return In case of unknown payload type or dynamic payload type, a + * negative value is returned; otherwise, 0 is returned + */ int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type); const char *ff_rtp_enc_name(int payload_type); enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type); -- 2.11.4.GIT