Thread Rating:
  • 1 Vote(s) - 5 Average
Proposal - UPnP improvement
#1
Hi! I'm Gus Te, sophomore of CS from Peking University, China. I joined algorithm contest in high school and won bronze medal. I have been using Kodi six years ago, mainly on iOS. I'm studying machine learning right now, however I don't think it is helpful to it apart from learning Python. I also use python to develop some interesting gadgets. In GSoC 2017, I plan to improve UPnP support of downloading and more if I finish it soon.

Name: Gus Te
forum/e-mail:[email protected]
Summary: The UPnP support is something that needs to be improved, and I am happy to work on it especially in terms of file transfer. To implement downloading may be not so hard for me, besides I want to improve the performance of other protocols. Device profile also interests me and I'm wiling to finish it as long as time permits.
How will I achieve this: I assume that I need to read some UPnP docs to get to know more about the protocol(definitely Kodi docs). As for coding, I could use Python and C to achieve it.
What will the project focus on: The difficulty mainly lies in UPnP transfer. Different MIME type compatibility is the focus.
Benefits: It provides users with more convenient and stable way to watch videos, which I don't always meet when I'm watching movies.
Goals: To be honest, I don't quite familiar with Kodi project, I always use it on iPad to watch TV series. And for many reasons I met with many difficulties when connecting the NAS. I come with the goal of improving the skills on network protocol and improve the Kodi project.
What does it touch in Kodi: The main part is the transfer and storage. Maybe some GUI needs to be modified.
Requirements: Python and C are the most important languages.
Possible mentors: Place to add possible mentors (Team-Kodi will add this).
Reply
#2
Right now Kodi uses the Platinum SDK as a base for its UPnP implementation. Unfortunately the Platinum SDK isn't really being developed anymore (at least last time I checked) and they also didn't really react to the last upstream patches I provided (but that was 2-3 years ago). Furthermore Platinum SDK isn't very flexible and adding things like profiles would require hacking very deep in Platinum SDK code which makes it a lot harder to maintain.

Last year I stumbled over ohNet (http://wiki.openhome.org/wiki/OhNet) which provides a UPnP stack (not a full framework like Platinum SDK) and is very flexible. But it means that a lot of the UPnP logic that Platinum SDK has built in needs to be built manually. On the other hand that allows easier integration of stuff like profiles. I've spent quite some time working on integrating ohNet's UPnP stack into Kodi including profile support. You can find the code here: https://github.com/Montellese/xbmc/commits/ohnet . The most valuable addition to that implementation is the extension of the ContentDirectory control point and device by the CreateObject/ImportResource/StopTransferResource/GetTransferProgress() methods. These allow to either send a media item from a client to a server or to import/download a media item from a server to a client. I've integrated this into Kodi with asynchronous transfer and a transfer manager dialog showing the progress etc. of all active transfers.

This work is far from being finished (even though almost all currently supported use cases are implemented). But I'm not sure if it's really worth hacking all of this into the existing Platinum SDK. You certainly need a good understanding of the different UPnP specifications. The file transfer itself is a lot easier than all the UPnP stuff around it.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
I'm afraid that the github link above is invalid. I read the code of ohNet briefly and found it quite challenging... Fortunately ohNet has built the profile module. I plan to integrate profile support first and I wonder how can I have a general view of Kodi? The repo itself is far too large for me, and I can evaluate how far I could complete in summer.

Thank you.
Reply
#4
I fixed the link. MyBB accidentally added the trailing dot to the link as well.

The ohNet code isn't that difficult. It uses XML files to generate interfaces which need to be implemented by the stack user.

What do you mean with "profile module"?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
I mean ohNet has implemented the function that setting profile, we only need to migrate it from ohNet, is that correct?
Reply
#6
I'm not sure if we are talking about the same when we say "profiles". What I mean is something like https://forums.plex.tv/discussion/73702/...na-devices from Plex which means Kodi provides some configuration files which map to specific UPnP server/client implementations from other software (like BubbleUPnP, Xbox, Plex, Emby, ...). The configuration files describe the features supported by the specific UPnP server/client implementation which results in Kodi's UPnP implementation behaving differently to match the other implementation.

This is not at all part of any UPnP specification and from what I've seen every UPnP server/client which supports profiles uses its own syntax and functionality. So ohNet does not provide any support for profiles and neither does Platinum. It has to be implemented manually.

Doing this in Platinum is very difficult because it is a full UPnP server/client which only requires instantiation and handling of serialization / deserialization (and some other stuff). The whole logic described in the UPnP specifications is already implemented. That means that for custom profile support we would have to go down deep into the Platinum code and change stuff which will be very tedious.

ohNet is "just" a UPnP stack so I had to implement all the logic and workflows described in the UPnP specifications myself (which btw helps a lot in understanding UPnP Wink). But that also means that integrating custom profiles is much easier because you have to write all the code yourself anyway. But it also means that Kodi would be using an UPnP implementation that nobody else is using which means more development and support work.

If you're interested in the whole file transfer stuff over UPnP this could be added to Platinum easier than profile support. It would still mean having to mess around in the existing Platinum code but it would be a lot more contained because there are a few specific UPnP methods/actions that would need to be added without having to touch a lot of the other existing methods/actions. As mentioned I've already done this in my ohNet work but I'm not sure where that will be going in the future.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#7
(2017-04-02, 18:18)Montellese Wrote: I'm not sure if we are talking about the same when we say "profiles". What I mean is something like https://forums.plex.tv/discussion/73702/...na-devices from Plex which means Kodi provides some configuration files which map to specific UPnP server/client implementations from other software (like BubbleUPnP, Xbox, Plex, Emby, ...). The configuration files describe the features supported by the specific UPnP server/client implementation which results in Kodi's UPnP implementation behaving differently to match the other implementation.

FYI, I keep an an (old) copy of "Plex DNLA (UPnP) client profiles" from Plex Media Server on GitHub here:

https://github.com/Hedda/Plex-DNLA-client-profiles

XML files taken from PMS (Plex Media Server) for Windows version 0.9.11.7.803-87d0708
Reply
 
Thread Rating:
  • 1 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
Proposal - UPnP improvement51