Chunking Renderers e.g. Sony Bluray Revisited

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

Chunking Renderers e.g. Sony Bluray Revisited

Postby infidel » Tue Sep 13, 2011 4:23 pm

Sony bluray players have been working Ok for a year now after 2 (by now well-tested I'd say) patches, WoH #822 and/or patters, which remain unapplied to svn. For those of us rolling our own keeping up with svn has become somewhat of a chore of late due to the (very welcome :) ) pickup in the pace of development, so here's my stab at resolving things.

I've refactored the two existing patches to separate out the chunked response issue, which I then reworked from scratch so as to make a formal distinction between chunking and 'normal' response modes. Having gone through the exercise it doesn't seem to me that these modes are really that far apart and that making the distinction is ultimately necessary, but testing will tell I guess:

Patch 1 - Chunked Response Mode ( View )

This patch adds a 'ChunkedTransfer' option to renderer.conf which activates these basic differences with the default PMS content header:
  • Content-Length refers to the immediate chunk, not the overall media size.
  • Content-Length is never more than was specifically requested.
  • Content-Length is omitted if total media size is unknown and the requested range is open-ended, only Content-Range is sent.
  • No spoofing via arbitrary media sizes, i.e DLNAMediaInfo.TRANS_SIZE (in current svn this is already disabled for Content-Length but not Content-Range).
  • Not strictly necessary, but for slightly less non-compliance with HTTP/1.1 '*' replaces '-1' to signify unspecified in Content-Range. We ignore the requirement that highRange always be absolute.
With this patch both direct streaming and transcoding work on the Sony BDP-S370 as long as we have a good conf file (see part 3 below). Chunked response should also work for the PS3 and other non-chunking renderers, i.e. there don't seem to be any inherent conflicts afaict but all I have is the one renderer. I'd be interested in feedback on this (test jar is below).

Patch 2 - PartialContentRange (WoH #822) ( View )

Already discussed (issue #822) and applied in the SubJunk and ExSport builds, it ensures that reading is efficient. The patch below is the core implementation, minus WoH's original mods to RequestV2.java. Needless to say there are no inherent conflicts here either. I'd also note that with this patch available bytes are automatically constrained to requested bytes so one more difference between chunked and 'normal' mode disappears.

Patch 3 - Sony bluray image thumbnails and M2TS support (patters) ( View )

This patch includes the following (imo) uncontroversial changes to get image thumbs and m2ts working in sony bluray, and doesn't break anything either:
  • Gives jpeg thumbnails a dedicated renderer option, 'ForceJPGThumbnails'. Currently RendererConfiguration.isBRAVIA() does double duty as a switch for jpeg thumbs and a temporary Bravia-specific muxing fix, unwanted here. This patch is implemented in a backward-compatible way vis. isBRAVIA(). See also the original discussion.
  • Ensures that a localized MPEG_TS_SD_xx dlna tag is sent for the 'video/vnd.dlna.mpeg-tts' mime-type.
  • Adds a default SonyBluray.conf.
Note: video thumbs aren't supported by Sony bluray players.

Test jar ( pms-chunkedresponse-sonybluray.zip )

For quick testing drop the enclosed update.jar (all 3 patches applied to r803 for pmsencoder compatibility) into your PMS (1.31) folder and add the following to your renderer's conf file:
Code: Select all
ChunkedTransfer=true
(and if applicable temporarily comment out 'http_engine_v2 = false' in your PMS.conf).


EDIT: Patches can be downloaded from the ps3mediaserver issue #822 page.
Last edited by infidel on Tue Sep 13, 2011 9:49 pm, edited 3 times in total.
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm

Re: Chunking Renderers e.g. Sony Bluray Revisited

Postby WorldOfHurt » Tue Sep 13, 2011 4:46 pm

Wow. Is my old patch still rattling around? I would have thought it would have been re-written long before now...

Glad it's still giving some useful service. Nice work, infidel.

:)
User avatar
WorldOfHurt
 
Posts: 252
Joined: Thu Mar 19, 2009 10:49 pm
Location: Winchester, UK

Re: Chunking Renderers e.g. Sony Bluray Revisited

Postby infidel » Tue Sep 13, 2011 4:59 pm

WorldOfHurt wrote:Glad it's still giving some useful service

It definitely is, thanks from a very satisfied customer :)
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm

Re: Chunking Renderers e.g. Sony Bluray Revisited

Postby Raptor399 » Tue Sep 20, 2011 6:15 pm

I'll see if I can speed things up a bit.
Thanks for the reminder and the summary!
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Chunking Renderers e.g. Sony Bluray Revisited

Postby Raptor399 » Tue Sep 20, 2011 8:58 pm

Looked fine, committed in r826.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Chunking Renderers e.g. Sony Bluray Revisited

Postby ExSport » Tue Sep 20, 2011 9:23 pm

W'o'H partial content range patch is already committed in SB build for testing.
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Chunking Renderers e.g. Sony Bluray Revisited

Postby infidel » Wed Sep 21, 2011 3:06 pm

Thanks for moving on this. I'm still curious to find out whether chunked response works for non-chunking renderers, and if so does it cost anything performance-wise?
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 3 guests