Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecd2d90190 | ||
|
|
73e4094770 | ||
|
|
f5572919e4 | ||
|
|
93bf6eba3b | ||
|
|
150aeafdd2 | ||
|
|
1ef0d02245 | ||
|
|
74be07c36d | ||
|
|
54c371a293 | ||
|
|
4788b8323c | ||
|
|
df20f8fc06 | ||
|
|
c47bf17c0f | ||
|
|
64faa8c66b | ||
|
|
2f26f0b052 | ||
|
|
4fef2097ce | ||
|
|
669f5d42f0 |
No files matched your search
@@ -1927,6 +1927,12 @@
|
||||
current level. With values below 100 the initial volume (which is 100%)
|
||||
will be above the maximum, which e.g. the OSD cannot display correctly.
|
||||
|
||||
Note: the maximum value of ``--volume`` as well as the ``volume`` property
|
||||
is always 100. Likewise, the volume OSD bar always goes from 0 to 100.
|
||||
This means that with ``--softvol-max=200``, ``--volume=100`` means
|
||||
maximum amplification, i.e. amplify by 200%. The default volume will be
|
||||
``50`` in this case (meaning no amplification).
|
||||
|
||||
``--speed=<0.01-100>``
|
||||
Slow down or speed up playback by the factor given as parameter.
|
||||
|
||||
|
||||
@@ -389,13 +389,15 @@ static int decode_new_packet(struct sh_audio *sh)
|
||||
}
|
||||
int got_frame = 0;
|
||||
int ret = avcodec_decode_audio4(avctx, priv->avframe, &got_frame, &pkt);
|
||||
if (ret > 0) {
|
||||
// At least "shorten" decodes sub-frames, instead of the whole packet.
|
||||
// At least "mpc8" can return 0 and wants the packet again next time.
|
||||
if (ret >= 0) {
|
||||
ret = FFMIN(ret, mpkt->len); // sanity check against decoder overreads
|
||||
mpkt->buffer += ret;
|
||||
mpkt->len -= ret;
|
||||
mpkt->pts = MP_NOPTS_VALUE; // don't reset PTS next time
|
||||
}
|
||||
if (mpkt->len == 0 || ret <= 0) {
|
||||
if (mpkt->len == 0 || ret < 0) {
|
||||
talloc_free(mpkt);
|
||||
priv->packet = NULL;
|
||||
}
|
||||
|
||||
@@ -316,16 +316,16 @@ Optional features:
|
||||
--disable-bluray disable Blu-ray support [autodetect]
|
||||
--disable-dvdread disable libdvdread [autodetect]
|
||||
--disable-enca disable ENCA charset oracle library [autodetect]
|
||||
--enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
|
||||
--enable-macosx-bundle enable Mac OS X bundle file locations [disabled]
|
||||
--disable-pthreads disable Posix threads support [autodetect]
|
||||
--disable-libass disable subtitle rendering with libass [autodetect]
|
||||
--disable-libass-osd disable OSD rendering with libass [autodetect]
|
||||
--enable-rpath enable runtime linker path for extra libs [disabled]
|
||||
--disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
|
||||
--disable-libavdevice enable libavdevice demuxers [autodetect]
|
||||
--disable-libavfilter enable libavfilter [autodetect]
|
||||
--disable-vf-lavfi enable vf_lavfi libavfilter bridge [audodetect]
|
||||
--disable-af-lavfi enable af_lavfi libavfilter bridge [audodetect]
|
||||
--disable-libavdevice disable libavdevice demuxers [autodetect]
|
||||
--disable-libavfilter disable libavfilter [autodetect]
|
||||
--disable-vf-lavfi disable vf_lavfi libavfilter bridge [audodetect]
|
||||
--disable-af-lavfi disable af_lavfi libavfilter bridge [audodetect]
|
||||
|
||||
Codecs:
|
||||
--enable-mng enable MNG input support [autodetect]
|
||||
@@ -474,7 +474,7 @@ _cdda=auto
|
||||
_coreaudio=auto
|
||||
_corevideo=auto
|
||||
_cocoa=auto
|
||||
_macosx_bundle=auto
|
||||
_macosx_bundle=no
|
||||
_enca=auto
|
||||
_pthreads=auto
|
||||
_ass=auto
|
||||
@@ -709,7 +709,6 @@ for ac_option do
|
||||
--enable-cocoa) _cocoa=yes ;;
|
||||
--disable-cocoa) _cocoa=no ;;
|
||||
--enable-macosx-bundle) _macosx_bundle=yes ;;
|
||||
--disable-macosx-bundle) _macosx_bundle=no ;;
|
||||
|
||||
--enable-manpage) _build_man=yes ;;
|
||||
--disable-manpage) _build_man=no ;;
|
||||
@@ -1550,11 +1549,11 @@ echores "$_sys_sysinfo"
|
||||
if darwin; then
|
||||
|
||||
echocheck "Mac OS X Bundle file locations"
|
||||
def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE'
|
||||
test "$_macosx_bundle" = auto
|
||||
if test "$_macosx_bundle" = yes ; then
|
||||
extra_ldflags="$extra_ldflags -headerpad_max_install_names"
|
||||
def_macosx_bundle='#define CONFIG_MACOSX_BUNDLE 1'
|
||||
else
|
||||
def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE'
|
||||
fi
|
||||
echores "$_macosx_bundle"
|
||||
|
||||
|
||||
+23
-4
@@ -863,12 +863,31 @@ static void demux_seek_lavf(demuxer_t *demuxer, float rel_seek_secs,
|
||||
// API by default, because there are some major issues.
|
||||
// Set max_ts==ts, so that demuxing starts from an earlier position in
|
||||
// the worst case.
|
||||
int r = avformat_seek_file(priv->avfc, -1, INT64_MIN,
|
||||
priv->last_pts, priv->last_pts, avsflags);
|
||||
// To make this horrible situation even worse, some lavf demuxers have
|
||||
// broken timebase handling (everything that uses
|
||||
// ff_subtitles_queue_seek()), and always uses the stream timebase. So
|
||||
// we use the timebase and stream index of the first enabled stream
|
||||
// (i.e. a stream which can participate in seeking).
|
||||
int stream_index = -1;
|
||||
AVRational time_base = {1, AV_TIME_BASE};
|
||||
for (int n = 0; n < priv->num_streams; n++) {
|
||||
struct sh_stream *stream = priv->streams[n];
|
||||
AVStream *st = priv->avfc->streams[n];
|
||||
if (stream && st->discard != AVDISCARD_ALL) {
|
||||
stream_index = n;
|
||||
time_base = st->time_base;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int64_t pts = priv->last_pts;
|
||||
if (pts != AV_NOPTS_VALUE)
|
||||
pts = pts / (double)AV_TIME_BASE * av_q2d(av_inv_q(time_base));
|
||||
int r = avformat_seek_file(priv->avfc, stream_index, INT64_MIN,
|
||||
pts, pts, avsflags);
|
||||
// Similar issue as in the normal seeking codepath.
|
||||
if (r < 0) {
|
||||
avformat_seek_file(priv->avfc, -1, INT64_MIN,
|
||||
priv->last_pts, INT64_MAX, avsflags);
|
||||
avformat_seek_file(priv->avfc, stream_index, INT64_MIN,
|
||||
pts, INT64_MAX, avsflags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1269,6 +1269,8 @@ static struct cmd_bind *find_any_bind_for_key(struct input_ctx *ictx,
|
||||
struct active_section *s = &ictx->active_sections[i];
|
||||
struct cmd_bind *bind = find_bind_for_key_section(ictx, s->name, n, keys);
|
||||
if (bind) {
|
||||
if (bind->is_builtin && !ictx->default_bindings)
|
||||
goto skip;
|
||||
struct cmd_bind_section *bs = bind->owner;
|
||||
for (int x = 0; x < n; x++) {
|
||||
if (MP_KEY_DEPENDS_ON_MOUSE_POS(keys[x]) && bs->mouse_area_set &&
|
||||
|
||||
+14
-12
@@ -888,7 +888,7 @@ exit:
|
||||
static void load_playback_resume(m_config_t *conf, const char *file)
|
||||
{
|
||||
char *fname = get_playback_resume_config_filename(file);
|
||||
if (fname) {
|
||||
if (fname && mp_path_exists(fname)) {
|
||||
// Never apply the saved start position to following files
|
||||
m_config_backup_opt(conf, "start");
|
||||
try_load_config(conf, fname, false);
|
||||
@@ -4151,6 +4151,19 @@ static void play_current_file(struct MPContext *mpctx)
|
||||
|
||||
mpctx->add_osd_seek_info &= OSD_SEEK_INFO_EDITION;
|
||||
|
||||
if (opts->reset_options) {
|
||||
for (int n = 0; opts->reset_options[n]; n++) {
|
||||
const char *opt = opts->reset_options[n];
|
||||
if (opt[0]) {
|
||||
if (strcmp(opt, "all") == 0) {
|
||||
m_config_backup_all_opts(mpctx->mconfig);
|
||||
} else {
|
||||
m_config_backup_opt(mpctx->mconfig, opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
load_per_protocol_config(mpctx->mconfig, mpctx->filename);
|
||||
load_per_extension_config(mpctx->mconfig, mpctx->filename);
|
||||
load_per_file_config(mpctx->mconfig, mpctx->filename, opts->use_filedir_conf);
|
||||
@@ -4168,17 +4181,6 @@ static void play_current_file(struct MPContext *mpctx)
|
||||
load_per_file_options(mpctx->mconfig, mpctx->playlist->current->params,
|
||||
mpctx->playlist->current->num_params);
|
||||
|
||||
if (opts->reset_options) {
|
||||
for (int n = 0; opts->reset_options[n]; n++) {
|
||||
const char *opt = opts->reset_options[n];
|
||||
if (strcmp(opt, "all") == 0) {
|
||||
m_config_backup_all_opts(mpctx->mconfig);
|
||||
} else {
|
||||
m_config_backup_opt(mpctx->mconfig, opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We must enable getch2 here to be able to interrupt network connection
|
||||
// or cache filling
|
||||
if (opts->consolecontrols && !opts->slave_mode) {
|
||||
|
||||
+1
-1
@@ -550,7 +550,7 @@ const m_option_t mp_opts[] = {
|
||||
{"auto", SOFTVOL_AUTO})),
|
||||
OPT_FLOATRANGE("softvol-max", softvol_max, 0, 10, 10000),
|
||||
OPT_INTRANGE("volstep", volstep, 0, 0, 100),
|
||||
OPT_FLOATRANGE("volume", mixer_init_volume, 0, -1, 10000),
|
||||
OPT_FLOATRANGE("volume", mixer_init_volume, 0, -1, 100),
|
||||
OPT_CHOICE("mute", mixer_init_mute, M_OPT_OPTIONAL_PARAM,
|
||||
({"auto", -1},
|
||||
{"no", 0},
|
||||
|
||||
+6
-2
@@ -729,8 +729,12 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
|
||||
/* get IMAGE FORMAT */
|
||||
int fourcc;
|
||||
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_FORMAT, &fourcc);
|
||||
sh_video->gsh->codec = "rawvideo";
|
||||
sh_video->format = fourcc;
|
||||
if (fourcc == MP_FOURCC_MJPEG) {
|
||||
sh_video->gsh->codec = "mjpeg";
|
||||
} else {
|
||||
sh_video->gsh->codec = "rawvideo";
|
||||
sh_video->format = fourcc;
|
||||
}
|
||||
|
||||
/* set FPS and FRAMETIME */
|
||||
|
||||
|
||||
@@ -657,7 +657,11 @@ int vo_cocoa_cgl_color_size(struct vo *vo)
|
||||
NSApplicationPresentationDefault;
|
||||
|
||||
if ([s->fs_screen hasMenubar])
|
||||
popts |= NSApplicationPresentationAutoHideMenuBar;
|
||||
// Cocoa raises an exception when autohiding the menubar but
|
||||
// not the dock. They probably got bored while programming the
|
||||
// multi screen support and took some shortcuts (tested on 10.8).
|
||||
popts |= NSApplicationPresentationAutoHideMenuBar |
|
||||
NSApplicationPresentationAutoHideDock;
|
||||
|
||||
if ([s->fs_screen hasDock])
|
||||
popts |= NSApplicationPresentationAutoHideDock;
|
||||
|
||||
+10
-4
@@ -433,7 +433,6 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h,
|
||||
GL *gl = p->gl;
|
||||
bool res = true;
|
||||
|
||||
assert(gl->mpgl_caps & MPGL_CAP_FB);
|
||||
assert(!fbo->fbo);
|
||||
assert(!fbo->texture);
|
||||
|
||||
@@ -446,6 +445,9 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h,
|
||||
|
||||
MP_VERBOSE(p, "Create FBO: %dx%d\n", fbo->tex_w, fbo->tex_h);
|
||||
|
||||
if (!(gl->mpgl_caps & MPGL_CAP_FB))
|
||||
return false;
|
||||
|
||||
gl->GenFramebuffers(1, &fbo->fbo);
|
||||
gl->GenTextures(1, &fbo->texture);
|
||||
gl->BindTexture(GL_TEXTURE_2D, fbo->texture);
|
||||
@@ -1499,6 +1501,10 @@ static bool get_image(struct gl_video *p, struct mp_image *mpi)
|
||||
|
||||
struct video_image *vimg = &p->image;
|
||||
|
||||
// See comments in init_video() about odd video sizes.
|
||||
// The normal upload path does this too, but less explicit.
|
||||
mp_image_set_size(mpi, vimg->planes[0].w, vimg->planes[0].h);
|
||||
|
||||
for (int n = 0; n < p->plane_count; n++) {
|
||||
struct texplane *plane = &vimg->planes[n];
|
||||
mpi->stride[n] = mpi->plane_w[n] * p->image_desc.bytes[n];
|
||||
@@ -1709,10 +1715,10 @@ static void check_gl_features(struct gl_video *p)
|
||||
}
|
||||
|
||||
// fruit dithering mode and the 3D lut use this texture format
|
||||
if ((p->opts.dither_depth >= 0 && p->opts.dither_algo == 0) ||
|
||||
p->use_lut_3d)
|
||||
if (have_fbo && ((p->opts.dither_depth >= 0 && p->opts.dither_algo == 0) ||
|
||||
p->use_lut_3d))
|
||||
{
|
||||
// doesn't disalbe anything; it's just for the log
|
||||
// doesn't disable anything; it's just for the log
|
||||
MP_VERBOSE(p, "Testing GL_R16 FBO (dithering/LUT)\n");
|
||||
test_fbo(p, GL_R16);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user