Mario Speiß [Sun, 3 Feb 2013 17:25:35 +0000 (19:25 +0200)]
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.
Martin Storsjö [Sat, 2 Feb 2013 13:22:32 +0000 (15:22 +0200)]
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.
Martin Storsjö [Sat, 2 Feb 2013 14:33:13 +0000 (16:33 +0200)]
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.
Martin Storsjö [Fri, 1 Feb 2013 10:53:22 +0000 (12:53 +0200)]
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.
Martin Storsjö [Wed, 11 Apr 2012 16:25:36 +0000 (19:25 +0300)]
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.)
Martin Storsjö [Wed, 30 Jan 2013 19:23:45 +0000 (21:23 +0200)]
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.
Martin Storsjö [Tue, 29 Jan 2013 15:55:09 +0000 (17:55 +0200)]
omxil: Wait for the right event when deinitializing
Previously, we checked that the event queue had an OMX_EventCmdComplete
item, but we didn't make sure that it was for the previously issued
OMX_CommandStateSet. In many cases, it was from a OMX_CommandFlush,
which made the code proceed with other deinitialization. If the decoder
hadn't actually transitioned to idle state yet, the buffers weren't
actually ever freed (in the state == OMX_StateIdle block), which lead
to crashes when the handle was freed at the end.
This fixes crashes when finishing playback of wmv3 videos on Galaxy S3.
Martin Storsjö [Tue, 29 Jan 2013 15:55:07 +0000 (17:55 +0200)]
omxil: Pass extradata for WMV3 according to OMX specs
Some OMX decoders that can handle WMV3 (such as the broadcom one
in raspberry pi) can handle the WMV3 extradata both in the original
form as in ASF, and in this format, while the one in Samsung Galaxy
S3 requires it to be in this format (as the OMX IL 1.2 specs specify).
This makes HW-accelerated WMV3 decoding work on Galaxy S3.
The code can be split out to a reusable function if/when the same
needs to be done elsewhere.
Alex Merry [Tue, 29 Jan 2013 00:55:21 +0000 (00:55 +0000)]
dbus: Standardise property getters
There was a lot of repeated code, some of which properly checked return
values and some of which didn't. This is all replaced and folded into
the GetProperty function of each interface.
A side-effect is that it should be more efficient (we only check the
interface argument once instead of once for each property, and there
should be a smaller overall code size).
Alex Merry [Tue, 29 Jan 2013 00:55:20 +0000 (00:55 +0000)]
dbus: Separate out property marshalling code in D-Bus interfaces
Pull out code to marshal the various properties into separate functions
(and make sure the return type of those functions is int). This is in
preparation for adding org.freedesktop.DBus.Properties.GetAll support.
Alex Merry [Tue, 29 Jan 2013 00:55:18 +0000 (00:55 +0000)]
Fix Metadata marshalling when sending the PropertiesChanged signal
VLC was getting kicked from the D-Bus when a track was stopped, because
it was generating invalid data on the wire when sending the
PropertiesChanged signal for the Metadata property.
The issue was that if there was now no current track, GetInputMeta would
never be called and the the variant would never be populated with the
"a{sv}" structure that the call to dbus_message_iter_open_container
claimed it would be.
We now share the code that GetProperties used, which dealt with this
correctly, although now both use CurrentInput (which is what the signal
previously used) instead of CurrentPlayingItem (which is what
GetProperties previously used).
Alex Merry [Mon, 28 Jan 2013 11:54:12 +0000 (11:54 +0000)]
Add Fullscreen property to GetAllProperties on DBus root interface
Previously, Fullscreen could be requested via
org.freedesktop.DBus.Properties.Get, but would not be returned by
org.freedesktop.DBus.Properties.GetAll.
Erwan Tulou [Mon, 28 Jan 2013 11:54:47 +0000 (12:54 +0100)]
skins2: update current input if its associated item changes.
This is the right place to make sure an art file that was not available at
input launch time gets a chance to be displayed as soon as it becomes available.
Frédéric Yhuel [Sun, 27 Jan 2013 22:02:57 +0000 (23:02 +0100)]
libmp4: small bug fix
When MP4_ReadBoxContainerChildren() returns, one expects the position in
the stream to be that of the next box after the last parsed box.
Without this very patch, if the last parsed box is an "unknown" one,
the position in the stream would be at the begining of that box,
preventing playback of latest Anevia's MS Smooth Streaming live streams,
for example.
Since non-ASCII or non-printable characters are not supposed to occur
in URL, it does not matter much how they are dealt with.
The caller of decode_URI() can anyway not assume anything about the
decoded string. In particular, decode_URI() does not validate UTF-8
sequences in any case.
Erwan Tulou [Sun, 27 Jan 2013 16:23:15 +0000 (17:23 +0100)]
skins2: fix art display misfunctioning in latest git vlc
Art display used to rely on an event issued by vlc core which has been renamed into "activity" lately. The issue was that it seems no longer fired when a new
input is launched.
That future version is expected to remove a number of already
deprecated interfaces, such as CODEC_ID_* or the Snow codec.
VLC still uses these interfaces as of today.