~ubuntu-branches/ubuntu/saucy/gst-libav1.0/saucy-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavformat/rtmp.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-07-30 09:00:15 UTC
  • mfrom: (1.1.16) (7.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130730090015-sc1ou2yssu7q5w4e
Tags: 1.1.3-1
* New upstream development snapshot:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.1.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "avformat.h"
26
26
 
27
27
#define RTMP_DEFAULT_PORT 1935
 
28
#define RTMPS_DEFAULT_PORT 443
28
29
 
29
30
#define RTMP_HANDSHAKE_PACKET_SIZE 1536
30
31
 
 
32
#define HMAC_IPAD_VAL 0x36
 
33
#define HMAC_OPAD_VAL 0x5C
 
34
 
31
35
/**
32
36
 * emulated Flash client version - 9.0.124.2 on Linux
33
37
 * @{
39
43
#define RTMP_CLIENT_VER4    2
40
44
/** @} */ //version defines
41
45
 
 
46
/**
 
47
 * Calculate HMAC-SHA2 digest for RTMP handshake packets.
 
48
 *
 
49
 * @param src    input buffer
 
50
 * @param len    input buffer length (should be 1536)
 
51
 * @param gap    offset in buffer where 32 bytes should not be taken into account
 
52
 *               when calculating digest (since it will be used to store that digest)
 
53
 * @param key    digest key
 
54
 * @param keylen digest key length
 
55
 * @param dst    buffer where calculated digest will be stored (32 bytes)
 
56
 */
 
57
int ff_rtmp_calc_digest(const uint8_t *src, int len, int gap,
 
58
                        const uint8_t *key, int keylen, uint8_t *dst);
 
59
 
 
60
/**
 
61
 * Calculate digest position for RTMP handshake packets.
 
62
 *
 
63
 * @param buf input buffer (should be 1536 bytes)
 
64
 * @param off offset in buffer where to start calculating digest position
 
65
 * @param mod_val value used for computing modulo
 
66
 * @param add_val value added at the end (after computing modulo)
 
67
 */
 
68
int ff_rtmp_calc_digest_pos(const uint8_t *buf, int off, int mod_val,
 
69
                            int add_val);
 
70
 
42
71
#endif /* AVFORMAT_RTMP_H */