Revert "remove asf demuxer, use one from libavformat instead"

This reverts commit c7a7b16ef1834a855a76ad70641440c78fdbb21c.
options: support parsing values into substructs

Add an alternate mode for option parser objects (struct m_config)
which is not inherently tied to any particular instance of an option
value struct. Instead, this type or parsers can be used to initialize
defaults in or parse values into a struct given as a parameter. They
do not have the save slot functionality used for main player
configuration. The new functionality will be used to replace the
separate subopt_helper.c parsing code that is currently used to parse
per-object suboptions in VOs etc.

Previously, option default values were handled by initializing them in
external code before creating a parser. This initialization was done
with constants even for dynamically-allocated types like strings.
Because trying to free a pointer to a constant would cause a crash
when trying to replace the default with another value, parser
initialization code then replaced all the original defaults with
dynamically-allocated copies. This replace-with-copy behavior is no
longer supported for new-style options; instead the option definition
itself may contain a default value (new OPTDEF macros), and the new
function m_config_initialize() is used to set all options to their
default values. Convert the existing initialized dynamically allocated
options in main config (the string options --dumpfile, --term-osd-esc,
--input=conf) to use this. Other non-dynamic ones could be later
converted to use this style of initialization too.

There's currently no public call to free all dynamically allocated
options in a given option struct because I intend to use talloc
functionality for that (make them children of the struct and free with
it).
options: make option struct the talloc parent of options

Allocate dynamically-allocated option values as talloc children of the
option struct. This will allow implementing per-object (VO etc)
options so that simply freeing the object will free associated options
too.

This doesn't change quite every allocation in m_option.c, but the
exceptions are legacy types which will not matter for new per-object
options.
VO: implement shared option handling, use for vdpau

Add infrastructure that allows VOs to specify the suboptions they
take, and get the values directly parsed into their private struct.
The option functionality available with the new system is the same as
for top-level player options. Convert vo_vdpau to use the new system
instead of the old subopt_helper.
options: fix specifying string options without parameter

Specifying a string option with no parameter, as in "--dumpfile" with
no '=', erroneously set the corresponding variable to NULL. Fix this
to give an error about missing parameter instead.

Suboption parsing explicitly treated empty option values as if the
option had been specified with no value (no '='). Thus it was not
possible to specify empty strings as values. I think this behavior was
originally added only because of other limitations in the old
implementation. Remove it, so that suboptions now behave the same as
top-level ones in this regard.

Document the NULL-distinguishing property of bstrdup0() that the code
depends on, and also make bstrdup() behave consistently.
build: use python3 to generate some files previously in git

Some files used during build are generated with Python scripts in
TOOLS/. Before, the generated files were included in the git tree.
Start creating them at build time. This introduces a build-dependency
on python3.

The files in question are:
libvo/vdpau_template.c
libmpdemux/ebml_types.h
libmpdemux/ebml_defs.c
build, codec-cfg.c: simplify builtin codecs.conf handling

The player can read codec mapping (codecs.conf) from an external file
or use embedded defaults. Before, the defaults were stored in the
player binary in the form of final already-parsed data structures.
Simplify things by storing the text of the codecs.conf file instead,
and parse that at runtime the same way an external file would be
parsed.

To create the previous parsed form, the build system first compiled a
separate binary named "codec-cfg", which parsed etc/codecs.conf and
then wrote the results as a C data structure that could be compiled
into the program. The new simple conversion of codecs.conf into a C
string is handled by the new script TOOLS/file2string.py.

After removing the codec-cfg binary, HOST_CC is no longer used for
anything. Remove the --host-cc configure option and associated logic.

Also remove the codec2html and codec-cfg-test functionality. Building
those was already broken and nobody cared.

There was a broken 3-character-long "fourcc" entry in etc/codecs.conf.
This happened to be accepted before but triggered a parse error after
the changes. Remove the broken entry and make the parsing functions
explicitly test for this error.
vo_vdpau: fix possible crash after preemption

Preemption recovery code could change the vc->vdp pointer when
recreating the VDPAU device. However, some other code cached the value
of vc->vdp in local variables over calls to handle_preemption(), and
could then crash when using the stale value later. Make the device
creation code keep the same vc->vdp instead of freeing and
reallocating it, so that the old pointer value is never invalidated
now.
Makefile: delete .d files in "clean" target too

Previously, .d files were only deleted by "distclean" target. I see no
reason why they should be kept by "clean". Delete them in that target
too.
docs: delete outdated translated manpages/docs

Delete all manpages and XML documentation in languages other than
English. The XML documentation was badly out of date. The content of
translated manpages was somewhat out of date, and manpage formatting
will change to use reStructuredText instead of raw troff format. If
updated translations are created for some languages later, I think
it's better to maintain those outside the main repository.
core: fix attempt to get audio pts without audio

written_audio_pts() can be called even if no audio track is active (at
least through get_current_time() when there's no known video PTS).
This triggered a crash due to NULL dereference. Add a check to return
MP_NOPTS_VALUE if no audio track exists.

Also remove a questionable update_osd_msg() call from per-file
initialization code. The call was at a point where an audio track
might be selected but not properly initialized, possibly also causing
a crash if update_osd_msg() queries current position. I don't see any
reason why the call would have been needed; it should get called
anyway before OSD contents are actually used for the new file.
Support FourCC NO16.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35034 b3059339-0415-0410-9bf9-f77b7e298cf2
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Support Kostya's Expression Encoder Screen Capture decoder.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35022 b3059339-0415-0410-9bf9-f77b7e298cf2
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Support Kostya's TechSmith Camtasia Screen Codec 2 decoder.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35020 b3059339-0415-0410-9bf9-f77b7e298cf2
Signed-off-by: Paul B Mahol <onemda@gmail.com>
dd PLV1 fourcc to ffodivx, works on
http://samples.ffmpeg.org/V-codecs/PLV1/york-water-meteor.avi
output looks same as binary codec

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35021 b3059339-0415-0410-9bf9-f77b7e298cf2
Merge branch 'mplayer2'
Fix py files

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Support FFmpeg APC ADPCM IMA audio decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>