* qatar/master: (23 commits) build: cosmetics: Reorder some lists in a more logical fashion x86: pngdsp: Fix assembly for OS/2 fate: add test for RTjpeg in nuv with frameheader rtmp: send check_bw as notification g723_1: clip argument for 15-bit version of normalize_bits() g723_1: use all LPC vectors in formant postfilter id3v2: Support v2.2 PIC avplay: fix build with lavfi disabled. avconv: split configuring filter configuration to a separate file. avconv: split option parsing into a separate file. mpc8: do not leave padding after last frame in buffer for the next decode call mpegaudioenc: list supported channel layouts. mpegaudiodec: don't print an error on > 1 frame in a packet. api-example: update to new audio encoding API. configure: add --enable/disable-random option doc: cygwin: Update list of FATE package requirements build: Remove all installed headers and header directories on uninstall build: change checkheaders to use regular build rules rtmp: Add a new option 'rtmp_subscribe' rtmp: Add support for subscribing live streams ... Conflicts: Makefile common.mak configure doc/examples/decoding_encoding.c ffmpeg.c libavcodec/g723_1.c libavcodec/mpegaudiodec.c libavcodec/x86/pngdsp.asm libavformat/version.h library.mak tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
		
			
				
	
	
		
			81 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * RTMP definitions
 | 
						|
 * Copyright (c) 2009 Kostya Shishkov
 | 
						|
 *
 | 
						|
 * This file is part of FFmpeg.
 | 
						|
 *
 | 
						|
 * FFmpeg is free software; you can redistribute it and/or
 | 
						|
 * modify it under the terms of the GNU Lesser General Public
 | 
						|
 * License as published by the Free Software Foundation; either
 | 
						|
 * version 2.1 of the License, or (at your option) any later version.
 | 
						|
 *
 | 
						|
 * FFmpeg is distributed in the hope that it will be useful,
 | 
						|
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
						|
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
						|
 * Lesser General Public License for more details.
 | 
						|
 *
 | 
						|
 * You should have received a copy of the GNU Lesser General Public
 | 
						|
 * License along with FFmpeg; if not, write to the Free Software
 | 
						|
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef AVFORMAT_RTMP_H
 | 
						|
#define AVFORMAT_RTMP_H
 | 
						|
 | 
						|
#include "avformat.h"
 | 
						|
 | 
						|
#define RTMP_DEFAULT_PORT 1935
 | 
						|
#define RTMPS_DEFAULT_PORT 443
 | 
						|
 | 
						|
#define RTMP_HANDSHAKE_PACKET_SIZE 1536
 | 
						|
 | 
						|
#define HMAC_IPAD_VAL 0x36
 | 
						|
#define HMAC_OPAD_VAL 0x5C
 | 
						|
 | 
						|
/**
 | 
						|
 * A non-zero transaction id requires the server to send back
 | 
						|
 * a _result or _error response.
 | 
						|
 * Setting it to 0 marks the message as a notification not
 | 
						|
 * requiring feedback.
 | 
						|
 */
 | 
						|
 | 
						|
#define RTMP_NOTIFICATION 0
 | 
						|
 | 
						|
/**
 | 
						|
 * emulated Flash client version - 9.0.124.2 on Linux
 | 
						|
 * @{
 | 
						|
 */
 | 
						|
#define RTMP_CLIENT_PLATFORM "LNX"
 | 
						|
#define RTMP_CLIENT_VER1    9
 | 
						|
#define RTMP_CLIENT_VER2    0
 | 
						|
#define RTMP_CLIENT_VER3  124
 | 
						|
#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 */
 |