Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
463b877ec0 | ||
|
|
72c81aa111 | ||
|
|
9f7c014930 | ||
|
|
97eddff865 | ||
|
|
cf880b9070 | ||
|
|
3478575419 | ||
|
|
88a53309cd | ||
|
|
da76eb9f14 | ||
|
|
df6901b653 | ||
|
|
53e4ba26b5 | ||
|
|
f10a3cac0f | ||
|
|
7370ad2120 | ||
|
|
ed2d819ea5 | ||
|
|
4f728cfb99 |
No files matched your search
+6
-2
@@ -17,8 +17,8 @@ in the list. Suboptions are optional and can mostly be omitted.
|
||||
.. admonition:: Examples
|
||||
|
||||
- ``--ao=alsa,oss,`` Try the ALSA driver, then the OSS driver, then others.
|
||||
- ``--ao=alsa:noblock:device=hw=0.3`` Sets noblock-mode and the device-name
|
||||
as first card, fourth device.
|
||||
- ``--ao=alsa:noblock:device=[hw:0,3]`` Sets noblock-mode and the
|
||||
device-name as first card, fourth device.
|
||||
|
||||
Available audio output drivers are:
|
||||
|
||||
@@ -48,6 +48,10 @@ Available audio output drivers are:
|
||||
|
||||
``--ao=alsa:device=[plug:surround50]``
|
||||
|
||||
Note that the ``[`` and ``]`` simply quote the device name. With some
|
||||
shells (like zsh), you have to quote the option string to prevent the
|
||||
shell from interpreting the brackets instead of passing them to mpv.
|
||||
|
||||
``oss``
|
||||
OSS audio output driver
|
||||
|
||||
|
||||
+35
-2
@@ -27,7 +27,8 @@ General Changes for MPlayer to mplayer2
|
||||
* Use libass for subtitle rendering by default (better quality)
|
||||
* Generally preferring ffmpeg/libav over internal demuxers and decoders
|
||||
* Improvements when playing multiple files (``--fixed-vo``)
|
||||
* Screenshot improvements (instant screenshots without 1-frame delay)
|
||||
* Screenshot improvements (instant screenshots without 1-frame delay, allow
|
||||
taking screenshots even with hardware decoding)
|
||||
* Improved support for PulseAudio
|
||||
* General code cleanups
|
||||
* Many more changes
|
||||
@@ -55,6 +56,9 @@ General Changes for mplayer2 to mpv
|
||||
``screenshot`` video filter is not needed anymore, and should not be put
|
||||
into the mpv config file)
|
||||
* Removal of teletext support
|
||||
* Removal of most builtin demuxers, using libavformat instead
|
||||
* Removal of builtin network support, using libavformat instead (also,
|
||||
support https via libavformat)
|
||||
* Replace image VOs (``--vo=jpeg`` etc.) with ``--vo=image``
|
||||
* Do not lose settings when playing a new file in the same player instance
|
||||
* New location for config files, new name for the binary.
|
||||
@@ -68,7 +72,35 @@ General Changes for mplayer2 to mpv
|
||||
* Wayland support
|
||||
* Support for precise scrolling which scales the parameter of commands. If the
|
||||
input doesn't support precise scrolling the scale factor stays 1.
|
||||
* General code cleanups
|
||||
* OSX: Cocoa event loop is independent from mplayer's event loop, so user
|
||||
actions like accessing menus and live resizing do not block the playback.
|
||||
* OSX: Apple Remote support.
|
||||
* OSX: Media Keys support.
|
||||
* Windows: Added WASAPI audio output.
|
||||
* New OSD bar with chapter marks and not positioned in the middle of the video
|
||||
(though this can be customized with the ``--osd-bar-align-y`` option).
|
||||
* Allow customizing whether a key binding for seeking shows the video time, the
|
||||
OSD bar, or nothing (see section `Input Command Prefixes`_).
|
||||
* Display list of chapters and audio/subtitle tracks on OSD (see section
|
||||
`Properties`_).
|
||||
* ``--keep-open`` option to stop the player from closing the window and
|
||||
exiting after playback ends.
|
||||
* Re-enable screensaver while the player is paused.
|
||||
* Matroska edition switching at runtime.
|
||||
* Support for libavfilter (for video->video and audio->audio). This allows
|
||||
using most of FFmpeg's filters, which improve greatly on the old MPlayer
|
||||
filters in features, performance, and correctness.
|
||||
* Improved downmixing and output of surround audio. Instead of using hardcoded
|
||||
pan filters to do remixing, use libavresample. Channel maps are used to
|
||||
identify the channel layout, so e.g. ``3.0`` and ``2.1`` audio can be
|
||||
distinguished.
|
||||
* Allow resuming playback at a later point with ``Shift+q``, also see
|
||||
``quit_watch_later`` input command.
|
||||
* Support mapping multiple commands to one key.
|
||||
* Allow changing/adjusting video filters at runtime. (This is also used to make
|
||||
the ``D`` key insert vf_yadif if deinterlacing is not supported otherwise.)
|
||||
* General bug fixes and removal of long-standing issues
|
||||
* General code cleanups (including refactoring or rewrites of many parts)
|
||||
* Many more changes
|
||||
|
||||
Detailed Listing of User-visible Changes
|
||||
@@ -136,6 +168,7 @@ Command Line Switches
|
||||
``-rawvideo ...`` ``--demuxer-rawvideo-...``
|
||||
``--mixer`` AO suboptions (``alsa``, ``oss``)
|
||||
``--mixer-channel`` AO suboptions (``alsa``, ``oss``)
|
||||
``--ao=alsa:device=hw=0.3`` ``--ao=alsa:device=[hw:0,3]``
|
||||
=========================== ========================================
|
||||
|
||||
.. note::
|
||||
|
||||
+3
-3
@@ -77,12 +77,12 @@ const demuxer_desc_t *const demuxer_list[] = {
|
||||
#endif
|
||||
&demuxer_desc_matroska,
|
||||
&demuxer_desc_lavf,
|
||||
&demuxer_desc_subreader,
|
||||
&demuxer_desc_mf,
|
||||
#ifdef CONFIG_MNG
|
||||
&demuxer_desc_mng,
|
||||
#endif
|
||||
// auto-probe last, because it checks file-extensions only
|
||||
&demuxer_desc_mf,
|
||||
// Pretty aggressive, so should be last.
|
||||
&demuxer_desc_subreader,
|
||||
/* Please do not add any new demuxers here. If you want to implement a new
|
||||
* demuxer, add it to libavformat, except for wrappers around external
|
||||
* libraries and demuxers requiring binary support. */
|
||||
|
||||
@@ -1341,6 +1341,8 @@ static int d_open_file(struct demuxer *demuxer, enum demux_check check)
|
||||
if (!res)
|
||||
return -1;
|
||||
|
||||
demuxer->filetype = sr.name;
|
||||
|
||||
sub_data *sd = sub_read_file(demuxer->stream, &sr);
|
||||
if (!sd)
|
||||
return -1;
|
||||
|
||||
+8
-6
@@ -739,12 +739,12 @@ static void load_per_output_config(m_config_t *conf, char *cfg, char *out)
|
||||
* Tries to load a config file (in file local mode)
|
||||
* @return 0 if file was not found, 1 otherwise
|
||||
*/
|
||||
static int try_load_config(m_config_t *conf, const char *file)
|
||||
static int try_load_config(m_config_t *conf, const char *file, bool local)
|
||||
{
|
||||
if (!mp_path_exists(file))
|
||||
return 0;
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Loading config '%s'\n", file);
|
||||
m_config_parse_config_file(conf, file, M_SETOPT_BACKUP);
|
||||
m_config_parse_config_file(conf, file, local ? M_SETOPT_BACKUP : 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -767,14 +767,14 @@ static void load_per_file_config(m_config_t *conf, const char * const file,
|
||||
char dircfg[MP_PATH_MAX];
|
||||
strcpy(dircfg, cfg);
|
||||
strcpy(dircfg + (name - cfg), "mpv.conf");
|
||||
try_load_config(conf, dircfg);
|
||||
try_load_config(conf, dircfg, true);
|
||||
|
||||
if (try_load_config(conf, cfg))
|
||||
if (try_load_config(conf, cfg, true))
|
||||
return;
|
||||
}
|
||||
|
||||
if ((confpath = mp_find_user_config_file(name)) != NULL) {
|
||||
try_load_config(conf, confpath);
|
||||
try_load_config(conf, confpath, true);
|
||||
|
||||
talloc_free(confpath);
|
||||
}
|
||||
@@ -889,7 +889,9 @@ static void load_playback_resume(m_config_t *conf, const char *file)
|
||||
{
|
||||
char *fname = get_playback_resume_config_filename(file);
|
||||
if (fname) {
|
||||
try_load_config(conf, fname);
|
||||
// Never apply the saved start position to following files
|
||||
m_config_backup_opt(conf, "start");
|
||||
try_load_config(conf, fname, false);
|
||||
unlink(fname);
|
||||
}
|
||||
talloc_free(fname);
|
||||
|
||||
@@ -65,12 +65,8 @@ struct bluray_priv_s {
|
||||
char *cfg_device;
|
||||
};
|
||||
|
||||
static const struct stream_priv_s {
|
||||
int title;
|
||||
char *device;
|
||||
} bluray_stream_priv_dflts = {
|
||||
BLURAY_DEFAULT_TITLE,
|
||||
NULL
|
||||
static struct bluray_priv_s bluray_stream_priv_dflts = {
|
||||
.cfg_title = BLURAY_DEFAULT_TITLE
|
||||
};
|
||||
|
||||
#define OPT_BASE_STRUCT struct bluray_priv_s
|
||||
|
||||
+6
-1
@@ -302,6 +302,8 @@ static void multiply_timings(struct packet_list *subs, double factor)
|
||||
}
|
||||
}
|
||||
|
||||
#define MS_TS(f_ts) ((int)((f_ts) * 1000 + 0.5))
|
||||
|
||||
// Remove overlaps and fill gaps between adjacent subtitle packets. This is done
|
||||
// by adjusting the duration of the earlier packet. If the gaps or overlap are
|
||||
// larger than the threshold, or if the durations are close to the threshold,
|
||||
@@ -322,7 +324,10 @@ static void fix_overlaps_and_gaps(struct packet_list *subs)
|
||||
if (fabs(next->pts - end) <= threshold && cur->duration >= keep &&
|
||||
next->duration >= keep)
|
||||
{
|
||||
cur->duration = next->pts - cur->pts;
|
||||
// Conceptually: cur->duration = next->pts - cur->pts;
|
||||
// But make sure the rounding and conversion to integers in
|
||||
// sd_ass.c can't produce overlaps.
|
||||
cur->duration = (MS_TS(next->pts) - MS_TS(cur->pts)) / 1000.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-23
@@ -18,6 +18,7 @@
|
||||
#include <stddef.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavcodec/vdpau.h>
|
||||
#include <libavutil/common.h>
|
||||
|
||||
@@ -41,33 +42,22 @@ struct priv {
|
||||
|
||||
struct profile_entry {
|
||||
enum AVCodecID av_codec;
|
||||
int ff_profile;
|
||||
VdpDecoderProfile vdp_profile;
|
||||
int maxrefs;
|
||||
};
|
||||
|
||||
#define PE(av_codec_id, ff_profile, vdp_dcoder_profile, maxrefs) \
|
||||
#define PE(av_codec_id, vdp_dcoder_profile, maxrefs) \
|
||||
{AV_CODEC_ID_ ## av_codec_id, \
|
||||
FF_PROFILE_ ## ff_profile, \
|
||||
VDP_DECODER_PROFILE_ ## vdp_dcoder_profile, \
|
||||
maxrefs}
|
||||
|
||||
static const struct profile_entry profiles[] = {
|
||||
PE(MPEG1VIDEO, UNKNOWN, MPEG1, 2),
|
||||
PE(MPEG2VIDEO, MPEG2_SIMPLE, MPEG2_SIMPLE, 2),
|
||||
PE(MPEG2VIDEO, UNKNOWN, MPEG2_MAIN, 2),
|
||||
PE(H264, H264_BASELINE, H264_BASELINE, 16),
|
||||
PE(H264, H264_CONSTRAINED_BASELINE, H264_BASELINE, 16),
|
||||
PE(H264, H264_MAIN, H264_MAIN, 16),
|
||||
PE(H264, UNKNOWN, H264_HIGH, 16),
|
||||
PE(WMV3, VC1_SIMPLE, VC1_SIMPLE, 2),
|
||||
PE(WMV3, VC1_MAIN, VC1_MAIN, 2),
|
||||
PE(WMV3, UNKNOWN, VC1_ADVANCED, 2),
|
||||
PE(VC1, VC1_SIMPLE, VC1_SIMPLE, 2),
|
||||
PE(VC1, VC1_MAIN, VC1_MAIN, 2),
|
||||
PE(VC1, UNKNOWN, VC1_ADVANCED, 2),
|
||||
PE(MPEG4, MPEG4_SIMPLE, MPEG4_PART2_SP, 2),
|
||||
PE(MPEG4, UNKNOWN, MPEG4_PART2_ASP,2),
|
||||
PE(MPEG1VIDEO, MPEG1, 2),
|
||||
PE(MPEG2VIDEO, MPEG2_MAIN, 2),
|
||||
PE(H264, H264_HIGH, 16),
|
||||
PE(WMV3, VC1_MAIN, 2),
|
||||
PE(VC1, VC1_ADVANCED, 2),
|
||||
PE(MPEG4, MPEG4_PART2_ASP,2),
|
||||
};
|
||||
|
||||
// libavcodec absolutely wants a non-NULL render callback
|
||||
@@ -123,15 +113,11 @@ static bool create_vdp_decoder(struct lavc_ctx *ctx)
|
||||
|
||||
const struct profile_entry *pe = NULL;
|
||||
for (int n = 0; n < MP_ARRAY_SIZE(profiles); n++) {
|
||||
if (profiles[n].av_codec == ctx->avctx->codec_id &&
|
||||
(profiles[n].ff_profile == ctx->avctx->profile ||
|
||||
profiles[n].ff_profile == FF_PROFILE_UNKNOWN))
|
||||
{
|
||||
if (profiles[n].av_codec == ctx->avctx->codec_id) {
|
||||
pe = &profiles[n];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pe) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "[vdpau] Unknown codec!\n");
|
||||
goto fail;
|
||||
|
||||
@@ -206,7 +206,8 @@ static uint64_t convert_to_vdptime(struct vo *vo, uint64_t t)
|
||||
|
||||
static int render_video_to_output_surface(struct vo *vo,
|
||||
VdpOutputSurface output_surface,
|
||||
VdpRect *output_rect)
|
||||
VdpRect *output_rect,
|
||||
VdpRect *video_rect)
|
||||
{
|
||||
struct vdpctx *vc = vo->priv;
|
||||
struct vdp_functions *vdp = vc->vdp;
|
||||
@@ -238,7 +239,7 @@ static int render_video_to_output_surface(struct vo *vo,
|
||||
vdp_st = vdp->video_mixer_render(vc->video_mixer, VDP_INVALID_HANDLE,
|
||||
0, field, 2, past_fields,
|
||||
bv[dp/2].surface, 1, future_fields,
|
||||
&vc->src_rect_vid, output_surface,
|
||||
video_rect, output_surface,
|
||||
NULL, output_rect, 0, NULL);
|
||||
CHECK_ST_WARNING("Error when calling vdp_video_mixer_render");
|
||||
return 0;
|
||||
@@ -250,7 +251,7 @@ static int video_to_output_surface(struct vo *vo)
|
||||
|
||||
return render_video_to_output_surface(vo,
|
||||
vc->output_surfaces[vc->surface_num],
|
||||
&vc->out_rect_vid);
|
||||
&vc->out_rect_vid, &vc->src_rect_vid);
|
||||
}
|
||||
|
||||
static int next_deint_queue_pos(struct vo *vo, bool eof)
|
||||
@@ -1261,7 +1262,7 @@ static struct mp_image *get_screenshot(struct vo *vo)
|
||||
}
|
||||
|
||||
VdpRect rc = { .x1 = vc->vid_width, .y1 = vc->vid_height };
|
||||
render_video_to_output_surface(vo, vc->screenshot_surface, &rc);
|
||||
render_video_to_output_surface(vo, vc->screenshot_surface, &rc, &rc);
|
||||
|
||||
struct mp_image *image = read_output_surface(vc, vc->screenshot_surface,
|
||||
vc->vid_width, vc->vid_height);
|
||||
|
||||
@@ -1040,9 +1040,6 @@ void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y,
|
||||
if (flags & VOFLAG_HIDDEN)
|
||||
return;
|
||||
|
||||
if (opts->ontop)
|
||||
vo_x11_setlayer(vo, x11->window, opts->ontop);
|
||||
|
||||
bool reset_size = !(x11->old_dwidth == width && x11->old_dheight == height);
|
||||
if (x11->window_hidden) {
|
||||
x11->nofs_x = x;
|
||||
@@ -1075,6 +1072,9 @@ void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y,
|
||||
}
|
||||
}
|
||||
|
||||
if (opts->ontop)
|
||||
vo_x11_setlayer(vo, x11->window, opts->ontop);
|
||||
|
||||
vo_x11_fullscreen(vo);
|
||||
|
||||
XSync(x11->display, False);
|
||||
|
||||
Reference in new issue
Block a user