lavc/dnxhd: ff_dnxhd_cid_table is not exported

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
http: Stop reading after receiving the whole file for non-chunked transfers

Previously this logic was only used if the server didn't
respond with Connection: close, but use it even for that case,
if the server response is non-chunked.

Originally the http code has relied on Connection: close to close
the socket when the file/stream is received - the http protocol
code just kept reading from the socket until the socket was closed.
In f240ed18 we added a check for the file size, because some
http servers didn't respond with Connection: close (and wouldn't
close the socket) even though we requested it, which meant that the
http protocol blocked for a long time at the end of files, waiting
for a socket level timeout.

When reading over tls, trying to read at the end of the connection,
when the peer has closed the connection, can produce spurious (but
harmless) warnings. Therefore always voluntarily stop reading when
the specified file size has been received, if not using a chunked
transfer encoding. (For chunked transfers, we already return 0
as soon as we get the chunk header indicating end of stream.)

Signed-off-by: Martin Storsjö <martin@martin.st>
w32threads: Use newer thread synchronization functions when targeting Vista

When explicitly targeting Vista or newer (which only happens if the
caller explicitly sets _WIN32_WINNT to a high enough value via the
extra cflags option - otherwise configure script sets
-D_WIN32_WINNT=0x0502), we already unconditionally link to the
ConditionVariable functions, since 4622f11f9.

Similarly use the newer -Ex versions of CreateEvent, CreateSemaphore,
InitializeCriticalSection and WaitForSingleObject, that all appeared
in Vista. When building Windows Store applications, the older versions
of these functions aren't available, only the -Ex functions. When
doing such a build, the user can set -D_WIN32_WINNT=0x0600 to
forcibly use the newer functions instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure: Check for nanosleep in headers as well, not only in libs

On mingw64 with c++11 support, the link libraries do contain a
nanosleep function, while it isn't exposed via the headers. Using
check_func_headers instead of a plain check_func fixes this
misdetection.

Signed-off-by: Martin Storsjö <martin@martin.st>
avutil: turn arm setend into a cpuflag

this allows disabling and enabling it
it also prevents crashes if vfpv3 and neon are disabled which previously
would have enabled the flag

And last but not least one can enable setend on cpus like cortex-a8 where
its fast but disabled by default

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfitler/vf_perspective: support slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
lavf: add AVFormatContext/AVStream fields for signaling to the user when events happen.

The only flags, for now, indicate if metadata was updated and are set after each call to
av_read_frame(). This comes with the caveat that, on stream start, it might not be set properly
as packets might be buffered in AVFormatContext.packet_buffer before being given to the user
in av_read_frame().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
AVOption: add support for dictionary types.

In order to support metadata being set as an option, it's necessary to be able
to set dictionaries as values.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
http: export icecast metadata as an option with name "metadata".

Signed-off-by: Anton Khirnov <anton@khirnov.net>
http: enable icy metadata by default.

It won't hurt servers that don't care about the header,
and those that do will include it by default.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Set protocol-level metadata in AVFormatContext any time a packet is read.

If any option named "metadata" is set inside the context, it is pulled up to
the context and then the option is cleared.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Expose metadata found in onCuePoint events in .flv files.

Currently, only onMetaData is used, but some providers (wrongly)
put metadata into onCuePoint events, and it's still nice to be
able to use that data.

onCuePoint events also present metadata slightly differently than
onMetaData events: all metadata is found inside an object called
"parameters". In order to extract this metadata, it's easiest to
recurse through the object tree and pull out anything found in
child objects and put it in the top-level metadata.

Reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/2/help.html?content=00001404.html

Signed-off-by: Anton Khirnov <anton@khirnov.net>
doc/filters: correct confusing statements about *showinfo shown values

Fix trac issue #3850.
flvdec: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
mov: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.

Originally, AVFormatContext and a metadata dict were provided to ff_vorbis_comment(),
but this presented issues if an AVStream was being updated or the metadata on
AVFormatContext wasn't actually being updated. To remedy this, ff_vorbis_stream_comment()
explicitly updates a stream's metadata and sets any necessary flags.

ff_vorbis_comment() does not modify any flags, and any calls to it that update
AVFormatContext's metadata (just a single call) must also update
AVFormatContext.event_flags after detecting any metadata changes to the provided
dictionary, as signaled by a positive return value.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merge commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f'

* commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f':
  http: Stop reading after receiving the whole file for non-chunked transfers

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

* commit '428b0578c64241fc677fed7083cc8fe65e10f32e':
  w32threads: Use newer thread synchronization functions when targeting Vista

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

* commit '72199e1041b4052544e181ad90b431ca6704da12':
  configure: Check for nanosleep in headers as well, not only in libs

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