[MPlayer-dev-eng] simple Blu-ray playback [Patch]

Alexander Roalter alex at roalter.it
Fri Jul 2 01:07:24 CEST 2010


On 07/02/2010 12:13 AM, Alexander Roalter wrote:
> On 07/01/2010 11:46 PM, Reimar Döffinger wrote:
>> On Thu, Jul 01, 2010 at 10:59:54PM +0200, Alexander Roalter wrote:
>>> #define ST_OFF(f) M_ST_OFF(struct stream_priv_s,f)
>>> static const m_option_t stream_opts_fields[] = {
>>>     { "track", ST_OFF(title),  CONF_TYPE_INT, M_OPT_RANGE, 0, 99999, NULL},
>>>     { "mountpoint", ST_OFF(device), CONF_TYPE_STRING, 0, 0 ,0, NULL},
>>>     { NULL, NULL, 0, 0, 0, 0,  NULL }
>>> };
>>>
>>> const stream_info_t stream_info_bd = {
>>>     "Bluray",
>>>     "bd",
>>>     "cRTrn13",
>>>     "",
>>>     bd_stream_open,
>>>     { "bd", NULL },
>>>     &stream_opts,
>>>     0
>>> };
>>>
>>> but I cannot specify neither mplayer bd://1 -dvd-device /mnt/bd, nor
>>> mplayer bd://1@/mnt/bd, in both cases the defaults are used. Is there
>>> any hidden magic behind it?
>>
>> Somewhat.
>> First, you can chose between URL and option parsing, that's the last 0
>> in stream_info_t.
>> If you change it to 1, something like
>> bd://track=...:mountpoint=...
>> should work (if you specify them in-order, the part before the '=' should
>> not be necessary).
>> If you don't do that, there is no way to set those options from the
>> command-line.
>> Only username, password, hostname, ... options can be set, and
>> they are determined by doing URL-parsing, i.e. splitting like
>> bd://user:passwd@host/file
> thx for the info, will try around with it... It begins to make sense.
> 
I have it now if I follow it exactly from stream_dvd.c, which uses
"hostname" and "filename". Other names won't do, either with opts_url =
1 or 0...

At least the current version does not really behave as described, but
with the current setting I can live with...

Attached is the patch for normal blu-ray playback when you have a
working key database file for the Blu-ray. It does the automatic lookup
and bails out when no key is found. No support for BD+ and titles that
are not found in one piece on the BD (i.e. no playlist support).

Currently, it works for 50% of my Blu-rays (1 out of 2 :)

I borrowed the configure changes from Benjamin Zores' patch for libbluray.

a blu-ray that matches the above criteria can be played either by

mplayer bd://0 -dvd-device /mnt/bd

or

mplayer bd://0/mnt/bd

or

mplayer bd://0 (if the pre-defined mount-patch matches the real path to
the blu-ray)


All error and status messages have been mp_msg-ified, reading keys from
the database now also is a bit more elegant as before.

-- 
Cheers,
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bd_stream_5.diff
Type: text/x-patch
Size: 13364 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100702/baa74d5d/attachment.bin>


More information about the MPlayer-dev-eng mailing list