Commit Graph

221 Commits

Author SHA1 Message Date
Michael Niedermayer 5f9b1aae50 Merge commit '6454c44f9f74dbaed17d32cf0eaec185386c27fa'
* commit '6454c44f9f74dbaed17d32cf0eaec185386c27fa':
  rtmpproto: Fix limelight authentication with abbreviated app names

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 13:43:07 +02:00
Martin Storsjö 6454c44f9f rtmpproto: Fix limelight authentication with abbreviated app names
When streaming to limelight, the app name is either a full
"appname/subaccount" or "appname/_definst_". In the latter case,
the app name can be simplified into simply "appname", but the
authentication hashing assumes the /_definst_ still to be present.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-28 17:54:51 +03:00
Michael Niedermayer 15c92f8c48 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Do not misuse memcmp

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:54:37 +02:00
Michael Niedermayer 6c7a05352f Merge commit '8e1fe345577a42f99591caf8a06c447613449694'
* commit '8e1fe345577a42f99591caf8a06c447613449694':
  rtmp: Detect and warn if the user tries to pass librtmp style parameters

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:17:43 +02:00
Michael Niedermayer 06186a3160 Merge commit 'ba5393a609c723ec8ab7f9727c10fef734c09278'
* commit 'ba5393a609c723ec8ab7f9727c10fef734c09278':
  rtmp: rename data_size to size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:11:40 +02:00
Michael Niedermayer a2b0699f4f Merge commit '4ebc7d659f0da6c1305ca08cf4303959203fff4b'
* commit '4ebc7d659f0da6c1305ca08cf4303959203fff4b':
  rtmp: Use PRId64 when needed.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:02:37 +02:00
Luca Barbato 5718e3487b rtmp: Do not misuse memcmp
CC: libav-stable@libav.org
2013-08-11 01:19:27 +02:00
Martin Storsjö 8e1fe34557 rtmp: Detect and warn if the user tries to pass librtmp style parameters
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 18:37:18 +03:00
Luca Barbato ba5393a609 rtmp: rename data_size to size 2013-08-10 13:49:09 +02:00
Luca Barbato 4ebc7d659f rtmp: Use PRId64 when needed. 2013-08-10 13:48:48 +02:00
Michael Niedermayer 8e970a5861 Merge commit '0d6fa3977b016f1b72b0b24b8834ff9222498548'
* commit '0d6fa3977b016f1b72b0b24b8834ff9222498548':
  rtmp: Add seek support

Conflicts:
	Changelog
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 09:01:48 +02:00
Gavriloaie Eugen-Andrei 0d6fa3977b rtmp: Add seek support
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-02 20:11:54 +03:00
Michael Niedermayer 4d4f5911d3 Merge commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f'
* commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f':
  network: factor out bind-listening code
  use my full first name instead of short one in copyrights

Conflicts:
	libavformat/tcp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 10:30:35 +02:00
Kostya Shishkov de421b2085 use my full first name instead of short one in copyrights 2013-06-01 13:38:50 +02:00
Michael Niedermayer efc08e00cc Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'
* commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110':
  vf_aspect: use the name 's' for the pointer to the private context
  Remove commented-out debug #define cruft

Conflicts:
	libavcodec/4xm.c
	libavcodec/dvdsubdec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg12.c
	libavfilter/avfilter.c
	libavfilter/vf_aspect.c
	libavfilter/vf_fieldorder.c
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 09:56:43 +02:00
Diego Biurrun 2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Michael Niedermayer e7dd0365f2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Pass the parameters to do_adobe_auth in the right order

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 12:03:53 +01:00
Martin Storsjö a5e6080a8d rtmp: Pass the parameters to do_adobe_auth in the right order
do_adobe_auth takes the parameters in the order "opaque, challenge".

Due to the way they are treated, this didn't matter in the tested
setups though - if both are set, we only use one. In the tested
setups (Wowza and Akamai) either one of them were null or they
were both set to the same value, which is why this worked before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-20 12:00:28 +02:00
Michael Niedermayer da8ef5ac2f rtmpproto: increase APP_MAX_LENGTH
Fixes second part of Ticket2292

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-23 17:24:15 +01:00
Michael Niedermayer 02ac3398eb rtmpproto: Check APP_MAX_LENGTH
Fixes Ticket2292

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-23 17:18:22 +01:00
Michael Niedermayer 6dc8505417 rtmpproto: Fix assignments in if()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 13:13:00 +02:00
Michael Niedermayer a601eb9543 rtmpproto: Fix assignments in if()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 05:05:42 +01:00
Michael Niedermayer 9336a980bb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Add support for limelight authentication
  rtmp: Add support for adobe authentication

