Jump to content


Photo

EPG with GStreamer (ServiceMP3)

epg gstreamer servicemp3

  • Please log in to reply
56 replies to this topic

Re: EPG with GStreamer (ServiceMP3) #21 Taapat

  • PLi® Core member
  • 2,343 posts

+120
Excellent

Posted 29 November 2013 - 08:13

@malakudi or after this patch EPG works for you as it should, showing now and event time?

To me showing only the nex and weekly, as with your hack, but I have SH4 receiver, so maybe I merge this patch wrong.
But maybe now, after this patch, something else is still missing?


Re: EPG with GStreamer (ServiceMP3) #22 malakudi

  • Senior Member
  • 1,449 posts

+69
Good

Posted 29 November 2013 - 16:43

I have tested the committed patch, EPG is shown in infobar (now/next), in channel EPG view, but not in the channel list view. In the channel list view, I can only see the reference of the next program. No reference for current program - no title, duration, detailed description.

Tried  with various skins, PLi HD included.


Edited by malakudi, 29 November 2013 - 16:46.


Re: EPG with GStreamer (ServiceMP3) #23 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 29 November 2013 - 19:28

Current list is not using EPG.

I think it uses (eit) events. So there is no query on epgcache.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #24 malakudi

  • Senior Member
  • 1,449 posts

+69
Good

Posted 29 November 2013 - 19:38

So what is needed to also have current event in channel list too?



Re: EPG with GStreamer (ServiceMP3) #25 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 29 November 2013 - 19:47

I guess query also epg when eit on channel list returns no data.


Although i would like to hear what @pieterg says also.

Edited by athoik, 29 November 2013 - 19:47.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #26 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 29 November 2013 - 20:19

Regarding the next event, we have the following on the skin:
<widget source="ServiceEvent" render="NextEpgInfo" position="85,590" size="435,26" transparent="1" foregroundColor="secondFG" noWrap="1" font="Regular;22"/>
And on NextEpgInfo is quering using epgcache (Components/Renderer/NextEpgInfo.py).


But same is not happening when using EventName converter (Components/Converter/EventName.py).
<widget source="ServiceEvent" render="Label" position="85,360" size="435,42" transparent="1" foregroundColor="secondFG" noWrap="1" font="Regular;22" halign="left">
 <convert type="EventName">Name</convert>
</widget>
...
                event = self.source.event
                if event is None:
                        return ""

                if self.type == self.NAME:
                        return event.getEventName()

So, i think Converter can be enhanced to return EPG information when event is not available.

Edited by athoik, 29 November 2013 - 20:22.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #27 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 29 November 2013 - 21:03

If the convertor calls the normal 'service.getEvent', I would expect the epgcache to work.
Most likely, the convertor / source calls some other function, which is not implemented in servicemp3?

Re: EPG with GStreamer (ServiceMP3) #28 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 30 November 2013 - 18:20

Hello,

I dig on enigma2 code and i think i have some findings.

Most probably enigma2 channel list is also using ServiceEvent.py (lib/python/Components/Sources/ServiceEvent.py)

So the event is a property of getCurrentEvent.
        @cached
        def getCurrentEvent(self):
                return self.service and self.info and self.info.getEvent(self.service)

        @cached
        def getInfo(self):
                return self.service and eServiceCenter.getInstance().info(self.service)

        event = property(getCurrentEvent)
        info = property(getInfo)
But with some debuging on this file i find out that self.info.getEvent(self.service) is None and eServiceCenter.getInstance().info(self.service) is iStaticServiceInformation.
self.info.getEvent(self.service) = None

eServiceCenter.getInstance().info(self.service) = <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0x1e39d10> >
Searching on the servicemp3.cpp i guess eServiceFactoryMP3::info is the function that we are calling above.
...
        m_service_info = new eStaticServiceMP3Info();
...

RESULT eServiceFactoryMP3::info(const eServiceReference &ref, ePtr<iStaticServiceInformation> &ptr)
{
        ptr = m_service_info;
        return 0;
}
The same function on servicedvb.cpp has more code and getEvent also..
...
        m_StaticServiceDVBInfo = new eStaticServiceDVBInformation;
        m_StaticServiceDVBBouquetInfo = new eStaticServiceDVBBouquetInformation;
...

RESULT eStaticServiceDVBBouquetInformation::getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &ptr, time_t start_time)
{
        return eEPGCache::getInstance()->lookupEventTime(ref, start_time, ptr);
}

