git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow multiple sources for elements. last added source will be in .source, a list...
[enigma2.git]
/
lib
/
service
/
servicemp3.cpp
diff --git
a/lib/service/servicemp3.cpp
b/lib/service/servicemp3.cpp
index f8eb194e14da7fbfabe3aa9bd64f9303fc55d25c..73a12430ad01ce654bd5c46cb3d3890cb1eef1d1 100644
(file)
--- a/
lib/service/servicemp3.cpp
+++ b/
lib/service/servicemp3.cpp
@@
-17,6
+17,12
@@
/* for subtitles */
#include <lib/gui/esubtitle.h>
/* for subtitles */
#include <lib/gui/esubtitle.h>
+#ifndef GST_SEEK_FLAG_SKIP
+#warning Compiling for legacy gstreamer, things will break
+#define GST_SEEK_FLAG_SKIP 0
+#define GST_TAG_HOMEPAGE ""
+#endif
+
// eServiceFactoryMP3
eServiceFactoryMP3::eServiceFactoryMP3()
// eServiceFactoryMP3
eServiceFactoryMP3::eServiceFactoryMP3()
@@
-441,6
+447,7
@@
RESULT eServiceMP3::pause()
RESULT eServiceMP3::unpause()
{
RESULT eServiceMP3::unpause()
{
+ m_subtitle_pages.clear();
if (!m_gst_playbin || m_state != stRunning)
return -1;
if (!m_gst_playbin || m_state != stRunning)
return -1;
@@
-476,6
+483,8
@@
RESULT eServiceMP3::getLength(pts_t &pts)
RESULT eServiceMP3::seekTo(pts_t to)
{
RESULT eServiceMP3::seekTo(pts_t to)
{
+ m_subtitle_pages.clear();
+
if (!m_gst_playbin)
return -1;
if (!m_gst_playbin)
return -1;
@@
-600,7
+609,7
@@
RESULT eServiceMP3::getName(std::string &name)
int eServiceMP3::getInfo(int w)
{
int eServiceMP3::getInfo(int w)
{
- gchar *tag = 0;
+
const
gchar *tag = 0;
switch (w)
{
switch (w)
{
@@
-699,9
+708,9
@@
int eServiceMP3::getInfo(int w)
std::string eServiceMP3::getInfoString(int w)
{
std::string eServiceMP3::getInfoString(int w)
{
- if ( !m_stream_tags )
+ if ( !m_stream_tags
&& w < sUser && w > 26
)
return "";
return "";
- gchar *tag = 0;
+
const
gchar *tag = 0;
switch (w)
{
case sTagTitle:
switch (w)
{
case sTagTitle:
@@
-797,7
+806,6
@@
std::string eServiceMP3::getInfoString(int w)
case sTagChannelMode:
tag = "channel-mode";
break;
case sTagChannelMode:
tag = "channel-mode";
break;
-
case sUser+12:
return m_error_message;
default:
case sUser+12:
return m_error_message;
default:
@@
-817,7
+825,7
@@
std::string eServiceMP3::getInfoString(int w)
PyObject *eServiceMP3::getInfoObject(int w)
{
PyObject *eServiceMP3::getInfoObject(int w)
{
- gchar *tag = 0;
+
const
gchar *tag = 0;
bool isBuffer = false;
switch (w)
{
bool isBuffer = false;
switch (w)
{
@@
-1036,7
+1044,7
@@
void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg)
GstTagList *tags, *result;
gst_message_parse_tag(msg, &tags);
GstTagList *tags, *result;
gst_message_parse_tag(msg, &tags);
- result = gst_tag_list_merge(m_stream_tags, tags, GST_TAG_MERGE_
PREPEND
);
+ result = gst_tag_list_merge(m_stream_tags, tags, GST_TAG_MERGE_
REPLACE
);
if (result)
{
if (m_stream_tags)
if (result)
{
if (m_stream_tags)
@@
-1125,6
+1133,7
@@
eDebug("AUDIO STRUCT=%s", g_type);
g_free (g_lang);
// g_free (g_type);
}
g_free (g_lang);
// g_free (g_type);
}
+ m_event((iPlayableService*)this, evUpdatedEventInfo);
}
case GST_MESSAGE_ELEMENT:
{
}
case GST_MESSAGE_ELEMENT:
{
@@
-1277,7
+1286,7
@@
void eServiceMP3::pushSubtitles()
GstElement *appsink = gst_bin_get_by_name(GST_BIN(m_gst_playbin),"subtitle_sink");
GstClock *clock;
clock = gst_element_get_clock (appsink);
GstElement *appsink = gst_bin_get_by_name(GST_BIN(m_gst_playbin),"subtitle_sink");
GstClock *clock;
clock = gst_element_get_clock (appsink);
- do
+ while ( !m_subtitle_pages.empty() )
{
page = m_subtitle_pages.front();
{
page = m_subtitle_pages.front();
@@
-1296,7
+1305,7
@@
void eServiceMP3::pushSubtitles()
m_subtitle_widget->setPage(page);
m_subtitle_pages.pop_front();
}
m_subtitle_widget->setPage(page);
m_subtitle_pages.pop_front();
}
- }
while ( !m_subtitle_pages.empty() )
;
+ } ;
gst_object_unref (clock);
}
gst_object_unref (clock);
}
@@
-1330,6
+1339,7
@@
RESULT eServiceMP3::enableSubtitles(eWidget *parent, ePyObject tuple)
g_object_get (G_OBJECT (m_gst_playbin), "current-text", &text_pid, NULL);
eDebug ("eServiceMP3::switched to subtitle stream %i", text_pid);
g_object_get (G_OBJECT (m_gst_playbin), "current-text", &text_pid, NULL);
eDebug ("eServiceMP3::switched to subtitle stream %i", text_pid);
+ m_subtitle_pages.clear();
return 0;
return 0;
@@
-1342,6
+1352,7
@@
error_out:
RESULT eServiceMP3::disableSubtitles(eWidget *parent)
{
eDebug("eServiceMP3::disableSubtitles");
RESULT eServiceMP3::disableSubtitles(eWidget *parent)
{
eDebug("eServiceMP3::disableSubtitles");
+ m_subtitle_pages.clear();
delete m_subtitle_widget;
m_subtitle_widget = 0;
return 0;
delete m_subtitle_widget;
m_subtitle_widget = 0;
return 0;