| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
500ms is a bit too high. Change it to 50ms. This improves client API
(and Lua) playback state update frequency.
Updating absolutely every time the audio PTS changes would be possible,
but is not helpful. Audio samplerates are high to trigger a wakeup
feedback loop, so the process would waste CPU time on updating the
playback position all the time.
(If a client application wants to ensure smooth update of the playback
position, it should update the position manually using a timer and by
reading the property - the application can make a much better decision
at how often the playback has to happen.)
|
|
|
|
| |
Fixes #2066.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Client API users can enable log output with mpv_request_log_messages().
But you can enable only a single log level. This is normally enough, but
the --msg-level option (which controls the terminal log level) provides
more flexibility. Due to internal complexity, it would be hard to
provide the same flexibility for each client API handle. But there's a
simple way to achieve basically the same thing: add an option that sends
log messages to the API handle, which would also be printed to the
terminal as by --msg-level.
The only change is that we don't disable this logic if the terminal is
disabled. Instead we check for this before the message is output, which
in theory can lower performance if messages are being spammed. It could
be handled with some more effort, but the gain would be negligible.
|
|
|
|
| |
Total time and ms
|
| |
|
|
|
|
| |
Broken by e00e9d65.
|
|
|
|
|
|
| |
Very stupid.
Was pointed out in #2056.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When showing cover art, the decoding logic pretends that the source has
an infinite number of frames. This slightly simplifies dealing with
filter data flow. It was done by feeding the same packet repeatedly to
the decoder (each decode run produces new output).
Change this by decoding once at the video initialization. This is easier
to follow, and increases robustness in case of broken images. Usually,
we try to tolerate decoding errors, so decoding normally continues, but
in this case it would just burn the CPU for no reason.
Fixes #2056.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous behavior is confusing if the B point is near EOF (consider
B being the duration of the file, which is strictly speaking past the
last video timestamp). The new behavior is fine as well for B being far
past EOF.
Achieve this by checking the EOF state in addition to whether playback
has reached the B point. Also, move the A-B loop code out of
command_event(). It just isn't useful anymore, and obfuscates the code
more than it makes it loop simple.
Fixes #2046.
|
|
|
|
|
|
|
|
|
| |
Seems logical.
Note that if playback otherwise ends while playback is active and a seek
is still queued, we still exit. Otherwise you couldn't end playback by
seeking past the end of the file (which is classic MPlayer and mpv
behavior).
|
|
|
|
| |
And also add the missing "unknown" entry to the manpage.
|
|
|
|
|
| |
Requested. Minor incompatible behavior change, as it was signalling
MPV_END_FILE_REASON_EOF previously.
|
|
|
|
|
| |
Making sure this is true makes it closer to the libmpv docs, and
possibly less confusing in corner cases.
|
| |
|
|
|
|
|
| |
These commands are used to simulate keypresses using the key names from
input.conf.
|
|
|
|
|
| |
We must be sure that every change comes with a notification. Otherwise,
some property changes could possibly be missed.
|
|
|
|
|
|
|
| |
Used a wrong condition, and I suppose it could crash in some situations.
Change it to lazily initialize the hotplug stuff, like the
audio-device-list property does.
|
|
|
|
|
| |
These were actually not needed for correct function, since individual
property change notifications via mp_notify_property() are used.
|
|
|
|
|
|
| |
This was matching e.g. both "foo/bar" and "foobar" against "foo", when
only the former should match. This could cause more property
notifications than necessary.
|
|
|
|
|
| |
They can be handled by the same codes used for playlists, most of them will use an EDL.
Fixes #2027.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This provides a new method for enabling spdif passthrough. The old
method via --ad (--ad=spdif:ac3 etc.) is deprecated. The deprecated
method will probably stop working at some point.
This also supports PCM fallback. One caveat is that it will lose at
least 1 audio packet in doing so. (I don't care enough to prevent this.)
(This is named after the old S/PDIF connector, because it uses the same
underlying technology as far as the higher level protoco is concerned.
Also, the user should be renamed that passthrough is backwards.)
|
|
|
|
|
|
|
| |
This makes no sense, because the format can't be converted anyway. It
just sets up the filter chain init code, which will vomit a bunch of
useless and confusing messages. So uninit and fail explicitly when this
happens.
|
|
|
|
|
| |
All this information is already output otherwise. Except the FourCC,
which lost most of its importance in mpv.
|
| |
|
|
|
|
|
|
|
|
| |
When starting in paused mode, no audio is written to the device at all,
because writing audio implicitly unpauses the AO. If the file is very
small, and all audio fits within the AO buffer, this accidentally
triggered the EOF condition. (In unpaused mode, it would write all
audio, end playback, and then wait until the AO has everything played.)
|
| |
|
|
|
|
| |
Slightly less strange.
|
|
|
|
|
|
|
|
|
| |
There's a short time during loading where external commands can add
external streams even before the main file is loaded (like during ytdl
hook execution). The track list is printed every time an external track
is added via commands. This was quite awkward when ytdl was adding
multiple streams, so don't print it in this stage. They are printed
anyway at the end of the loading process.
|
|
|
|
|
|
|
| |
This was a cosmetic issue. It's handled differently now (clamping the
display time to known duration range).
This reverts commit 33b57f55573e658b3af6c6e8ff3188c8f959e82e.
|
| |
|
|
|
|
|
|
|
|
|
| |
It polluted the global namespace, instead of exporting the function
properly.
For now, keep it compatible by explicitly keeping the bogus export.
Also fix a mistake in the manpage example.
|
|
|
|
|
|
| |
This command has been deprecated in the 0.8.x and 0.9.x releases - get
rid of it. Its only point ever was MPlayer compatibility, which broke
years ago anyway.
|
|
|
|
| |
It has been deprecated for ages.
|
|
|
|
|
| |
There is not much of a reason to do this later. (Since some time ago,
the input_ctx is created right at the start, so this can be done now.)
|
|
|
|
| |
This is about as early as possible.
|
|
|
|
|
|
|
|
| |
For certain reasons, we allow adding external tracks even before the
main file is loaded. This somewhat breaks in old assumption, which uses
mpctx->num_sources to determine whether a command can be applied in the
current state. Use the newer playback_initialized instead, which is a
much better choice for this purpose.
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit removed this. Although mp_switch_track() can now be
called in all situations, we still don't want it to be called here.
Setting a track property while no file is loaded would simply deselect
the track instead of setting the underlying option to the requested
value.
Likewise, if the "cycle" command (M_PROPERTY_SWITCH) is used, don't just
deselect the track.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding an external audio track before loading the main file didn't work
right. For one, mp_switch_track() assumes it is called after the main
file is loaded. (The difference is that decoders are only initialized
once the main file is loaded, and we avoid doing this before that for
whatever reason.)
To avoid further messiness, just allow mp_switch_track() to be called at
any time. Also make it do what mp_mark_user_track_selection() did, since
the latter requires current_track to be set. (One could probably simply
allow current_track to be set at this point, but it'd interfere with
default track selection anyway and thus would be pointless.)
Fixes #1984.
|
|
|
|
|
|
|
|
|
|
| |
Wnile it seems quite logical to me that commands use _ as word
separator, while properties use -, I can't really explain the
difference, and it tends to confuse users as well. So always
prefer - as separator for everything.
Using _ still works, and will probably forever. Not doing so would
probably create too much chaos and confusion.
|
|
|
|
|
|
| |
Another very minor step towards property/option unification.
Not bothering with interface compatibility here.
|
|
|
|
|
|
| |
There's no need for this, it just creates more corner cases.
Also always reset it on seeks etc..
|
|
|
|
|
| |
And use it for the estimated-vf-fps property (it should be doing the
same as before).
|
|
|
|
| |
Fixes #1972.
|
|
|
|
| |
This was missed in commit 450af053.
|
|
|
|
|
|
|
|
|
|
| |
Now it simply changes the options, i.e. what will be requested, instead
of returning M_PROPERTY_UNAVAILABLE.
This is another minor step towards unifying options and properties.
Still a bit weird: it will always return "no" if no file is loaded, and
disregards the option value.
|
|
|
|
| |
This makes the code slightly more generic.
|
|
|
|
|
|
|
| |
Also replace their implementation with the recently introduced
properties. One significant difference is that audio-channels using OSD
formatting does not print the channel layout. The user can just use the
replacement property instead.
|
| |
|
|
|
|
| |
Clashes with the option.
|
|
|
|
| |
Conflicts with the property.
|
|
|
|
| |
It collides with the --length option.
|
|
|
|
| |
Looks like this will be needed a lot...
|
|
|
|
|
|
|
|
|
| |
Now --volume takes an absolute volume, meaning it doesn't depend on
--softvol-max. 0 is still silence, and 100 now always means unchanged
volume. The OSD and the "volume" property are changed accordingly.
Also raise the minimum value of --softvol-max. A value below 100 makes
no sense and breaks the OSD.
|
| |
|
|
|
|
|
|
| |
The code checking for the type of seeking contained some if else
statements. To improve readability, I decided to refactor those
statements to a switch statement.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce the default tolerance for timestamp jumps from 60 to 15 seconds.
For .ts files, where ts_resets_possible coming from AVFMT_TS_DISCONT is
set, apply a more sophisticated heuristic. It's clear that such a file
wouldn't have a framerate below, say, 23hz. If the demuxer reports a
lower fps, we allow longer PTS jumps.
This should replace long pauses on discontinuities with .ts files with
at most a short stutter.
Of course, all kinds of things could go wrong anyway if the source is
VFR, or FFmpeg's frame rate detection fails in some other way. I haven't
found such a file yet, though.
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 10915000 attempted to fix wasting CPU when resyncing and no new
data was actually coming from the demuxer. The fix assumed that at this
point it would have reached the sync point, but since the code attempts
weird incremental decoding, this wasn't actually true. So it broke
seeking in addition to removing the CPU waste.
Try something else. This time, we essentially only wakeup again if
data was read (i.e. audio_decode() returned successfully).
|
|
|
|
|
|
|
|
|
|
| |
The OSD symbol for seeking to an absolute percentage was always OSD_FFW,
even when it should be OSD_REW. It uses the correct OSD symbols now, by
checking the current position ratio.
Note: The symbol is still incorrectly given when the absolute percentage
is very close to the current position ratio. Fortunately, that's a rare
use case.
|
|
|
|
|
|
|
|
|
| |
Thsi code path happens during seeking. If video is still being decoded
to get to the first video frame, audio has nothing to do, as it is
synchronized against the first video frame. We only want to wake up if
there's an actual state change.
Fixes #1958.
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
|
|
|
| |
Only absolute percentage seeking was permitted first. It is now also
possible to seek by relative percentage.
MPSEEK_FACTOR is used as seek_type.
Fixes #1950.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
| |
Fixes #965.
|
|
|
|
|
|
|
| |
There is not much of a reason to have these wrappers around. Use POSIX
standard functions directly, and use a separate utility function to take
care of the timespec calculations. (Course POSIX for using this weird
format for time values.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenSSL and GnuTLS are still causing this problem (although FFmpeg could
be blamed as well - but not really). In particular, it was happening to
libmpv users and in cases the pseudo-gui profile is used. This was
because all signal handling is in the terminal code, so if terminal is
disabled, it won't be set. This was obviously a questionable shortcut.
Avoid further problems by always blocking the signal. This is done even
for libmpv, despite our policy of not messing with global state.
Explicitly document this in the libmpv docs. It turns out that a version
bump to 1.17 was forgotten for the addition of MPV_FORMAT_BYTE_ARRAY, so
document that change as part of 1.16.
|
|
|
|
| |
We don't allow tabs in normal source code.
|
|
|
|
|
| |
This has the side-effect that now all encoding-profiles.conf files are
loaded. It's not clear if not doing this was intended or not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |