omxil: Skip a kinda-broken samsung mp3 decoder

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: Set the right channel mode for aac/mp3

This doesn't seem to have any effect in practice, but it does make
the code more correct.

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: Set OMX_AUDIO_AACStreamFormatMP4FF for AAC

This does work with the Samsung AAC decoder (which seems to support
both), while the google SW AAC decoder doesn't support the previous
value (but works fine with this one).

As far as I can read the specs, the two formats are identical (one
is defined as "AAC inside MPEG-4/ISO File Format" while the other
one is defined as "AAC Raw Format (access units)").

The Android media stack seems to be using this one internally
(with a bunch of references to this one, and no references to the
RAW one), which is a good indication that at least most android
AAC decoders should be able to handle it.

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: Don't require SetAudioParameters on the decoder output port to succeed

It's mostly enough to call it on the input port, while we later get
back what the decoder itself set on the output port (based on the
input port and codec config data), so if this fails, just ignore it.

This is required for using google SW audio codecs via OMX, which is
useful mostly for testing. (Using them still requires a few more
hacks though.)

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: Make sure i_channels is nonzero before dividing by it

At startup of the decoder, i_channels might be set to 0 if the decoder
hasn't processed the sent CODECCONFIG data yet. (In these cases, the
returned buffers are 0 bytes long so we don't miss anything either.)
A port reconfigure event is sent in these cases, so i_channels gets
initialized to the right value before we handle any later buffers with
actual content.

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: If OMX_IndexParamVideoInit failed, assume 2 ports with index 0 and 1

This is required to use the OMX.google.* sw decoder components
(which are useful for testing).

Only do this workaround on android builds for now, to limit the
scope of the hack.

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: Factorize samsung decoder quirk identification to a separate function

Previously, we tried to see if the samsung decoder name followed
a certain pattern (ending .Decoder, for good decoders, assuming
we should ignore the padding specified by all other samsung
decoders). This simple pattern didn't turn out to apply for some
other deocders, so instead explicitly list the components that
we know we should ignore the specified padding values.

Also refactor the same check from both the omxil and mediacodec
files into one utility function.

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: Use the role names video_decoder.wmv1/2

The role name without a suffix, "video_decoder.wmv", is only for
vc1/wmv3/9 (on Samsung Galaxy S III at least). Since certain roles
are substrings of others, require the full string to match when looking
for suitable codecs instead of using strncmp.

Signed-off-by: Martin Storsjö <martin@martin.st>
Revert "omxil: Set the WMV type"

This reverts commit c73e88ce9a79f1b76e7e6a9ec1cf5781555994a5.

The WMV1/2 decoders use a different role name, and this parameter
is unsupported on them. Therefore, there's not much use in trying to
set it at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: Only try to enable the samsung-specific 420p mode on video decoders

It doesn't make any sense for audio decoders and only leads to
extra log warnings.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure: remove a wrongly placed test

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
src: Win32: add message categories to debug logs

Signed-off-by: Rafaël Carré <funman@videolan.org>
too long timeouts in win32 vlc_poll

When vlc_poll is called with timeout of i.e. 5000ms it may happen that the
waiting time might be as long as 2500s ! Probably poll should be called with
the 50ms timeout as many times until the original provided timeout has been
reached.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
macosx: fixed compilation warning and potential runtime exception
NEWS: announce that the infamous audio output failure on TASCAM's USD-based MIDI-interfaces is fixed
live555 : Add an option to change the frame buffer size, and increase the default value a little.
Closes #8103
omxil: Remove a few audio codec mappings

This reverts most of 2b101ff4a0.

VLC_CODEC_MP3 seems to work fine with multiple OMX mp3 decoders,
so keep it mapped.

VLC_CODEC_MPGA does work with some OMX mp3 decoders (OMX.SEC.mp3.dec
seems to handle it) but not with all (OMX.google.mp3.decoder doesn't
seem to handle it).

Vorbis does not work with OMX decoders in the current form. The only
such decoder I've seen is OMX.google.vorbis.decoder, and using it
requires us to modify the packets sent a little. Even if this can be
done pretty easily, the packet format feels more like an android
internal hack than an official spec of any sort, so disable this
mapping since there isn't much value in using it currently.

WMA does not work with OMX in the current form (tested with
OMX.SEC.wma.dec). I've got work in progress code that makes certain
WMA files work with it, but not all, so disable it until at least
most of them work properly.
audioqueue: don't avoid impossible case

Play() should always be fed with valid block_t *
live555: buffer sizes are not considered safe

...so far.
libvlc_audio_set_track: return -1 on error

Surprisingly, my gcc did not generate a possible unitilization warning.