summaryrefslogtreecommitdiff
path: root/libavformat/rtp.h
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-11-11 20:44:28 +0100
committerLuca Barbato <lu_zero@gentoo.org>2012-11-14 20:38:51 +0100
commit8034130e06b03859af9ce64f7ee653cd14df328d (patch)
treeac5d06c32f27347f96c147599f2e6129178c6e1e /libavformat/rtp.h
parent3b4296f41473a5b39e84d7a49d480624c9c60040 (diff)
rtp: set the payload type as stream id
Support multiple video/audio streams with different format in the same session. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/rtp.h')
-rw-r--r--libavformat/rtp.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/rtp.h b/libavformat/rtp.h
index 6df4ed4f19..f8d406ea88 100644
--- a/libavformat/rtp.h
+++ b/libavformat/rtp.h
@@ -25,13 +25,18 @@
#include "libavcodec/avcodec.h"
/**
- * Return the payload type for a given codec used in the given format context.
+ * 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.
*
* @param fmt The context of the format
* @param codec The context of the codec
+ * @param idx The stream index
* @return The payload type (the 'PT' field in the RTP header).
*/
-int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec);
+int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec,
+ int idx);
/**
* Initialize a codec context based on the payload type.