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.

Signed-off-by: Mirsal Ennaime <mirsal@videolan.org>
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).

Signed-off-by: Mirsal Ennaime <mirsal@videolan.org>
Add Properties.GetAll support to all D-Bus interfaces

Signed-off-by: Mirsal Ennaime <mirsal@videolan.org>
dbus: Add CanGoNext/Previous

These are required by the spec.  We just set them to true, to match the
fact that the buttons on the main interface are never disabled.

Signed-off-by: Mirsal Ennaime <mirsal@videolan.org>
mediacodec: Update a comment with the current state of affairs

Signed-off-by: Rafaël Carré <funman@videolan.org>
omxil: Update the explanation of the OMX.SEC quirk/workaround

Signed-off-by: Rafaël Carré <funman@videolan.org>
omxil/mediacodec: Extend the quirk workaround for OMX.SEC to ignore horizontal padding as well

Signed-off-by: Rafaël Carré <funman@videolan.org>
mediacodec: Remove an unused variable

Signed-off-by: Rafaël Carré <funman@videolan.org>
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.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
omxil: Skip OMX.SEC.WMV.Decoder

This one doesn't seem to work for either VC1 or WMV3 at the moment
(on Android 4.1.2 on Galaxy S3), while OMX.SEC.vc1.dec works (for
both codecs).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
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.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
mediacodec: Handle VC1

This is tested to be working on Galaxy S3 on 4.1.2 (and
on 4.1.1 as well).

(WMV3 doesn't seem to work though, even after reformatting the
extradata as in the omxil decoder, MediaCodec.configure()
throws an exception.)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Add option to specify arhitecture variant for building vlc for iOS

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
configure: do not add -fvisibility=hidden flag on OS/2

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
vlccore: pass a proper argument to vlc_cancel_self() in vlc_testcancel()

This fixes the problem that SAP hangs on even if it has been canceled.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
hotkeys: reorder the Big Switch and remove some useless checks
osd: privatize osd_ShowText(Absolute|Relative)

(Functions reordered to avoid forward declaration.)
vout: remove dead OSD code
hotkeys: remove unused OSD menu actions
LIRC: remove non-working menu