servicemp3: simplify finding audio/video sinks

using gst_bin_get_by_name_recurse_up,
as suggested by theparasol

Works for all gstreamer versions, avoiding
precompiler conditionals
servicemp3: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP on gstreamer1.0

http://forums.openpli.org/topic/32320-unable-to-compile-gst-10-branch/page-8

Signed-off-by: pieterg <pieterg@users.sourceforge.net>
servicemp3: fix pullSubtitle for GStreamer 1.0

http://forums.openpli.org/topic/32320-unable-to-compile-gst-10-branch/page-8

Signed-off-by: pieterg <pieterg@users.sourceforge.net>
Revert "servicemp3: simplify finding audio/video sinks"

This reverts commit 8bfcf1dcfbbe9db933a302c6c36be08e22de9cbc.

As it seems to break subtitles and playing mp3s until the end of the files
servicemp3: fix match_sinktype for GStreamer 1.0

In getPlayPosition the match_sinktype was wrong, because now it accepts GValue.
Sink find needs a custom search method because the sink name changes every time.
So match_sinktype was upgraded to work with GStreamer 1.0.

Signed-off-by: Erik Slagter <erik@openpli.org>
servicemp3: cosmetic rename GValue element to result

Signed-off-by: Erik Slagter <erik@openpli.org>
servicemp3: fix pullSubtitles for GStreamer 1.0

In pullSubtitle the gst_buffer_map was created in wrong place, when we are creating a map it should be the first thing to do before we use this buffer.

Signed-off-by: Erik Slagter <erik@openpli.org>
servicemp3: gstBusCall use g_value_dup_object

We need to use g_value_dup_object because gst_object_unref fails on servicemp3 destructor.

Signed-off-by: littlesat <littlesat99@yahoo.com>
servicemp3 - turn off ssl-strict for souphttpsrc on GST1.0

souphttpsrc in Gstreamer 1.4.3 introduced "ssl-strict" option
to strictly validate SSL/TLS certificates. This option is turned on by
default but for unknown reason HTTPS streams doesn't work even if we
have ca-certificates package with valid certificates installed.

So to support playback of HTTPS media, we turned off "ssl-strict" option

Signed-off-by: Erik Slagter <erik@openpli.org>
servicemp3: fix seek from paused state

When enigma2 is in paused stated the pts is not updated, so we need to
switch to running state and back to paused in order seek to work from
paused state

Signed-off-by: Erik Slagter <erik@openpli.org>
servicemp3: check if taglist has datetime when date is not available

Also fix a memory leak of GDate and remove g_date_strftime by getting
year using g_date_get_year

Signed-off-by: Erik Slagter <erik@openpli.org>
servicemp3: fix previous commit

gst_date_time_has_year in unknown in gstreamer 0.10

Signed-off-by: littlesat <littlesat99@yahoo.com>
servicemp3: start HTTP timeout timer only once

HTTP timeout timer (m_streamingsrc_timeout) is always started when
souphttpsrc element requests creation of streaming thread by
GST_STREAM_STATUS_TYPE_CREATE type of GST_MESSAGE_STREAM_STATUS message.
This timer is only stopped and not triggered when we reach PLAYING state
in HTTP_TIMEOUT limit.

Problem is, that this message can be emitted multiple times (HLS streams)
If this happens when the timer is already stopped (we are in PLAYING state),
then the timer is started again and is triggered, which creates EOF event.

To fix this we start the timer only once, when the message is recieved
first time (in READY state)
servicemp3: stop HTTP timeout timer on Stop
Introduce getGStreamerVersionString function and use it in About screen

Signed-off-by: littlesat <littlesat99@yahoo.com>
Language: Add GST_SUBTITLE_ENCODING failback environment variable

The GST_SUBTITLE_ENCODING environment variable will be checked for an encoding to use if input subtitles are not in UTF-8 encoding.
By default if that is not set either, ISO-8859-15 is assumed, that's why we are setting this as default failback.
Additionally gconv module for character set (e)glibc-gconv-iso8859-XX must be installed.

Signed-off-by: Erik Slagter <erik@openpli.org>