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

Alexander Roalter alex at roalter.it
Thu Jul 1 22:59:54 CEST 2010


while trying to finetune the BD patch, I went into some unforeseen
obstacles, namely the correct parsing of the command line

currently, I have the following:

static struct stream_priv_s {
    int title;
    char *device;
} stream_priv_dflts = {
    0,
    NULL
};

static int bd_stream_open(stream_t *s, int mode, void* opts, int*
file_format);

#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 }
};

static const struct m_struct_st stream_opts = {
    "bd",
    sizeof(struct stream_priv_s),
    &stream_priv_dflts,
    stream_opts_fields
};

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?

-- 
Cheers,
Alex



More information about the MPlayer-dev-eng mailing list