Cling

Discuss issues related to PS3 Media Server development (only for programmers)

Re: Cling

Postby Raptor399 » Sun May 27, 2012 7:46 pm

lightglitch wrote:And to support xbox you need more extra info, that's why I give chii as an example.

I'll be sure to have a look when the integration actually works, thanks.
First things first! ;-)

Code: Select all
UpnpServiceConfiguration configuration = new DefaultUpnpServiceConfiguration(STREAM_LISTEN_PORT);

Don't need the port, cling will use an automatic given by the system.


Yes, I noticed that. I was more thinking about staying compatible with what we currently offer; people kind of expect to find PMS on port 5001 and the documentation is geared towards that (thinking of firewalls etc. here). For now I didn't want to run into bind problems with the HTTP server at 5001, so I fixed the STREAM_LISTEN_PORT to 5002 for now.

And in cling support you have utils for DLNA headers, and Protocol-info.

Indeed, I'm using those in DLNAResource.getDidlObject().
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Cling

Postby valib » Mon May 28, 2012 10:00 am

I have found small mistakes you did in DLNAResource.

Original code started at line 1115:

Code: Select all
     getDlnaOrgOp(mediaRenderer);
     addAttribute(sb, "xmlns:dlna", "urn:schemas-dlna-org:metadata-1-0/");

     String mime = getRendererMimeType(mimeType(), mediaRenderer);
     if (mime == null) {
        mime = "video/mpeg";
     }
     getDlnaOrgPn(mediaRenderer, mime, c);


Could be:

Code: Select all
            flags = getDlnaOrgOp(mediaRenderer);
            addAttribute(sb, "xmlns:dlna", "urn:schemas-dlna-org:metadata-1-0/");

            String mime = getRendererMimeType(mimeType(), mediaRenderer);
            if (mime == null) {
               mime = "video/mpeg";
            }
            dlnaspec = getDlnaOrgPn(mediaRenderer, mime, c);
valib
 
Posts: 6
Joined: Sun May 27, 2012 10:02 am

Re: Cling

Postby Raptor399 » Mon May 28, 2012 12:13 pm

Doh!
Looks like refactoring worked better than intended. Thanks!
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Cling

Postby valib » Thu May 31, 2012 2:51 pm

I fixed som bugs and now the first refactoring is working (not tested at TV).
code is at https://github.com/valib/ps3mediaserver/tree/cling
valib
 
Posts: 6
Joined: Sun May 27, 2012 10:02 am

Re: Cling

Postby Raptor399 » Thu May 31, 2012 6:43 pm

valib wrote:I fixed som bugs and now the first refactoring is working (not tested at TV).
code is at https://github.com/valib/ps3mediaserver/tree/cling

Cool, thanks!
I have included your fixes. Viewing files is still a challenge (I did see a working picture feed, though), but at least the stacktraces are gone! :-)
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Cling

Postby valib » Mon Jun 04, 2012 10:11 pm

Browsing is now working but still needs some improvements.
Code is at the usual place https://github.com/valib/ps3mediaserver/tree/cling
valib
 
Posts: 6
Joined: Sun May 27, 2012 10:02 am

Re: Cling

Postby taconaut » Wed Jun 06, 2012 3:57 pm

As I see some heavy development on this branch I'd like to chim in to ask to consider following: when we'll merge mlx into pms, the same file can show up multiple times in different folders depending on the configuration. It would be nice if the different instances could share the same reference to the actual video file then having to create it multiple times (as it is now). Would this be done on this layer or above?
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 1075
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: Cling

Postby Raptor399 » Wed Jun 06, 2012 7:42 pm

I haven't really delved into it, but I don't think all methods of the current DLNAResource subclasses are ready to handle that.
Many methods seem to rely on class fields containing things like unique identifiers, that will all crumble when the same resource can appear in different places.

I think it will be difficult to rewrite methods to allow multiple unique identifiers. Probably safer to solve it on the layer above and leave it as is. :-|
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Cling

Postby taconaut » Thu Jun 07, 2012 8:01 am

I don't think it's ready either, that's why I put the remark here so you can consider it while playing with cling. The dlna part identifying where a node is located in the tree has to be unique per object, what could be shared is the media object and maybe more. Currently when a media library folder is being browsed with pms-mlx, for each file a RealFile is being instanciated, the media retrieved from the db and set and the name generated. The resolving of the resource requires some work which could be avoided if the same file has been added before. This could be e.g. done with a helper or a static cache in RealFile. The goal is to reduce the memory footprint by avoiding to keep the same information multiple times.
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 1075
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 0 guests