X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtp.h;h=80081ac9eb8d6ec24c54c1adc9f3acd770403d6f;hb=3f2eadf4fe7e91e467501fa7108d2bf49f8c1ae1;hp=dbed54e31da1960d9df88bedd667268fdd368b87;hpb=d3a57949583670dab00713401d469fba013d4c7e;p=ffmpeg diff --git a/libavformat/rtp.h b/libavformat/rtp.h index dbed54e31da..80081ac9eb8 100644 --- a/libavformat/rtp.h +++ b/libavformat/rtp.h @@ -41,12 +41,31 @@ int ff_rtp_get_payload_type(AVCodecContext *codec); * 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) + * @param payload_type 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); + +/** + * Return the encoding name (as defined in + * http://www.iana.org/assignments/rtp-parameters) for a given payload type. + * + * @param payload_type The payload type (the 'PT' field in the RTP header) + * @return 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 + */ const char *ff_rtp_enc_name(int payload_type); + +/** + * Return the codec id for the given encoding name and codec type. + * + * @param buf A pointer to the string containing the encoding name + * @param codec_type The codec type + * @return In case of unknown encoding name, CODEC_ID_NONE is returned; + * otherwise, the codec id is returned + */ enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type); #define RTP_PT_PRIVATE 96