git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add .nfi to filescanner for NFIFlash plugin, whitespace cleanup, change md5sum check...
[enigma2.git]
/
lib
/
service
/
servicemp3.cpp
diff --git
a/lib/service/servicemp3.cpp
b/lib/service/servicemp3.cpp
index e435863cb3b3bb95372959196255e08e85d9de68..225d90f69938145f8e00a156efd428ea782c9d2b 100644
(file)
--- a/
lib/service/servicemp3.cpp
+++ b/
lib/service/servicemp3.cpp
@@
-12,7
+12,7
@@
#include <lib/base/init_num.h>
#include <lib/base/init.h>
#include <gst/gst.h>
#include <lib/base/init_num.h>
#include <lib/base/init.h>
#include <gst/gst.h>
-#include <gst/pbutils/missing-plugins.h>
find
+#include <gst/pbutils/missing-plugins.h>
#include <sys/stat.h>
/* for subtitles */
#include <lib/gui/esubtitle.h>
#include <sys/stat.h>
/* for subtitles */
#include <lib/gui/esubtitle.h>
@@
-681,6
+681,7
@@
int eServiceMP3::getInfo(int w)
case sTracknumber:
case sGenre:
case sVideoType:
case sTracknumber:
case sGenre:
case sVideoType:
+ case sTimeCreate:
case sUser+12:
return resIsString;
case sCurrentTitle:
case sUser+12:
return resIsString;
case sCurrentTitle:
@@
-706,6
+707,8
@@
int eServiceMP3::getInfo(int w)
std::string eServiceMP3::getInfoString(int w)
{
std::string eServiceMP3::getInfoString(int w)
{
+ if ( !m_stream_tags )
+ return "";
gchar *tag = 0;
switch (w)
{
gchar *tag = 0;
switch (w)
{
@@
-730,24
+733,29
@@
std::string eServiceMP3::getInfoString(int w)
case sVideoType:
tag = GST_TAG_VIDEO_CODEC;
break;
case sVideoType:
tag = GST_TAG_VIDEO_CODEC;
break;
+ case sTimeCreate:
+ GDate *date;
+ if (gst_tag_list_get_date(m_stream_tags, GST_TAG_DATE, &date))
+ {
+ gchar res[5];
+ g_date_strftime (res, sizeof(res), "%Y", date);
+ return (std::string)res;
+ }
+ break;
case sUser+12:
return m_error_message;
default:
return "";
}
case sUser+12:
return m_error_message;
default:
return "";
}
-
- if (!m_stream_tags || !tag)
+ if ( !tag )
return "";
return "";
-
gchar *value;
gchar *value;
-
if (gst_tag_list_get_string(m_stream_tags, tag, &value))
{
std::string res = value;
g_free(value);
return res;
}
if (gst_tag_list_get_string(m_stream_tags, tag, &value))
{
std::string res = value;
g_free(value);
return res;
}
-
return "";
}
return "";
}
@@
-918,6
+926,9
@@
void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg)
audio.type = gstCheckAudioPad(str);
m_audioStreams.push_back(audio);
}
audio.type = gstCheckAudioPad(str);
m_audioStreams.push_back(audio);
}
+
+ gst_tag_list_free(tags);
+ m_event((iPlayableService*)this, evUpdatedInfo);
break;
}
case GST_MESSAGE_ASYNC_DONE:
break;
}
case GST_MESSAGE_ASYNC_DONE: