mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: rtmp: Add credit/copyright to librtmp authors for parts of the RTMPE code rtmp: Move the CONFIG_ condition into the if conditions aac: Mention abbreviation as well in long_name build: Skip compiling rtmpdh.h if ffrtmpcrypt protocol is not enabled doc: Add Git configuration section configure: Add a dependency on https for rtmpts rtp: Only choose static payload types if the sample rate and channels are right Conflicts: doc/git-howto.texi libavformat/rtmpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
93342de1d8
@ -258,6 +258,32 @@ git commit
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
|
||||||
|
@chapter Git configuration
|
||||||
|
|
||||||
|
In order to simplify a few workflows, it is advisable to configure both
|
||||||
|
your personal Git installation and your local FFmpeg repository.
|
||||||
|
|
||||||
|
@section Personal Git installation
|
||||||
|
|
||||||
|
Add the following to your @file{~/.gitconfig} to help @command{git send-email}
|
||||||
|
and @command{git format-patch} detect renames:
|
||||||
|
|
||||||
|
@example
|
||||||
|
[diff]
|
||||||
|
renames = copy
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@section Repository configuration
|
||||||
|
|
||||||
|
In order to have @command{git send-email} automatically send patches
|
||||||
|
to the ffmpeg-devel mailing list, add the following stanza
|
||||||
|
to @file{/path/to/ffmpeg/repository/.git/config}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
[sendemail]
|
||||||
|
to = ffmpeg-devel@@ffmpeg.org
|
||||||
|
@end example
|
||||||
|
|
||||||
@chapter FFmpeg specific
|
@chapter FFmpeg specific
|
||||||
|
|
||||||
@section Reverting broken commits
|
@section Reverting broken commits
|
||||||
|
@ -2892,7 +2892,7 @@ AVCodec ff_aac_decoder = {
|
|||||||
.init = aac_decode_init,
|
.init = aac_decode_init,
|
||||||
.close = aac_decode_close,
|
.close = aac_decode_close,
|
||||||
.decode = aac_decode_frame,
|
.decode = aac_decode_frame,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
|
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
|
@ -398,6 +398,7 @@ OBJS-$(CONFIG_TCP_PROTOCOL) += tcp.o
|
|||||||
OBJS-$(CONFIG_TLS_PROTOCOL) += tls.o
|
OBJS-$(CONFIG_TLS_PROTOCOL) += tls.o
|
||||||
OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
|
OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
|
||||||
|
|
||||||
|
SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h
|
||||||
SKIPHEADERS-$(CONFIG_NETWORK) += network.h rtsp.h
|
SKIPHEADERS-$(CONFIG_NETWORK) += network.h rtsp.h
|
||||||
TESTPROGS = seek
|
TESTPROGS = seek
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* RTMPE network protocol
|
* RTMPE network protocol
|
||||||
|
* Copyright (c) 2008-2009 Andrej Stepanchuk
|
||||||
|
* Copyright (c) 2009-2010 Howard Chu
|
||||||
* Copyright (c) 2012 Samuel Pitoiset
|
* Copyright (c) 2012 Samuel Pitoiset
|
||||||
*
|
*
|
||||||
* This file is part of FFmpeg.
|
* This file is part of FFmpeg.
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* RTMP Diffie-Hellmann utilities
|
* RTMP Diffie-Hellmann utilities
|
||||||
|
* Copyright (c) 2009 Andrej Stepanchuk
|
||||||
|
* Copyright (c) 2009-2010 Howard Chu
|
||||||
* Copyright (c) 2012 Samuel Pitoiset
|
* Copyright (c) 2012 Samuel Pitoiset
|
||||||
*
|
*
|
||||||
* This file is part of FFmpeg.
|
* This file is part of FFmpeg.
|
||||||
|
@ -719,7 +719,6 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
int i;
|
int i;
|
||||||
int server_pos, client_pos;
|
int server_pos, client_pos;
|
||||||
uint8_t digest[32], signature[32];
|
uint8_t digest[32], signature[32];
|
||||||
#define encrypted (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted)
|
|
||||||
int ret, type = 0;
|
int ret, type = 0;
|
||||||
|
|
||||||
av_log(s, AV_LOG_DEBUG, "Handshaking...\n");
|
av_log(s, AV_LOG_DEBUG, "Handshaking...\n");
|
||||||
@ -729,7 +728,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++)
|
for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++)
|
||||||
tosend[i] = av_lfg_get(&rnd) >> 24;
|
tosend[i] = av_lfg_get(&rnd) >> 24;
|
||||||
|
|
||||||
if (encrypted) {
|
if (rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL) {
|
||||||
/* When the client wants to use RTMPE, we have to change the command
|
/* When the client wants to use RTMPE, we have to change the command
|
||||||
* byte to 0x06 which means to use encrypted data and we have to set
|
* byte to 0x06 which means to use encrypted data and we have to set
|
||||||
* the flash version to at least 9.0.115.0. */
|
* the flash version to at least 9.0.115.0. */
|
||||||
@ -745,7 +744,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, encrypted);
|
client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, rt->encrypted);
|
||||||
if (client_pos < 0)
|
if (client_pos < 0)
|
||||||
return client_pos;
|
return client_pos;
|
||||||
|
|
||||||
@ -799,7 +798,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (encrypted) {
|
if (rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL) {
|
||||||
/* Compute the shared secret key sent by the server and initialize
|
/* Compute the shared secret key sent by the server and initialize
|
||||||
* the RC4 encryption. */
|
* the RC4 encryption. */
|
||||||
if ((ret = ff_rtmpe_compute_secret_key(rt->stream, serverdata + 1,
|
if ((ret = ff_rtmpe_compute_secret_key(rt->stream, serverdata + 1,
|
||||||
@ -829,7 +828,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (encrypted) {
|
if (rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL) {
|
||||||
/* Encrypt the signature to be send to the server. */
|
/* Encrypt the signature to be send to the server. */
|
||||||
ff_rtmpe_encrypt_sig(rt->stream, tosend +
|
ff_rtmpe_encrypt_sig(rt->stream, tosend +
|
||||||
RTMP_HANDSHAKE_PACKET_SIZE - 32, digest,
|
RTMP_HANDSHAKE_PACKET_SIZE - 32, digest,
|
||||||
@ -841,13 +840,13 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
RTMP_HANDSHAKE_PACKET_SIZE)) < 0)
|
RTMP_HANDSHAKE_PACKET_SIZE)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (encrypted) {
|
if (rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL) {
|
||||||
/* Set RC4 keys for encryption and update the keystreams. */
|
/* Set RC4 keys for encryption and update the keystreams. */
|
||||||
if ((ret = ff_rtmpe_update_keystream(rt->stream)) < 0)
|
if ((ret = ff_rtmpe_update_keystream(rt->stream)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (encrypted) {
|
if (rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL) {
|
||||||
/* Compute the shared secret key sent by the server and initialize
|
/* Compute the shared secret key sent by the server and initialize
|
||||||
* the RC4 encryption. */
|
* the RC4 encryption. */
|
||||||
if ((ret = ff_rtmpe_compute_secret_key(rt->stream, serverdata + 1,
|
if ((ret = ff_rtmpe_compute_secret_key(rt->stream, serverdata + 1,
|
||||||
@ -865,7 +864,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
RTMP_HANDSHAKE_PACKET_SIZE)) < 0)
|
RTMP_HANDSHAKE_PACKET_SIZE)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (encrypted) {
|
if (rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL) {
|
||||||
/* Set RC4 keys for encryption and update the keystreams. */
|
/* Set RC4 keys for encryption and update the keystreams. */
|
||||||
if ((ret = ff_rtmpe_update_keystream(rt->stream)) < 0)
|
if ((ret = ff_rtmpe_update_keystream(rt->stream)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
@ -874,7 +873,6 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#undef encrypted
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse received packet and possibly perform some action depending on
|
* Parse received packet and possibly perform some action depending on
|
||||||
|
@ -110,9 +110,17 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec)
|
|||||||
!fmt->oformat->priv_class ||
|
!fmt->oformat->priv_class ||
|
||||||
!av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
|
!av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
|
||||||
continue;
|
continue;
|
||||||
if (codec->codec_id == CODEC_ID_PCM_S16BE)
|
/* G722 has 8000 as nominal rate even if the sample rate is 16000,
|
||||||
if (codec->channels != AVRtpPayloadTypes[i].audio_channels)
|
* see section 4.5.2 in RFC 3551. */
|
||||||
continue;
|
if (codec->codec_id == CODEC_ID_ADPCM_G722 &&
|
||||||
|
codec->sample_rate == 16000 && codec->channels == 1)
|
||||||
|
return AVRtpPayloadTypes[i].pt;
|
||||||
|
if (codec->codec_type == AVMEDIA_TYPE_AUDIO &&
|
||||||
|
((AVRtpPayloadTypes[i].clock_rate > 0 &&
|
||||||
|
codec->sample_rate != AVRtpPayloadTypes[i].clock_rate) ||
|
||||||
|
(AVRtpPayloadTypes[i].audio_channels > 0 &&
|
||||||
|
codec->channels != AVRtpPayloadTypes[i].audio_channels)))
|
||||||
|
continue;
|
||||||
return AVRtpPayloadTypes[i].pt;
|
return AVRtpPayloadTypes[i].pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
484aeef3be3eb4deef05c83bdc2dd484 *./tests/data/lavf/lavf.mov
|
2c58e6422013d9cd6169f272ffba7a33 *./tests/data/lavf/lavf.mov
|
||||||
367346 ./tests/data/lavf/lavf.mov
|
367373 ./tests/data/lavf/lavf.mov
|
||||||
./tests/data/lavf/lavf.mov CRC=0x2f6a9b26
|
./tests/data/lavf/lavf.mov CRC=0x2f6a9b26
|
||||||
21b992f6a677f971dfd685cc055a2b0a *./tests/data/lavf/lavf.mov
|
21b992f6a677f971dfd685cc055a2b0a *./tests/data/lavf/lavf.mov
|
||||||
358463 ./tests/data/lavf/lavf.mov
|
358463 ./tests/data/lavf/lavf.mov
|
||||||
|
Loading…
Reference in New Issue
Block a user