[WebService] General Media Access Webservice (1 Viewer)

Oxan

Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Using GPU decoding is only beneficial when the CPU can't handle simultaneous decoding and encoding, but only encoding works fine. As decoding is only a really minor part of the CPU usage, this ony helps for CPUs that have exactly enough power to do the encoding. You will get other kind of problems with these CPUs: you'll experience stuttering as sometimes other processes require CPU.
     

    Johan

    Portal Pro
    April 19, 2006
    443
    11
    48
    Home Country
    Sweden Sweden
    As in my case then :)

    Since my cpu cannot do cpu decoding I am sure it will help.

    Anyway looking forward for vlc version.

    Sent from my HTC Desire using Tapatalk
     

    Johan

    Portal Pro
    April 19, 2006
    443
    11
    48
    Home Country
    Sweden Sweden
    Realised it will not help me since Im on XP and that is not supported by vlc dxva.

    Sent from my HTC Desire using Tapatalk
     

    Shukuyen

    Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    Hi there,

    I started researching GMA for integration in CouchPotato and want to say thank you for coding this!
    There are some things that came to mind, maybe you will find this feedback helpful:

    • It would be useful (correct) if the response content type could be set to application/json (for the json endpoints, of course)
    • Some services don't return valid JSON: GetEpisodesCount, GetSeriesCount
    • Responses for invalid parameters are not consistent. Sometimes you get an exception, then an empty array and then even nothing. This is a little confusing :)
    • Parameters aren't always consistent. For example most of the time it's "seasonNumber" but in GetEpisodesCountForSeason it is "season".

    Those are just some small nitpicky things, but I think it would make the service even better if those were considered.


    Also I started documenting the JSON endpoints on my way of playing with the service. You can find that here:
    Service Endpoints - MediaPortal Wiki

    Please feel free to extend and correct that, if I missed or got something wrong. It's mostly tv series for now.
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Hi there,

    I started researching GMA for integration in CouchPotato and want to say thank you for coding this!
    There are some things that came to mind, maybe you will find this feedback helpful:

    • It would be useful (correct) if the response content type could be set to application/json (for the json endpoints, of course)
    I'll take a look, that should indeed be corrected.
    • Some services don't return valid JSON: GetEpisodesCount, GetSeriesCount
    I think that's actually a problem with WCF. These methods just return an int instead of a complex structure. I'll discuss it.
    • Responses for invalid parameters are not consistent. Sometimes you get an exception, then an empty array and then even nothing. This is a little confusing :)
    We should do better parameter verification indeed.
    • Parameters aren't always consistent. For example most of the time it's "seasonNumber" but in GetEpisodesCountForSeason it is "season".

    Those are just some small nitpicky things, but I think it would make the service even better if those were considered.


    Also I started documenting the JSON endpoints on my way of playing with the service. You can find that here:
    Service Endpoints - MediaPortal Wiki

    Please feel free to extend and correct that, if I missed or got something wrong. It's mostly tv series for now.
    I'm feeling bad now about this, but we're going to break the API again in the next release (which will be the last time we break it for a long time). Our plans for the next release are to make the API more generic, so that we can easily add support for other database (for example MyFilms). As part of this we've to break backwards compatibility though. I'll integrate your remarks in the new API. For now you can probably go ahead implementing, as I think it'll take some time before we have release and it'll probably end up only being changed in details (like parameter names as you suggested). I'll create a list of changes when we've finished implementing it.

    Btw, for all developers using the service, we are aware of the fact that documentation is currently totally lacking. The best source to start is probably the source code at this moment. If you want live support, you can join #mp-extended on irc.freenode.net (IRC) where I (and other team members too) around to answer your questions. If you prefer WLM you can send me a PM. (Of course we'll answer on the forums too).
     

    Shukuyen

    Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    Thanks Oxan,

    I think I will implement this as a proof of concept with the current api and then switch to the new one before publishing my update. If you are breaking it anyway you may want to have a look at the responses, too. There are some small German / English mixups in there, like "Serie" instead of Series.

    Also I will put the documentation on hold until the next version and join the IRC channel. The source is quite ok as a reference once you find the right places, but some more comments wouldn't hurt :D Also I think the wiki documentation will help new developers and I hope I can contribute there.
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Yeah, there's quite some Dutch and German influenced English in our API, but I intent to fix that as far as my English allows. At least the serie case is already fixed in our working branch (it's replaced with tvshow actually).

    And yes, we could indeed comment some more. I've already spent some time to cleanup our internal code a bit but it still can be done better. Just tell me where you've encountered problems, I'll fix them first then. Documentation would indeed help new developers and it's high on my todo list but I don't have as much time as I want to spend on MPExtended (the name of our rebranding of tv4home+gma into a single project).
     

    Shukuyen

    Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    And yes, we could indeed comment some more. I've already spent some time to cleanup our internal code a bit but it still can be done better. Just tell me where you've encountered problems, I'll fix them first then. Documentation would indeed help new developers and it's high on my todo list but I don't have as much time as I want to spend on MPExtended (the name of our rebranding of tv4home+gma into a single project).

    My "problems" were mostly related to parameters and possible values for those (order, sort, ..), but I only touched the surface yet.

    Your plans are really sounding great. Do you have that written down somewhere? I would love to read more about what you want to do. Also if there is anything I can help with please let me know. We are doing some related things with WifiRemote (used to send remote commands and more via tcp/ip) so maybe there is the possibility to coordinate those two projects so that we don't duplicate too much code :)
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    My "problems" were mostly related to parameters and possible values for those (order, sort, ..), but I only touched the surface yet.
    Ah yeah, I'll add a note about that to the source when I'm firing up VS again.

    Your plans are really sounding great. Do you have that written down somewhere? I would love to read more about what you want to do. Also if there is anything I can help with please let me know. We are doing some related things with WifiRemote (used to send remote commands and more via tcp/ip) so maybe there is the possibility to coordinate those two projects so that we don't duplicate too much code :)
    No, we haven't written it down yet; most of the ideas are in our heads and the WLM/IRC history. Basically during development of the streaming features for GMA and TV4Home we came to the conclusion that streaming was so complicated that it deserved it's own service. Because letting the user install 3 separate services was a bit too much in our opinion, our main goal was to make it easier for the user to setup. This means that for singleseat setups there is only one installer. To accomplish this, we've merged all source (GMA, TV4Home and MPWebStream) code into a single project, cleaned it up and removed redunant code, so that we now have a common base for remote access to both the MediaPortal client and server. This includes a single service that hosts everything and handles configuration/authentication. Multiseat is slightly more complicated but still supported. For the next release our plans basically are a major cleanup of the GMA API and code, much easier setup, improved streaming (HTTP Live Streaming + VLC support) and some other things I'm not really sure about.
    (I want to warn people though - all stuff in there is highly experimental at the moment and isn't ready for production yet).

    I'm not sure how WifiRemote fits into this image. All our services are WCF based. I think it's the best if you talk about this with DieBagger, given that he's both a WifiRemote and MPExtended dev (really, kudos to all his work!).
     

    cederron

    Portal Member
    December 27, 2010
    16
    4
    Home Country
    Spain Spain
    if you are into new projects guys i would love the functionality of WifiRemote but in the form of a web service like tv4home/gmawebservices, much easier/reliable to work with than tcp.
    Maybe i give it a try but so little time :(
     

    Users who are viewing this thread

    Top Bottom