Conflicts:
	Changelog
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-01 14:04:50 +01:00
Michael Niedermayer c047a41bc5 Merge commit '33f28a3be3092f642778253d9529dd66fe2a014a'
* commit '33f28a3be3092f642778253d9529dd66fe2a014a':
  rtmp: Add a function for writing AMF strings based on two substrings
  rtmp: Return a proper error code in handle_invoke_error

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-01 13:54:22 +01:00
Martin Storsjö c1ea44c54d rtmp: Add support for limelight authentication
Limelight is a not too uncommon CDN. The authentication scheme is
pretty similar to the adobe authentication, but is even closer to
normal http digest authentication (but not close enough to warrant
sharing code) than the adobe version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-31 13:39:09 +02:00
Martin Storsjö 08225d0126 rtmp: Add support for adobe authentication
This is mostly used to authenticate the client when publishing.
Tested with wowza and akamai.

Some but not all servers support resending a new connect invoke
within the same connection, so always reconnect for sending a new
connection attempt. This matches what other applications do as well.

The authentication scheme is structurally pretty similar to http
digest authentication, but uses base64 instead of hex strings.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-31 13:39:08 +02:00
Martin Storsjö c76daa89ab rtmp: Return a proper error code in handle_invoke_error
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-31 13:39:06 +02:00
Martin Storsjö f0615557e0 rtmpproto: Use av_strlcat instead of strncat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Fixes: [FFmpeg-devel] rtmpproto compile error
Similar patch: [FFmpeg-devel] [PATCH] call to strncat replaced with av_strlcat to avoid compile issue with systems implementing strncat via strcat.
2012-11-05 21:47:43 +01:00
Martin Storsjö d578f94746 rtmp: Use av_strlcat instead of strncat
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-05 15:37:09 +02:00
Michael Niedermayer 3a8b66af6c rtmp_write_amf_data: remove dead code
Fixes CID732199
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 22:57:30 +02:00
Michael Niedermayer f391e405df Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'
* commit 'e002e3291e6dc7953f843abf56fc14f08f238b21':
  Use the new aes/md5/sha/tree allocation functions
  avutil: Add functions for allocating opaque contexts for algorithms
  svq3: fix pointer type warning
  svq3: replace unsafe pointer casting with intreadwrite macros
  parseutils-test: various cleanups

Conflicts:
	doc/APIchanges
	libavcodec/svq3.c
	libavutil/parseutils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:52:34 +02:00
Michael Niedermayer 5a75924dfd rtmpproto: fix out of array write
Fixes CID732263
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 02:06:51 +02:00
Martin Storsjö e002e3291e Use the new aes/md5/sha/tree allocation functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:28 +03:00
Michael Niedermayer 23e9e5c7d9 rtmpproto: reorder some expressions to fix compilation with clang without optimizations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-12 05:17:52 +02:00
Michael Niedermayer d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Michael Niedermayer d5f65e9d40 Merge commit '124134e42455763b28cc346fed1d07017a76e84e'
* commit '124134e42455763b28cc346fed1d07017a76e84e':
  avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Conflicts:
	libavcodec/aacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/options_table.h
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/vf_drawtext.c
	libavformat/movenc.c
	libavformat/options_table.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 13:58:11 +02:00
Martin Storsjö e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö 124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer 104f42e694 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doc/APIchanges: add an entry for codec descriptors.
  vorbisenc: set AVCodecContext.bit_rate to 0
  vorbisenc: fix quality parameter
  FATE: add ALAC encoding tests
  lpc: fix alignment of windowed samples for odd maximum LPC order
  alacenc: use s16p sample format as input
  alacenc: remove unneeded sample_fmt check
  alacenc: fix max_frame_size calculation for the final frame
  adpcm_swf: Use correct sample offsets when using trellis.
  rtmp: support strict rtmp servers
  mjpegdec: support AVRn interlaced
  x86: remove FASTDIV inline asm

Conflicts:
	doc/APIchanges
	libavcodec/mjpegdec.c
	libavcodec/vorbisenc.c
	libavutil/x86/intmath.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-23 14:33:33 +02:00
Samuel Pitoiset 7011a42b1a rtmp: support strict rtmp servers
In order to send or receive a stream FCPublish, FCSubscribe and _checkbw
are completely optional and often not implemented. releaseStream over a
non-existen stream might report an error instead of being silent.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-08-22 17:55:17 +02:00
Michael Niedermayer fa3fde168b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libvpxenc: use the default bitrate if not set
  utvideo: Rename utvideo.c to utvideodec.c
  doc: Fix syntax errors in sample Emacs config
  mjpegdec: more meaningful return values
  configure: clean up Altivec detection
  getopt: Remove an unnecessary define
  rtmp: Use int instead of ssize_t
  getopt: Add missing includes
  rtmp: Add support for receiving incoming streams
  Add missing includes for code relying on external libraries

