New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Service Interface #91
Comments
+1 |
Hello, The Kodi skin look like this: @pipelka, the XVDR plugin author was also interested using the ECM info (I was suggested to get this info directly from OSCam), but his work was not finished, probably because lack of his time. Overall: I also like the idea to have this kind of information in the VDR. Now the question is: is it a good idea to provide such interface in my plugin (my plugin would then be only a unnecessary proxy) or maybe just obtain it directly from OSCam (i suggest the monitor interface for this; a simple text UDP parser would be needed). What do you think? |
Is the oscam interface also working when oscam is not on teh same machine? (Network mode) |
Is the oscam interface also working when oscam is not on teh same machine? (Network mode) yes, UDP is a network protocol Does oscam know what decoded channel is the one that is live? No, but even my plugin doesn't know it (it only follow VDR CAM assign/deassign requests and doesn't know if the channel is for livetv or not). |
hm, but how can then the right ecm time be displayed? Can your plugin check that in the vdr? Has a remote network oscam any chandce to get that info? how does the skin know what to display? |
If a Louis is currently able to display information about live tv channel (like frequency, SID) then he is also able to get this information from OSCam (eg compare the channel SID and provide info only for this channel). |
Hi, from a "pure" VDR view a service interface would be much easier since other plugins (like skins for instance) are able to query this service interface directly with a call to a defined service api. Also vnsi / xvdr vdr plugin could use this service interface to get the info from dvbapi directly and provide then the information to the kodi clients (using an internal xvdr / vnsi mechanism for that). For sure i could also use the oscam interface directly, but then i would have to implement that on my own in skindesigner, nobody could reuse it. Also the ip address of the oscam server would have to be configured in the skin which is not really reasonable from my point of view. So i would really tend to a service interface for dvbapi...but answering your last question, for sure i know the currently displayed channel in my plugin and could provide information to OsCam. Do you have a link where the OsCam interface is described in detail? Cheers Louis |
I see - in this case indeed it is better to put this info in my plugin - to have all scrambling details in one place and to be able to give this information to all plugins which want it. For what I remember the data I could collect (and provide you) is: channel SID last ecm source (hostname/ip address as text - as provided by the oscam) CAID ECM request result (text: found/not found, cache etc) last ecm time (in ms) Is it sufficient? I am not yet familiar with the VDR interface for plugin intercommunication - by "service interface" you mean some specific API? Can I read about it somewhere? The problem is my free time ... I cannot tell you any ETA for the first interface, but I can try to spend some time on it... As regards to the OSCam interface documentation - I don't know if it is documented. I was just testing it myself some time ago. It is called a monitor mode - there are also some clients for this, but as I mentioned above I could try to parse it myself and expose it to your plugin. |
Hi Manio, sounds great :-) The information you described is exactly what i thought about.
You just have to implement the "virtual bool DVBAPI::Service(const char *Id, void *Data = NULL);" function in your dvbapi.h / cpp. This function will then be called by the "asking" plugins like skindesigner. the id is the id of the currently called service, and "void *Data" is just a struct or a class used to exchange data between dvbapi and the calling plugin. For instance such a struct could look like: struct sDVBApiInfo { //in parameters //out parameters This is just an example. I would create such a struct in my plugin, set the "IN" parameters and provide this struct via the service call by reference. You would just have to fill the "OUT" parameters accordingly. As an example you can check one of my other plugins (for instance "scraper2vdr" which provides a service interface to get all scraped information for an eventID from thetvdb / themoviedb): Service Function: http://projects.vdr-developer.org/projects/plg-scraper2vdr/repository/revisions/master/entry/scraper2vdr.c#L166 Definition of service structures: http://projects.vdr-developer.org/projects/plg-scraper2vdr/repository/revisions/master/changes/services.h And here an example how to use this service interface from another plugin (in this case skindesigner): http://projects.vdr-developer.org/projects/plg-skindesigner/repository/revisions/master/entry/views/viewhelpers.c#L196
I would call the service every time a channel switch is done by the user to get the encryption information from the currently displayed broadcast. So no constant polling, just calling when i really need it. Cheers Louis |
Hello, I spent some time on this and first part of work (obtaining ecm info data from OSCam) is now done in the OSCam: Instead of using the UDP and monitor feature I just enhanced the OSCam dvbapi protocol (version 2), so it is more user friendly (will just work out of the box) and it is also done more proper. If you have some time and possibilities you may check if the obtained data is correct. Next I am planning to expose this data via service interface to other VDR plugins :) |
Hi Manio. wow, great! I hope to find some time at weekend to test it... If you need some support implementing the service interface, just let me know... Cheers Louis |
One additional remark: it would be great if it is possible to pass the ChannelID to dvbapi via the service interface structure and then get the ECM info for this channel - as i suggested above. Cheers Louis |
I have to check if I would be able to associate the channel SID I've got from OSCam with the ChannelID you suggested. |
Ok, i forgot that OsCam is not VDR specific ;) The ChannelID was just a suggestion, i have access to the cChannel Object itself too...you can check the facilities of this class here in VDR: So i could provide a pointer to the Object itself or any other information you need...depends on how the OsCam channel SID is build together. I think you are more familiar with that ;) Cheers Louis |
PS: is it may be the ServiceID mentioned here: If yes, would be no issue to provide this instead of the ChannelID. |
Ok, will see. Maybe you can use the function GetByServiceID() - but you may also need a transponder and source. I will try to code something more after the weekend. For now I prefer to give you all info based on SID (service ID). The OSCam channel SID is the same as in VDR, SID should be unique for channels, it is the column "SID" eg here: |
Hello, |
@ manio, is it possible to show this issue.
also with "loglevel 2"? |
Hi Manio, tested it, works like a charm :-) I'll integrate it later completely in skindesigner and publish it to VDR Portal so we get some more testers ;) Thanx for your effort! Cheers Louis |
THX @manio and @louisbraun, it works fine! 👍 |
@3PO |
Ok guys, the code is now in my master branch. Thank you all involved :) |
Hi Manio, me again :-) Do you know if the "names" of the caid's are available in OSCAM? See http://www.vdr-portal.de/board16-video-disk-recorder/board109-vdr-skins/p1242988-0-4-3-es-blinkt/#post1242988 If yes (or if they are definable in an OSCAM config file) would it be possible to enhance the new protocol to get beside the caid also this info? If not, for me it would be the best to include some kind of "translation" in dvbapi, since it is not reasonable to implement it in skindesigner or any other "consuming" plugin. What do you think? Cheers Louis |
Maybe you can use the "oscam.provid" or "oscam.srvid"? --> http://www.streamboard.tv/wiki/OSCam/en/Config/oscam.provid |
Hello I can see that recently was added some function testing for CAIDs: r10588 up to r10595 I can also see that the table and the function is nicely maintained eg here in tvh: Overall i have to think about it but I'd prefer to get it away from my plugin and fetch it from the OSCam... |
Hi, i agree that oscam would be the best place...2nd dvbapi, and last the "consumer plugins" like skindesigner. If i would implement it, every other skin would have to do the same. So i'll wait on your decision :-) Cheers Louis |
Done |
Thanks :-) I'll add the modification to skindesigner asap... Cheers Louis |
Just implemented and tested...works fine. Thx. |
3PO: what skin is that please ? |
This is my own Skin. |
It looks great! Can you share it ?;) |
hi Manio |
@taktiker12 |
Hi Manio,
i'd like to display some information about the encryption status of the currently displayed broadcast in my skindesigner plugin (see http://projects.vdr-developer.org/projects/plg-skindesigner). Would it be possible that you implement a service interface for that in dvbapi plugin?
For me information like for instance encryption type and last ecm times would be interesting to display during channel switching. I think you know best what information could be displayed ;)
Thanks in advance for thinking about implementation of this feature.
Cheers Louis
The text was updated successfully, but these errors were encountered: