]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtmp.h
dashenc: copy language and role metadata from streams assigned to sets
[ffmpeg] / libavformat / rtmp.h
index f9d99002683021c6c86266fbcd2324a2785b6253..f3390a1f47026fbc65325ce5a3c8363296863aae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * RTMP definitions
- * Copyright (c) 2009 Kostya Shishkov
+ * Copyright (c) 2009 Konstantin Shishkov
  *
  * This file is part of Libav.
  *
 #define RTMP_CLIENT_VER4    2
 /** @} */ //version defines
 
+/**
+ * Calculate HMAC-SHA2 digest for RTMP handshake packets.
+ *
+ * @param src    input buffer
+ * @param len    input buffer length (should be 1536)
+ * @param gap    offset in buffer where 32 bytes should not be taken into account
+ *               when calculating digest (since it will be used to store that digest)
+ * @param key    digest key
+ * @param keylen digest key length
+ * @param dst    buffer where calculated digest will be stored (32 bytes)
+ */
+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 */