diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-07-14 12:59:18 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-07-14 12:59:18 +0000 |
| commit | a65edb264cc943a2a15b6886d9fa3190a92373c0 (patch) | |
| tree | 91bdc462f49092cc04aaf1cbd60367a07cf0918d /lib/service/event.cpp | |
| parent | da3cbd785189e979d5c06eddb965795b24e73d2f (diff) | |
| download | enigma2-a65edb264cc943a2a15b6886d9fa3190a92373c0.tar.gz enigma2-a65edb264cc943a2a15b6886d9fa3190a92373c0.zip | |
add possibility to view eventinfo in recorded movielist (move cursor to
recorded movie and press info)
Diffstat (limited to 'lib/service/event.cpp')
| -rw-r--r-- | lib/service/event.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/service/event.cpp b/lib/service/event.cpp index 07c92c52..4dda5779 100644 --- a/lib/service/event.cpp +++ b/lib/service/event.cpp @@ -10,6 +10,9 @@ #include <dvbsi++/component_descriptor.h> #include <dvbsi++/descriptor_tag.h> +#include <sys/types.h> +#include <fcntl.h> + // static members / methods std::string eServiceEvent::m_language = "de_DE"; @@ -185,6 +188,27 @@ RESULT eServiceEvent::parseFrom(Event *evt, int tsidonid) return 0; } +RESULT eServiceEvent::parseFrom(const std::string filename, int tsidonid) +{ + if (!filename.empty()) + { + int fd = ::open( filename.c_str(), O_RDONLY ); + if ( fd > -1 ) + { + __u8 buf[4096]; + int rd = ::read(fd, buf, 4096); + ::close(fd); + if ( rd > 12 /*EIT_LOOP_SIZE*/ ) + { + Event ev(buf); + parseFrom(&ev, tsidonid); + return 0; + } + } + } + return -1; +} + std::string eServiceEvent::getBeginTimeString() const { tm t; |
