diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2008-10-01 12:37:07 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2008-10-01 12:37:07 +0000 |
commit | 985b05d3c91c9edbf9501307878daa4eba223e1d (patch) | |
tree | 5fdba3d9f659f853beb0140bdae41f23bb35f156 /libavformat/rdt.h | |
parent | 5fbec7919743cbe4509d6967b287d3e663b13e16 (diff) | |
download | ffmpeg-985b05d3c91c9edbf9501307878daa4eba223e1d.tar.gz |
This patch refactors RDT packet header parsing so that it can be used in
rtsp.c to detect the ID of the packet source also in case of TCP streams.
This allows proper playback of RDT streams with multiple stream types, e.g.
audio + video. Accepted by LucaB in "RDT/Realmedia patches #2" thread on ML.
Originally committed as revision 15496 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rdt.h')
-rw-r--r-- | libavformat/rdt.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/rdt.h b/libavformat/rdt.h index 5a13127fb5..2fe11873ac 100644 --- a/libavformat/rdt.h +++ b/libavformat/rdt.h @@ -57,6 +57,20 @@ void ff_rdt_subscribe_rule2(RTPDemuxContext *s, char *cmd, int size, int stream_nr, int rule_nr); /** + * Parse RDT-style packet header. + * + * @param buf input buffer + * @param len length of input buffer + * @param sn will be set to the stream number this packet belongs to + * @param seq will be set to the sequence number this packet belongs to + * @param rn will be set to the rule number this packet belongs to + * @param ts will be set to the timestamp of the packet + * @return the amount of bytes consumed, or <0 on error + */ +int ff_rdt_parse_header(const uint8_t *buf, int len, + int *sn, int *seq, int *rn, uint32_t *ts); + +/** * Parse RDT-style packet data (header + media data). * Usage similar to rtp_parse_packet(). */ |