X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fservice%2Fservicemp3.cpp;h=ccc5fbaf15cca0c8a222c29c503643e8532893c4;hb=78329e83433e005aa3d4e6a6f0d526ec2bb9b8f6;hp=cf71f78184f2bd495ad5e520f444c32ebbd29870;hpb=cae9cbba3b7789e8d61bb6d6f1902c8d1c569e45;p=vuplus_dvbapp diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index cf71f78..ccc5fba 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -46,6 +46,7 @@ eServiceFactoryMP3::eServiceFactoryMP3() extensions.push_back("mp4"); extensions.push_back("mov"); extensions.push_back("m4a"); + extensions.push_back("m2ts"); sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions); } @@ -189,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;