Conflicts:
	libavcodec/libopenjpegenc.c
	libavcodec/libvpxenc.c
	libavcodec/mjpegdec.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-17 17:06:52 +02:00
Martin Storsjö cb5ab02a88 rtmp: Use int instead of ssize_t
Not all compilers support ssize_t (MSVC doesn't), and none of these
variables need to be larger than 32 bit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 23:02:26 +03:00
Jordi Ortiz e5f2731c73 rtmp: Add support for receiving incoming streams
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 18:13:41 +03:00
Michael Niedermayer c581cb4e4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix even more missing includes after the common.h removal
  build: Factor out rangecoder dependencies to CONFIG_RANGECODER
  build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
  x86: avcodec: Consistently name all init files
  Add more missing includes after removing the implicit common.h
  Add some more missing includes after removing the implicit common.h
  Don't include common.h from avutil.h
  rtmp: Automatically compute the hash for SWFVerification

Conflicts:
	configure
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/Makefile
	libavcodec/assdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/avpacket.c
	libavcodec/dv_profile.c
	libavcodec/dwt.c
	libavcodec/libtheoraenc.c
	libavcodec/rawdec.c
	libavcodec/rv40dsp.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.h
	libavcodec/vc1dsp.c
	libavcodec/x86/Makefile
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/buffer.c
	libavfilter/formats.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_select.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/version.h
	libavutil/audioconvert.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00
Samuel Pitoiset 93f257db6b rtmp: Automatically compute the hash for SWFVerification
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:05:36 +03:00
Michael Niedermayer 9e89bc37ed Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Add support for SWFVerification
  api-example: use new video encoding API.
  x86: avcodec: Appropriately name files containing only init functions
  mpegvideo_mmx_template: drop some commented-out cruft
  libavresample: add mix level normalization option
  w32pthreads: Add missing #includes to make header compile standalone
  rtmp: Gracefully ignore _checkbw errors by tracking them
  rtmp: Do not send _checkbw calls as notifications
  prores: interlaced ProRes encoding

Conflicts:
	doc/examples/decoding_encoding.c
	libavcodec/proresenc_kostya.c
	libavcodec/w32pthreads.h
	libavcodec/x86/Makefile
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-15 15:55:24 +02:00
Samuel Pitoiset 635ac8e1be rtmp: Add support for SWFVerification
Specifies how the server verifies client SWF files before allowing the
files to connect to an application. Verifying SWF files is a security
measure that prevents someone from creating their own SWF files that can
attempt to stream your resources.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 10:37:34 +03:00
Samuel Pitoiset fb7e78089b rtmp: Gracefully ignore _checkbw errors by tracking them
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-14 22:36:35 +03:00
Samuel Pitoiset 8b6a5a7923 rtmp: Do not send _checkbw calls as notifications
The _checkbw calls were changed to use transactionId 0 in commit
82613564 so that servers would not return _result/_error about it.
While this is the strict interpretation of the spec, there are
servers that return _error about it, even if transactionId was 0.

The latest version of EvoStream Media Server (the commercial version
of crtmpserver) behaves properly as described, i.e. returning an
_error normally but not returning anything when using transactionId
0. The latest version of crtmpserver (right now at least) doesn't
behave like this though, it returns an error even if transactionId
was 0.

There are also other servers that return errors even if transactionId
is set to 0. Therefore set a proper transaction id so that the invoke
can be tracked and the error properly ignored instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-14 22:31:53 +03:00
Michael Niedermayer 7427d1ca4a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  g723.1: simplify scale_vector()
  g723.1: simplify normalize_bits()
  vda: cosmetics: fix Doxygen comment formatting
  vda: better frame allocation
  vda: Merge implementation into one file
  vda: support synchronous decoding
  vda: Reuse the bitstream buffer and reallocate it only if needed
  build: Factor out mpegvideo encoding dependencies to CONFIG_MPEGVIDEOENC
  avprobe: Include libm.h for the log2 fallback
  proresenc: use the edge emulation buffer
  rtmp: handle bytes read reports
  configure: Fix typo in mpeg2video/svq1 decoder dependency declaration
  Use log2(x) instead of log(x) / log(2)
  x86: swscale: fix fragile memory accesses
  x86: swscale: remove disabled code
  x86: yadif: fix asm with suncc
  x86: cabac: allow building with suncc
  x86: mlpdsp: avoid taking address of void
  ARM: intmath: use native-size return types for clipping functions

Conflicts:
	configure
	ffprobe.c
	libavcodec/Makefile
	libavcodec/g723_1.c
	libavcodec/v210dec.h
	libavcodec/vda.h
	libavcodec/vda_h264.c
	libavcodec/x86/cabac.h
	libavfilter/x86/yadif_template.c
	libswscale/x86/rgb2rgb_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-14 15:34:39 +02:00