From 0e31088b6c57e7d495deda0abaf5de5adb2c18fa Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 5 Jul 2012 13:06:07 +0200 Subject: rtmp: Add ff_rtmp_calc_digest_pos() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This function is used for calculating digest position for RTMP handshake packets. Signed-off-by: Martin Storsjö --- libavformat/rtmp.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libavformat/rtmp.h') diff --git a/libavformat/rtmp.h b/libavformat/rtmp.h index 6a19f2e1e1..b9c5f1e430 100644 --- a/libavformat/rtmp.h +++ b/libavformat/rtmp.h @@ -57,4 +57,15 @@ int ff_rtmp_calc_digest(const uint8_t *src, int len, int gap, const uint8_t *key, int keylen, uint8_t *dst); +/** + * Calculate digest position for RTMP handshake packets. + * + * @param buf input buffer (should be 1536 bytes) + * @param off offset in buffer where to start calculating digest position + * @param mod_val value used for computing modulo + * @param add_val value added at the end (after computing modulo) + */ +int ff_rtmp_calc_digest_pos(const uint8_t *buf, int off, int mod_val, + int add_val); + #endif /* AVFORMAT_RTMP_H */ -- cgit v1.2.3