[MPlayer-dev-eng] Question about m_option_t, and stream_info_t

Alexander Roalter alex at roalter.it
Fri Jul 2 00:13:29 CEST 2010


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.

-- 
Cheers,
Alex



More information about the MPlayer-dev-eng mailing list