mirror of https://github.com/mpv-player/mpv
parent
6c1e528518
commit
bf74a4cc46
|
@ -3032,6 +3032,11 @@ Miscellaneous
|
|||
You can also try to use ``--no-correct-pts`` for files with completely
|
||||
broken timestamps.
|
||||
|
||||
``--media-title=<string>``
|
||||
Force the contents of the ``media-title`` property to this value. Useful
|
||||
for scripts which want to set a title, without overriding the user's
|
||||
setting in ``--title``.
|
||||
|
||||
``--slave-broken``
|
||||
Switches on the old slave mode. This is for testing only, and incompatible
|
||||
to the removed ``--slave`` switch.
|
||||
|
|
|
@ -379,6 +379,7 @@ const m_option_t mp_opts[] = {
|
|||
// vo name (X classname) and window title strings
|
||||
OPT_STRING("x11-name", vo.winname, 0),
|
||||
OPT_STRING("title", wintitle, 0),
|
||||
OPT_STRING("media-title", media_title, 0),
|
||||
// set aspect ratio of monitor - useful for 16:9 TV-out
|
||||
OPT_FLOATRANGE("monitoraspect", vo.force_monitor_aspect, 0, 0.0, 9.0),
|
||||
OPT_FLOATRANGE("monitorpixelaspect", vo.monitor_pixel_aspect, 0, 0.2, 9.0),
|
||||
|
|
|
@ -79,6 +79,7 @@ typedef struct MPOpts {
|
|||
int allow_win_drag;
|
||||
|
||||
char *wintitle;
|
||||
char *media_title;
|
||||
int force_rgba_osd;
|
||||
|
||||
// ranges -100 - 100, 1000 if the vo default should be used
|
||||
|
|
|
@ -229,6 +229,10 @@ static int mp_property_media_title(void *ctx, struct m_property *prop,
|
|||
{
|
||||
MPContext *mpctx = ctx;
|
||||
char *name = NULL;
|
||||
if (mpctx->opts->media_title)
|
||||
name = mpctx->opts->media_title;
|
||||
if (name && name[0])
|
||||
return m_property_strdup_ro(action, arg, name);
|
||||
if (mpctx->resolve_result)
|
||||
name = mpctx->resolve_result->title;
|
||||
if (name && name[0])
|
||||
|
|
Loading…
Reference in New Issue