...

RESULT eStaticServiceDVBPVRInformation::getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &evt, time_t start_time)
{
        if (!ref.path.empty())
        {
                if (ref.path.substr(0, 7) == "http://")
                {
                        eServiceReference equivalentref(ref);
                        /* this might be a scrambled stream (id + 0x100), force equivalent dvb type */
                        equivalentref.type = eServiceFactoryDVB::id;
                        equivalentref.path.clear();
                        return eEPGCache::getInstance()->lookupEventTime(equivalentref, start_time, evt);
                }
                else
                {
                        ePtr<eServiceEvent> event = new eServiceEvent;
                        std::string filename = ref.path;
                        filename.erase(filename.length()-2, 2);
                        filename+="eit";
                        if (!event->parseFrom(filename, (m_parser.m_ref.getTransportStreamID().get()<<16)|m_parser.m_ref.getOriginalNetworkID().get()))
                        {
                                evt = event;
                                return 0;
                        }
                }
        }
        evt = 0;
        return -1;
}

...

RESULT eServiceFactoryDVB::info(const eServiceReference &ref, ePtr<iStaticServiceInformation> &ptr)
{
        /* is a listable service? */
        if (ref.flags & eServiceReference::canDescent) // bouquet
        {
                if ( !ref.name.empty() )  // satellites or providers list
                        ptr = m_StaticServiceDVBInfo;
                else // a dvb bouquet
                        ptr = m_StaticServiceDVBBouquetInfo;
        }
        else if (!ref.path.empty()) /* do we have a PVR service? */
                ptr = new eStaticServiceDVBPVRInformation(ref);
        else // normal dvb service
        {
                ePtr<eDVBService> service;
                if (lookupService(service, ref)) // no eDVBService avail for this reference ( Linkage Services... )
                        ptr = m_StaticServiceDVBInfo;
                else
                        /* eDVBService has the iStaticServiceInformation interface, so we pass it here. */
                        ptr = service;
        }
        return 0;
}

So from the above i think we need to implement eServiceFactoryMP3::getEvent.
RESULT eServiceFactoryMP3::getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &evt, time_t start_time)
{
        if (!ref.path.empty())
        {
                if (ref.path.find("://") != std::string::npos)
                {
                        eServiceReference equivalentref(ref);
                        equivalentref.type = eServiceFactoryMP3::id;
                        equivalentref.path.clear();
                        return eEPGCache::getInstance()->lookupEventTime(equivalentref, start_time, evt);
                }
        }
        evt = 0;
        return -1;
}
What do you think above should be enough? (I will test it soon, i hope it is working.)

Edited by athoik, 30 November 2013 - 18:21.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #29 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 30 November 2013 - 19:03

makes sense, in the servicelist we're not querying the current service.

It might work.
But I think we can skip the 'if (!ref.path.empty())' check.

Re: EPG with GStreamer (ServiceMP3) #30 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 30 November 2013 - 20:24

It works :)

Attached File  channel_list_epg.jpg   97.53KB   63 downloads

So EPG with GStreamer is now complete!
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -270,6 +270,19 @@ long long eStaticServiceMP3Info::getFileSize(const eServiceReference &ref)
 	return 0;
 }
 
+RESULT eStaticServiceMP3Info::getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &evt, time_t start_time)
+{
+	if (ref.path.find("://") != std::string::npos)
+	{
+		eServiceReference equivalentref(ref);
+		equivalentref.type = eServiceFactoryMP3::id;
+		equivalentref.path.clear();
+		return eEPGCache::getInstance()->lookupEventTime(equivalentref, start_time, evt);
+	}
+	evt = 0;
+	return -1;
+}
+
 DEFINE_REF(eStreamBufferInfo)
 
 eStreamBufferInfo::eStreamBufferInfo(int percentage, int inputrate, int outputrate, int space, int size)
diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h
index 3bbf97e..f32d06f 100644
--- a/lib/service/servicemp3.h
+++ b/lib/service/servicemp3.h
@@ -41,6 +41,7 @@ public:
 	int getInfo(const eServiceReference &ref, int w);
 	int isPlayable(const eServiceReference &ref, const eServiceReference &ignore, bool simulate) { return 1; }
 	long long getFileSize(const eServiceReference &ref);
+	RESULT getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &ptr, time_t start_time);
 };
 
 class eStreamBufferInfo: public iStreamBufferInfo
