1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-22 07:46:55 +00:00
Commit Graph

41166 Commits

Author SHA1 Message Date
wm4
d0216842d3 path: refactor
Somewhat less ifdeffery, higher flexibility. Now there are 3 separate
config file resolvers for 3 platforms (unix, win, osx), and they can
still interact with each other somewhat. For example, OSX for now uses
most of Unix, but adds the OSX bundle path.

This can be extended to resolve very specific platform paths, such as
location of the desktop.

Most of the Unix specific code moves to path-unix.c.

The behavior should be the same - if not, it is likely a bug.

(cherry picked from commit d3a3cfe54c)
2015-05-07 10:43:05 +09:00
wm4
527550dfe6 vo_rpi: update renderer size on display size changes too
(Not sure why it worked without this when I tested the previous
changes.)

Untested, but should be fine. This is equivalent what is done on e.g.
panscan changes.

(cherry picked from commit 94a3a76ee3)
2015-05-07 10:42:30 +09:00
wm4
275694a002 video/out: remove VOFLAG_FLIPPING
I think this used to be quite important, because the ancient VfW support
in MPlayer used to output flipped frames. This code has been dead in mpv
for quite some time (because VfW decoders were removed, and the --flip
option was dropped too), so get rid of it.

(cherry picked from commit e185887ba0)
2015-05-07 10:42:16 +09:00
wm4
8c3a92d6cb vo_opengl: refactor wayland frame skipping
Currently, the wayland backend needs extra work to avoid drawing more
often than the wayland frame callback allows. (This is not ideal, but
will be fixed at a later time.)

Unify this with the start_frame callback added for cocoa. Some details
change for the better. For example, if a frame is dropped, and a redraw
is done afterwards, the actually correct frame is redrawn, instead
whatever was in the textures from before the dropped frame.

(cherry picked from commit 0a7abbda6b)
2015-05-07 10:42:10 +09:00
wm4
488b5e3ac3 cocoa: don't accidentally drop initial screen drawing
With --idle --force-window, or when started from the bundle, the cocoa
code dropped the first frame. This resulted in a black frame on start
sometimes.

The reason was that the live resizing/redrawing code was invoked, which
simply set skip_swap_buffer to false, blocking redrawing whatever was
going to be rendered next. Normally this is done so that the following
works:

1. vo_opengl draw a frame, releases GL lock
2. live resizing kicks in, redraw the frame
3. vo_opengl wants to call SwapBuffers, drawing a stale buffer
   overwritten by the live resizing code

This is solved by setting skip_swap_buffer in 2., and querying it in 3.

Fix this by resetting the skip_swap_buffer at a known good point: when
vo_opengl starts drawing a new frame.

The start_frame function returns bool, so that it can be merged with
is_active in a following commit.

(cherry picked from commit e23e4c7c60)
2015-05-07 10:41:57 +09:00
Avi Halachmi (:avih)
afb97c517d vo: improve frame drop logic on high playback rate
Commit f1746741de changed the drop
logic to have more slack (drop more frames but less frequent) to prevent
drops due to timing jitter when the clip and screen have similar rates.

However, if the clip has higher rate than the screen (or just higher
playback rate), then that policy hurts smoothness since these "chunked
drops" look worse than one frame drop at a time.

This patch restores the old drop logic when the playback frame rate is
higher than ~5% above the screen refresh rate, and solves this issue.

Fixes #1897

(cherry picked from commit ffcad1a72b)
2015-05-07 10:41:50 +09:00
wm4
b99f78412b player: properly destroy client context if thread can't be created
Minor leak in an obscure out of memory case.

(cherry picked from commit d01228058b)
2015-05-07 10:41:43 +09:00
wm4
a4ba496539 vo_rpi: update display size on display mode switches
(cherry picked from commit 8c7f3adb41)
2015-05-07 10:41:38 +09:00
wm4
73fc12c4e2 vo_rpi: actually draw a black background
Also factor the display size initialization into a separate function.

For some reason this seems to work, although setting the background
color using this 1x1 pixel bitmap does not work. I blame the RPI
beign a terrible piece of hardware with even worse drivers.

(cherry picked from commit 6ae66e717f)
2015-05-07 10:41:33 +09:00
wm4
63402eb1dd ao_coreaudio_exclusive: check format explicitly on change notifcation
This should for now be equivalent; it's merely more explicit and will
be required if we add PCM support.

