Fix references to deleted avcodec_encode_video() function
mem: Introduce av_reallocp
rtmp: Factor out publish specific code

Will be reused for supporting play.
rtmp: Support play method in listen mode
rtmp: Drop an unneeded warning

Apparently a widely used streaming server requires that the second
field always presents a version during C1 phase.
rtmp: Do not send the first field twice within the handshake
rtmp: Store all the notify messages

The onTextData is used to implement text data streams in flv.
flv: Do not export datastream as metadata

It is used internally.
lavf: Add a flag to enable/disable per-packet flushing

This is enabled by default and can be disabled with
"-fflags -flush_packets".

Inspired by a patch from Nicolas George <nicolas.george@normalesup.org>.

Signed-off-by: Martin Storsjö <martin@martin.st>
lavf: Don't explicitly flush after each written packet in muxers

Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).

Signed-off-by: Martin Storsjö <martin@martin.st>
x86: Add an xmm clobbering wrapper for avcodec_encode_video2

This is required since 187105ff8 when we started trying to
wrap this function as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
lavf: Make probe_codec return an error code

This allows handling errors from av_realloc properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Send video on a separate channel.

Sending non-monotonic packets (e.g. when the audio and video
streams are monotonic within themselves but not muxed
monotonically) will lead to negative values the RTMP timestamp
field (where timestamps are transmitted only as deltas for each
channel), and this delta can end up being incorrectly written as
a large unsigned number.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Follow Flash player numbering for channels.

Channel 4 is typically used by the Flash player to transmit
audio, channel 6 for video, and various stream-specific invokes
get sent over channel 8, which is designated the source channel.

This more closely matches the behavior of the Flash player,
including the transmission of play requests over channel 8.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: rename main_channel_id to stream_id.

This more closely corresponds to the usage of the field.
Its usage here is unrelated to the channel ID.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '187105ff8a02bafc9c58d9d8363bb3f55a415635'

* commit '187105ff8a02bafc9c58d9d8363bb3f55a415635':
  Fix references to deleted avcodec_encode_video() function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
x86: Add an xmm clobbering wrapper for avcodec_encode_video2

This is required since 187105ff8 when we started trying to
wrap this function as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '3feb3d6ce4be0a09a9f8f13d613bed25b523b6e7'

* commit '3feb3d6ce4be0a09a9f8f13d613bed25b523b6e7':
  mem: Introduce av_reallocp

Conflicts:
	doc/APIchanges
	libavutil/mem.c
	libavutil/mem.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '97d35fa89f73468d64f663bfc0686aa6cddd8b6a'

* commit '97d35fa89f73468d64f663bfc0686aa6cddd8b6a':
  rtmp: Factor out publish specific code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'ffb7669e47343ac0caa866361965fdb2bf6ed825'

* commit 'ffb7669e47343ac0caa866361965fdb2bf6ed825':
  rtmp: Support play method in listen mode

Merged-by: Michael Niedermayer <michaelni@gmx.at>