Thanks for all the lessons learned here and for the good discussion.

Attached Files


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #31 darko88

  • Member
  • 5 posts

0
Neutral

Posted 1 December 2013 - 01:31

How can I add this path ? Which file I have to modify?

 

Regards



Re: EPG with GStreamer (ServiceMP3) #32 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 1 December 2013 - 02:43

You'll have to recompile the e2 binary to apply the patch. You need a working build environment to do this. As normal user you should wait some days until PLi guys have checked and applied the patch.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: EPG with GStreamer (ServiceMP3) #33 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 1 December 2013 - 06:47

Please excuse a layman's question in between.

Is the original question:

My question is if we implement getEvent on servicemp3 it would be possible to get EGP events from epg.dat?

still applicable? I ask because epg.dat may contain very old data (as the actual data is held in RAM).



Re: EPG with GStreamer (ServiceMP3) #34 malakudi

  • Senior Member
  • 1,449 posts

+69
Good

Posted 1 December 2013 - 09:37

@athoik: great job, thank you.

@SatKiekerd: He meant epg structures in ram, epg.dat is only read on startup and saved in termination of e2.



Re: EPG with GStreamer (ServiceMP3) #35 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 1 December 2013 - 10:09

Actually correct would be, read events from epgcache... :)
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #36 doglover

  • Rytec EPG Team
  • 17,012 posts

+639
Excellent

Posted 9 December 2013 - 11:31

Question to devs:  Is this implemented?

 

With this can we attach epg (with XMLTV import) to 4097 ip-TV channels?

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG with GStreamer (ServiceMP3) #37 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 9 December 2013 - 18:22

Yes, it is implemented!
<channel id="channel.id">1:0:1:1000:1000:0:0:0:0:0:http%3a//example.com</channel> <!--channel-->

#SERVICE 4097:0:1:1000:1000:0:0:0:0:0:http%3a//example.com:channel
The epgcache key is sid, onid and tsid ;)

Edited by athoik, 9 December 2013 - 18:23.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #38 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 9 December 2013 - 20:46

Hello,

I think i found one more issue with ServiceMP3.

Picons they never render although there is a valid png (acording to service reference).

Tracking the issue the ServiceName Convertert returns an empty service reference to Picon render.
        @cached
        def getText(self):
...
                elif self.type == self.REFERENCE or self.type == self.EDITREFERENCE and hasattr(self.source, "editmode") and self.source.editmode:
                        if not ref:
                                return info.getInfoString(iServiceInformation.sServiceref)
                        nref = resolveAlternate(ref)
....
The info.getInfoString(iServiceInformation.sServiceref) is empty.

Looking on the servicemp3, there is no case for sServiceref.
std::string eServiceMP3::getInfoString(int w)
{
+        if ( w == iServiceInformation::sServiceref)
+                return m_ref.toString();
         if ( !m_stream_tags && w < sUser && w > 26 )
                 return "";
Above seems correct?

Is it better to check if we have streaming (m_sourceinfo.is_streaming) and only then return sServiceref?

Also when we have streaming then can we also return sProvider as "Internet" else "File" or "Local"?

Thanks
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: EPG with GStreamer (ServiceMP3) #39 ThanosDJ

  • Senior Member
  • 30 posts

0
Neutral

Posted 11 December 2013 - 09:33

Yes, it is implemented!

<channel id="channel.id">1:0:1:1000:1000:0:0:0:0:0:http%3a//example.com</channel> <!--channel-->

#SERVICE 4097:0:1:1000:1000:0:0:0:0:0:http%3a//example.com:channel
The epgcache key is sid, onid and tsid ;)

 

So in the case of this example: #SERVICE 1:0:1:3F0:5:AA:5A0000:0:0:0: how i must update the image to be?

Like this for example? -->  #SERVICE 4097:0:1:1000:1000:3F0:5:AA:5A0000:0:0:0::http%3a//stream site/otecinema1hd/username/password:</channel> in order for the epg to work and for the channel to play?



Re: EPG with GStreamer (ServiceMP3) #40 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 11 December 2013 - 20:13

Dear ThanosDJ,

We have added EPG on FREE channels of GreekStreamTV at satdreamgr forum (so you can see how it works).

Since the stream you are trying to see (most probably) is not free... please ask from "stream site" to help you.

Good luck.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916



Also tagged with one or more of these keywords: epg, gstreamer, servicemp3

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users