Note that the property listeners actually tell you what property
exactly changed, but resolving the current listener mess would be too
hard. So check for changes manually.

(cherry picked from commit 382434d45a)
2015-05-07 10:41:26 +09:00
wm4
8bcd9ea671 ao_coreaudio_utils: log mp format with CoreAudio format description
As a consequence, it also logs whether mpv can a this format at all.

(cherry picked from commit 34a5229b23)
2015-05-07 10:41:15 +09:00
wm4
e37fae4f9e ao_coreaudio_utils: add function for ASBD -> mp format lookup
Useful with some of the following commits.

ca_fill_asbd() should behave exactly as before.

Instead of actually implementing the inverse function of ca_fill_asbd(),
just loop over the (small) list of mpv functions and check if any mpv
equivalent to a given ASBD exists.

(cherry picked from commit 32b835c03b)
2015-05-07 10:41:00 +09:00
wm4
047c761f90 ao_coreaudio_utils: float is not a signed integer format
kAudioFormatFlagIsSignedInteger implicates that it's only used with
integer formats. The mpv internal flag on the other hand signals the
presence of a sign, and this is set on float formats.

Until now, this probably worked fine, because at least AudioUnit is
ignoring the uncorrect flag.

(cherry picked from commit 3295ce48ab)
2015-05-07 10:40:53 +09:00
Niklas Haas
99389eb174 csputils: improve contrast semantics for limited range output
The previous version of this logic resulted in black crush and incorrect
brightness scaling when combined with limited range (TV) output.

(cherry picked from commit 99439f11ea)
2015-05-07 10:40:44 +09:00
wm4
af930e2a2e csputils: apply contrast equalizer in RGB
It's weird that this basically adjusts the contrast between luma and
chroma, and not blackness.

