aboutsummaryrefslogtreecommitdiff
path: root/lib/service
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-01-02 11:03:34 +0100
committerghost <andreas.monzner@multimedia-labs.de>2010-01-02 11:03:34 +0100
commitd3399a5ff88ce1f16fe5019e1b865c1181c9eccd (patch)
tree106dbaeac71759132007022daf4c8358beaa08fe /lib/service
parent2fa166a61a60aed8248b74a838a2d077720156e9 (diff)
parent2026a6353de4bb4f8586b47963282b8eb14114b1 (diff)
downloadenigma2-d3399a5ff88ce1f16fe5019e1b865c1181c9eccd.tar.gz
enigma2-d3399a5ff88ce1f16fe5019e1b865c1181c9eccd.zip
Merge remote branch 'origin/bug_306_sort_by_date' into experimental
Diffstat (limited to 'lib/service')
-rw-r--r--lib/service/servicemp3.cpp19
-rw-r--r--lib/service/servicemp3.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index c0ae42fd..ccc5fbaf 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -190,6 +190,25 @@ int eStaticServiceMP3Info::getLength(const eServiceReference &ref)
return -1;
}
+int eStaticServiceMP3Info::getInfo(const eServiceReference &ref, int w)
+{
+ switch (w)
+ {
+ case iServiceInformation::sTimeCreate:
+ {
+ struct stat s;
+ if(stat(ref.path.c_str(), &s) == 0)
+ {
+ return s.st_mtime;
+ }
+ return iServiceInformation::resNA;
+ }
+ default: break;
+ }
+ return iServiceInformation::resNA;
+}
+
+
// eServiceMP3
int eServiceMP3::ac3_delay,
eServiceMP3::pcm_delay;
diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h
index 985179f6..56a068b9 100644
--- a/lib/service/servicemp3.h
+++ b/lib/service/servicemp3.h
@@ -41,6 +41,7 @@ class eStaticServiceMP3Info: public iStaticServiceInformation
public:
RESULT getName(const eServiceReference &ref, std::string &name);
int getLength(const eServiceReference &ref);
+ int getInfo(const eServiceReference &ref, int w);
};
typedef struct _GstElement GstElement;