[vlc-devel] [PATCH] bluray: add support for stream input

Petri Hintukainen phintuka at gmail.com
Tue Dec 15 12:21:22 CET 2015


On ti, 2015-12-15 at 10:22 +0100, Jean-Baptiste Kempf wrote:
> On 15 Dec, Petri Hintukainen wrote :
> > +        set_description( N_("BluRay demuxer") )
> 
> Do we _need_ a specific translation for this?

I don't know. This is how it was done with DVD plugin.

> > +    /* first sector(s) should be filled with zeros */
> > +    size_t i_peek;
> > +    const uint8_t *p_peek;
> > +    i_peek = stream_Peek( p_demux->s, &p_peek, 2048 );
> 
> Why 2048 ?

Size of one sector. It could be larger too, but I don't know if it
would be acceptable. Asking 512kb for every file could slow down
preparsing ?

Of course it could be incremental (first ask & check 512 bytes, then
512kb if first bytes were NUL). But, reading 512kb is still overkill;
only last 16 bytes would be checked.

> >  static int blurayOpen(vlc_object_t *object)
> >  {
> >      demux_t *p_demux = (demux_t*)object;
> >      demux_sys_t *p_sys;
> > +    bool forced;
> >  
> >      const char *error_msg = NULL;
> >  #define BLURAY_ERROR(s) do { error_msg = s; goto error; } while(0)
> >  
> > -    if (strcmp(p_demux->psz_access, "bluray")) {
> > -        // TODO BDMV support, once we figure out what to do in
> > libbluray
> the TODO is done?

I don't understand what it means. That check prevents using bluray
module unless it was explicitly requested (bluray:///something). This
of course does not work if data is read from access plugin.

Removing the check would allow using "vlc d:\", "vlc /some/path", ...,
but would also add significant overhead to probing. There's nothing
that needs to be done in libbluray.


The check is still in access_demux path. Also, local files still
require using bluray://... so that access plugin won't be used. It
would add overhead and prevent interacting with the drive.

I can add checks for local files later (that would allow ex. "vlc
/xxx.iso" or "vlc d:\" to start BluRay playback). This patch is just to
allow playback of remote disc image files (my laptop has limited
storage space ...).

Probing for BluRays should also allow BluRay playback directly from GUI
playlist/directory browser. Currently BluRay image files can be played
only from command-line. And Open Disc... menu is rather slow to use
with anything else than the default path.


> With my kindest regards,
> 


More information about the vlc-devel mailing list