This is more in line with the behavior of libswscale, the vdpau
"procamp" (which mpv doesn't use), and Xv.

(cherry picked from commit 0600d378f9)
2015-05-07 10:40:35 +09:00
wm4
5f4e4ede89 stream: don't print reconnection message if no stream support
This code does not know whether the stream supports reconnecting until
STREAM_CTRL_RECONNECT is called. So the message should be printed after
it. To avoid that reconnects that succeed on the first try go unnoticed,
print a warning on success.

(cherry picked from commit 38114b6a36)
2015-05-07 10:39:47 +09:00
Niklas Haas
4a6fdb7361 x11: query ICC profile based on center of window
Right now, the default behavior is to pick the numerically lowest screen
ID that overlaps the window in any way - but this means that mpv will
decide to pick an ICC profile in a pretty arbitrary way even if the
window only overlaps another screen by a single pixel.

The new behavior is to query it based on the center of the window
instead.

(cherry picked from commit daf4334697)
2015-05-07 10:39:40 +09:00
Diogo Franco (Kovensky)
f6158c324e Release 0.9.1 2015-04-29 19:03:56 +09:00
Diogo Franco (Kovensky)
f534c83da6 Update RELEASE_NOTES 2015-04-29 18:47:11 +09:00
wm4
39f6824b30 manpage: put explicit links to config file path details
It seems users still have trouble finding the exact paths, especially on
Windows. Maybe this helps.

(cherry picked from commit 0b72f5e5ad)
2015-04-29 18:40:42 +09:00
wm4
477eefa63f ao_coreaudio_exclusive: move code for getting original format
Should be almost equivalent, unless there are streams on which this call
does not work for unknown reasons.

(cherry picked from commit 8b4ca58062)
2015-04-29 18:40:37 +09:00
wm4
87713640ae ao_coreaudio_utils: change audio format logging
Make it easier to distinguish the fields.

(cherry picked from commit d5e9bf66a1)
2015-04-29 18:40:30 +09:00
wm4
63bd171c0d ao_coreaudio_exclusive: account for additional latency
Whether this is correct is unknown. This change tripples the latency
from ~15ms to ~45ms.

XBMC does this, VLC does not from what I could see.

(cherry picked from commit 5f86fad2f0)
2015-04-29 18:40:20 +09:00
wm4
73086a6ba3 player: log track list when adding or removing external files
Should help with debugging, and might be slightly more userfriendly.

Note that this is called manually in multiple entry-points, instead of
the functions doing the actual work (like mp_remove_track()). This is
done so that exiting the player or calling the sub_reload command won't
print redundant in-between states.

(cherry picked from commit 0c0c8cd44e)
2015-04-29 18:39:49 +09:00
wm4
0126999cde player: clamp display time to known time range on seeking
During seeking, and there is momemtarily no new data available yet, the
player will display the seek target as current time. Clamp this time to
the known time range as implied by the start time and the duration of
the file.

This improves behavior especially when seeking in audio files, for which
this for some reason triggers rather often. There were some users
complaining about this.

This makes behavior worse for files with timestamp resets, or
incorrectly reported duration. (The latter is relatively common,
e.g. libavformat shortcomings, or incomplete files.)

(cherry picked from commit 0ff93a8357)
2015-04-29 18:39:33 +09:00
wm4
2a6b10c9ca audio: separate fallbacks for upmix and downmix cases
We always want to prefer upmix to downmix, as long as it makes sense.
Even if the upmix is not "perfect" (not just adding channels), we want
to prefer the upmix.

Cleanup for commit d3c7fd9d.

(cherry picked from commit c4aa136155)
2015-04-29 18:38:57 +09:00
ChrisK2
3fa249b4e1 osc: redo slider position translation
Now done in one place instead of mulitple times all over the code.

Fixes #1876

(cherry picked from commit 2fcf0e6183)
2015-04-29 18:38:44 +09:00
wm4
0a55f43181 json: fix UTF-8 handling
We escape only characters below 32, plus " and \. UTF-8 should be apssed
through verbatim. Since char can be signed (and usually is), the check
broke and happened to escape UTF-8 encoded bytes too. This broke UTF-8
completely.

Note that we don't check for broken or invalid UTF-8, such as described
both in the client API and IPC docs.

Fixes #1874.

(cherry picked from commit f77e3cbf0c)
2015-04-29 18:38:34 +09:00
Diogo Franco (Kovensky)
5aa2d496e6 Update RELEASE_NOTES 2015-04-28 09:05:00 +09:00
Diogo Franco (Kovensky)
76ba91415b Add github links to compare pages for the commit logs
Unfortunately, the commit logs are truncated at 250 commits :(
2015-04-28 08:57:10 +09:00
Diogo Franco (Kovensky)
20a1418af6 Update RELEASE_NOTES 2015-04-28 08:49:50 +09:00
robin
277dc33268 ytdl_hook.lua: Change format options when vid is "off"
This will change the format option to "bestaudio/best" instead of
passing the "-x" argument to yt-dl.

Prevents the video still being downloaded in the new mpv versions where
the yt-dl format is set to "best" by default.

(cherry picked from commit 5555f6fc2c)
2015-04-28 08:34:50 +09:00
wm4
cb2461044b audio: avoid downmixing in a certain special-case
As indicated by the added test. In this case, fallback and downmix have
the same score, but fallback happens to give better results. So prefer
fallback over downmix.

(This is probably not a correct solution.)

(cherry picked from commit d3c7fd9d7c)
2015-04-28 08:34:36 +09:00
Niklas Haas
1eb7db70d5 manpage: update mpv IRC channels
Moved to #mpv and #mpv-devel, respectively. Travis details were also
updated.

(cherry picked from commit d2292c179c)
2015-04-28 08:34:05 +09:00
wm4
a8c764acb4 player: fix removing external tracks at runtime
This could make the player crash on exit if the "sub_reload" command was
used successfully. the reason was that the mpctx->sources array could
have dangling pointers to the unloaded demuxers.

Also fix a memory leak by actually always freeing the per-stream
subtitle decoders (which are a hack to make ordered chapters behave
better).

(cherry picked from commit 4d2ed847ce)
2015-04-28 08:33:57 +09:00
wm4
62a66e2ff8 manpage: update colormatrix property description
(cherry picked from commit 0c70f94c53)
2015-04-28 08:33:44 +09:00
akemi-san
e8f8d3462e vo_drm: zero screen buffers in reconfig function.
(cherry picked from commit 1e2e504349)
2015-04-28 08:33:36 +09:00
Marcin Kurczewski
7669fe39f6 vo_drm: add window screenshots support
(cherry picked from commit 5f21a68ce9)
2015-04-28 08:33:28 +09:00
wm4
6a1902a2bf ytdl: force "best" format by default
If the --ytdl-format option is not used, force the "best" format. Do
this because youtube-dl is going to change its default format to one
that will trigger the (partially broken) DASH support in our own code.

Fixes #1867.

(cherry picked from commit 95a0488ac2)
2015-04-28 08:33:17 +09:00
wm4
192af725e6 vdpau: always render to cropped size at most
vo_opengl (or gl_hwdec_vdpau.c to be specific) calls
mp_vdpau_mixer_render() with video_rect=NULL, which means to use the
full surface. This is incorrect if the surface is actually cropped, as
it can happen with h264. In this case, it was rendering the parts
outside of the image.

Fix it by making this case use the cropped size instead.

Alternative fix for PR #1863.

(cherry picked from commit a5ed6e49bf)
2015-04-28 08:32:45 +09:00
wm4
d27bb1ce80 DOCS/client-api-changes: fix release marker
The release was pushed back and now actually happened; the marker became
incorrect.

(cherry picked from commit 4df8c21f81)
2015-04-28 08:32:28 +09:00
Diogo Franco (Kovensky)
e795a1781f Bump version to v0.9.0, remove Draft status from RELEASE_NOTES 2015-04-25 21:54:38 +09:00
Diogo Franco (Kovensky)
6e4abfb017 Fix typo in RELEASE_NOTES 2015-04-25 18:31:59 +09:00
Diogo Franco (Kovensky)
62195c174a Add v0.7.x RELEASE_NOTES to RELEASE_NOTES 2015-04-25 18:30:06 +09:00
Diogo Franco (Kovensky)
79efe85cf5 Update RELEASE_NOTES 2015-04-25 18:28:25 +09:00
Diogo Franco (Kovensky)
5f1d6b6e5a Merge branch 'master' into release/0.9
* master: (87 commits)
  manpage: move --autosync description
  player: add --window-scale option
  player: flush decoder even if cover art is decoded
  player: don't show A/V desync message in non-sense situations
  w32_common: add more rounded-down frame rates
  w32_common: use the current monitor's refresh rate
  dxva2: fix broken build with gcc 5.1
  terminal: printf() is not signal-safe
  man: fix PDF build
  DOCS/mplayer-changes: Eleborate on joystick input
  osc: add nil check for element.eventresponder
  mp_image: remove some unused interlacing flags
  vf_vapoursynth: update _FieldBased semantics
  options: remove unneeded hack from command line parser
  manpage: document ff-index sub-property
  demux_mkv: limit timestamp fixing to 1ms max
  demux_mkv: attempt to fix rounded timestamps
  demux_mkv: move global options to the demuxer
  demux_mkv: better seeking after video end
  lua: add utils.format_json() function
  ...
2015-04-25 18:28:17 +09:00
wm4
983d24e3b9 manpage: move --autosync description
This was in the "Window" section. It has absolutely nothing to do with
windows. Move it to the "Miscellaneous" section instead. The "--mc"
option, which has a similar function, was already there.
2015-04-24 23:27:12 +02:00
wm4
72e505a944 player: add --window-scale option
Requested. Works similar to the property with the same name.
2015-04-24 23:27:12 +02:00
wm4
e11abdbad2 player: flush decoder even if cover art is decoded
Fixes PNG cover art not showing up immediately (for example when running
with --pause).

libavformat exports embedded cover art as a single packet. For example,
a PNG attachment simply contains the PNG image, which can be sent to the
decoder. Normally you would expect that the PNG decoder would return 1
frame for 1 packet, without any delays. But this stopped working, and it
incurs a 1 frame delay.

This is perfectly legal (even if unexpected), so let our code feed the
decoder packets until we get something back. (In theory feeding the
packet instead of a real flush packet is still somewhat questionable.)
2015-04-24 23:27:12 +02:00
wm4
8d31ad85ec player: don't show A/V desync message in non-sense situations
last_av_difference can be MP_NOPTS_VALUE under certain circumstances
(like no video timestamp yet). This triggered the desync message,
because fabs(MP_NOPTS_VALUE) is quite a large value. We don't want to
show a message in this situation.
2015-04-24 23:27:12 +02:00