0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
Commit Graph

38903 Commits

Author SHA1 Message Date
wm4
6c1e528518 player: properly resume playlists loaded at runtime
If a playlist is loaded from the internal playlist (like
"mpv playlist.m3u"), then attempt to resume from it.

CC: @mpv-player/stable
2014-09-02 22:16:20 +02:00
wm4
2da246b9f7 player: add --osd-playing-msg option 2014-09-02 00:12:52 +02:00
wm4
291d986810 player: show HLS bitrate as fallback for track titles
HLS streams as demuxed by libavformat have no track title metadata. So
show the HLS bitrate if no title is set. Could be useless or annoying,
so it's a bit controversial, I guess.
2014-09-01 23:50:25 +02:00
wm4
5f14543668 player: simplistic HLS bitrate selection
--hls-bitrate=min/max lets you select the min or max bitrate. That's it.
Something more sophisticated might be possible, but is probably not even
worth the effort.
2014-09-01 23:47:27 +02:00
wm4
8d92128f6b command: remove broken quvi-format property
Never really worked, and libquvi is probably a lost cause anyway.
2014-09-01 23:27:33 +02:00
wm4
2f537bafa5 demux: get rid of old wrapper
demux_info_get() used to be central, but was turned into a wrapper, and
now there was only one caller left. Get rid of it.
2014-09-01 22:12:39 +02:00
wm4
0aaf688c2d command: make m_property_strdup_ro with NULL mean unavailable
This catches a few cases which basically call:

    m_property_strdup_ro(..., ..., NULL)

which would return NULL strings. This should generally be avoided
(although it's allowed due to reasons), and it seems most callers
actually intend this to mean M_PROPERTY_UNAVAILABLE.
2014-09-01 21:50:54 +02:00
wm4
4124a175e1 command: disable some commands/properties properly in idle mode
In particular, don't allow to add any external subtitle tracks in idle
mode. This make no sense and would just lead to leaks or worse.
2014-09-01 21:44:54 +02:00
wm4
e87617593f player: reset playback-related fields right on start 2014-09-01 21:02:43 +02:00
Martin Herkt
27a065182c man: fix a whole bunch of typos 2014-09-01 04:27:13 +02:00
wm4
5ea84e17c0 player: don't allow remote playlists to load local files
Because that might be a bad idea.

Note that remote playlists still can use any protocol marked with
is_safe and is_network, because the case of http-hosted playlists
containing URLs using other streaming protocols is not unusual.
2014-09-01 00:13:22 +02:00
wm4
129a7c056a playlist: don't add the base path twice
Loading a playlist with --playlist from a sub-directory added the
playlist's base path twice: one time in the playlist demuxer, and then
again in playlist_parse_file(). The latter function is used only for
--playlist, so it worked when loading the playlist directly.

(This is probably a mess-up when the MPlayer playlist parsers were
replaced with newer code.)

CC: @mpv-player/stable
2014-09-01 00:13:10 +02:00
wm4
f59f1e532e client API: fix memory leak with rejected events
The event was copied early, and wasn't released if it was rejected
instead of being added to the event queue. Fix by copying the event at a
point when it's certainly added to the event queue.

The dup_event_data() function is merely moved.
2014-08-31 19:51:41 +02:00
wm4
866e0e1670 player: always load playlists
Until now, you had to use --load-unsafe-playlists or --playlist to get
playlists loaded. Change this and always load playlists by default.

This still attempts to reject unsafe URLs. For example, trying to invoke
libavdevice pseudo-demuxer is explicitly prevented. Local paths and any
http links (and some more) are always allowed.
2014-08-31 19:49:39 +02:00
wm4
fc0fa9a221 audio: go to draining state instead of EOF if audio starts later
Probably no observable effect, but it's more correct. Setting audio to
EOF could have bad effects otherwise (anywhere the player logic for
example decides whether EOF was reached, and such).
2014-08-31 14:48:58 +02:00
wm4
fd4045965e video: adjust some Matroska 3D formats
There is no proper and exact spec (Matroska tradition), so we probably
have to rely on guessing for this.

Also see issue #1045.
2014-08-31 14:48:58 +02:00
wm4
8432eaefa0 audio/out: prevent burning CPU when seeking while paused
The audio/video sync code in player/audio.c calls ao_reset() each time
audio decoding is entered, but the player is paused, and there would be
more than 1 sample to skip to make audio start match with video start.
This caused a wakeup feedback loop with push.c.

CC: @mpv-player/stable
2014-08-31 14:48:58 +02:00
wm4
64b7811c28 x11: when using --wid, inherit event flags from parent window
When embedding a X window, it's hard to control whether it receives
mouse/keyboard input or not. It seems the X protocol itself makes this
hard (basically due to the outdated design mismatching with modern
toolkits), and we have to take care of these things explicitly.

Simply do this by manually querying and using the parent window event
flags.

This restores some MPlayer behavior (it doesn't add back exactly the
same code, but it's very similar).

This probably has some potential to interfere with libmpv embedding, so
bump the client API minor.

CC: @mpv-player/stable (if applied, client-api-changes.rst has to be
    adjusted to include the 0.5.2 release)
2014-08-31 14:48:26 +02:00
Otto Modinos
a910b5c6df lua: expose mp_getcwd through mp.utils 2014-08-31 00:58:27 +02:00
wm4
8956878448 manpage: be more explicit about "estimated-..." properties
In particular, use the note markup. The issue about rounded timestamps
is mostly with respect to Matroska (which usually rounds them to
milliseconds), which somewhat adds to the reliability issue.
2014-08-31 00:22:01 +02:00
wm4
94140e0897 csputils: adjust comment
Make it clear that the value is linked to the StereoMode element. You
can't change this without adjusting demux_mkv.c.
2014-08-30 23:54:19 +02:00
wm4
8599c959fe video: initial Matroska 3D support
This inserts an automatic conversion filter if a Matroska file is marked
as 3D (StereoMode element). The basic idea is similar to video rotation
and colorspace handling: the 3D mode is added as a property to the video
params. Depending on this property, a video filter can be inserted.

As of this commit, extending mp_image_params is actually completely
unnecessary - but the idea is that it will make it easier to integrate
with VOs supporting stereo 3D mogrification. Although vo_opengl does
support some stereo rendering, it didn't support the mode my sample file
used, so I'll leave that part for later.

Not that most mappings from Matroska mode to vf_stereo3d mode are
probably wrong, and some are missing.

Assuming that Matroska modes, and vf_stereo3d in modes, and out modes
are all the same might be an oversimplification - we'll see.

See issue #1045.
2014-08-30 23:24:46 +02:00
wm4
c80adac077 cache_file: add a mode that creates a temporary file
Since we have to be portable, our options for creating temporary files
are somewhat limited. tmpfile() happens to be available everywhere, so
use that. This function doesn't allow having a "visible" filename or
location, so we use the magic string "TMP" for this.
2014-08-30 20:03:31 +02:00
wm4
829fdef219 player: reduce default demuxer cache
A (hopefully) temporary hack to make stream switching delays tolerable.
It's not clear how this should be handled (either executing a precise
seek on track switching, or always enabling all streams), so get this
issue out of the way for now by picking a rather low value.
2014-08-30 19:37:21 +02:00
shdown
b8f2f0d69e TOOLS/mpv_identify.sh: simplify $MPV handling 2014-08-30 19:23:42 +02:00
shdown
4a976c469c TOOLS/mpv_identify.sh: various style improvements
Double-quote everything, eliminate unneeded evals and deprecated
`backtits` substitution syntax.
2014-08-30 19:23:42 +02:00
shdown
880d5c8a4a TOOLS/mpv_identify.sh: move script body to a function
Don't prepend each variable with __midentify__, just make them local
to the function.
2014-08-30 19:23:42 +02:00
shdown
cbe03b6255 TOOLS/youtube-dl_mpv.sh: simplify $MPV handling 2014-08-30 19:23:42 +02:00
shdown
43d4667028 TOOLS/youtube-dl_mpv.sh: disable globbing before expanding $video_url
$video_url can contain a question mark, which can be expanded to a
character in an existing file name if globbing is enabled.
2014-08-30 19:23:41 +02:00
wm4
948dfe651d manpage: document that --cache-file doesn't work with ordered chapters 2014-08-30 19:17:44 +02:00
wm4
b7fa981899 stream: correctly propagate uncached stream type
This makes the ordered chapter code not think that a stream from the
local filesystem is not a local file (it checks uncached_type).
2014-08-30 19:05:57 +02:00
wm4
98ef68bdfd demux_lavf: print a warning if av_read_frame() returns an error
Because why not.
2014-08-30 15:15:38 +02:00
shdown
730d94741c vf_softpulldown: handle null mpi_image correctly
Check if mpi is NULL before accessing mpi->fields.
2014-08-30 15:15:38 +02:00
shdown
3307af43c5 input: make ar_rate and ar_delay fields of input_ctx signed
ar_rate is set to -1 when autorepeat is disabled; there is no reason
for ar_delay to stay unsigned.
2014-08-30 15:15:37 +02:00
shdown
8ee1bcf1fa input: handle reaching MP_MAX_FDS correctly
Don't dereference fd and increment ictx->num_fds on fail.
2014-08-30 15:15:37 +02:00
shdown
e2ecf3d03d demux_mkv: eliminate redundant branch
In the else branch pict_type is always 3, so pict_type != 3 is always
false. (Note that I have no idea of what it was supposed to do and it is
just an equivalent of the old behaviour.)
2014-08-30 15:15:37 +02:00
shdown
f49099b94d demux: eliminate redundant check
pkt can't be NULL since it's initialized from ds->head, which is checked
at the beginning.
2014-08-30 15:15:37 +02:00
shdown
5bc3b7c368 demux_disc: handle new_sh_stream() fail correctly
Break the cycle on fail. Old code was checking if sh is NULL after
accessing it's fields.
2014-08-30 15:15:37 +02:00
Alexander Preisinger
593e5e4a25 gl_wayland: fix crash after eglInitialze failed
Only execute most of the opengl termination procedure if we actually have an
egl context.
2014-08-30 10:17:51 +02:00
wm4
ce93ee8bd0 manpage: fix minor grammar issue 2014-08-29 20:56:08 +02:00
Bin Jin
225f2e67b7 vo_opengl: remove macro operator from shader
Removes '##' operator from OpenGL shader code.
2014-08-29 20:56:03 +02:00
wm4
a8299cec29 TOOLS/youtube-dl_mpv: allow playing multiple URLs
Unfortunately this also means you can't pass extra mpv options after the
URL anymore. You can prefix the script with MPV='mpv --options' though.
2014-08-29 20:20:29 +02:00
wm4
7d79cd57ff player: fix quit handling when seeking past EOF while paused
The player didn't quit when seeking past EOF in audio-only mode while
paused. The only case when we don't want to quit is when the last video
frame is displayed while paused.

This logic was probably broken a while ago, but I'm not exactly sure.

CC: @mpv-player/stable
2014-08-29 19:13:34 +02:00
wm4
68ff8a0484 Move compat/ and bstr/ directory contents somewhere else
bstr.c doesn't really deserve its own directory, and compat had just
a few files, most of which may as well be in osdep. There isn't really
any justification for these extra directories, so get rid of them.

The compat/libav.h was empty - just delete it. We changed our approach
to API compatibility, and will likely not need it anymore.
2014-08-29 12:31:52 +02:00
wm4
4bc9c52a12 bstr: preparation for next commit
Just so I can move this file without modifying its contents in the next
commit.

compat/compiler.h is to be moved to osdep/ with the next commit, so add
a dummy header.
2014-08-29 12:16:55 +02:00
wm4
ac2502141d stream: tweaks to network reconnection code
Don't reconnect to the cache (since the cached stream already handles
reconnection). This is necessary, because since commit 0b428e44 the
"streaming" field (which also controls whether attempting to reconnect
makes sense at all) is inherited to the cache stream wrapper.

Also, let the stream reset its own position on reconnect. This removes
some assumptions and messy handling from the reconnect function.

Make sure the cache is dropped on reconnect. This takes care of
readjusting the stream position if necessary. (Also drop the cache on
DVB channel switching commands.)
2014-08-29 11:58:49 +02:00
Ryan Jacobs
66f158b89b command: remove extra space
Signed-off-by: wm4 <wm4@nowhere>
2014-08-29 11:58:25 +02:00
wm4
ff7a1c21ce options: more detailed output for --vf-... error message 2014-08-28 17:51:33 +02:00
wm4
e47a9bd721 command: export demuxer cache info properties 2014-08-28 17:49:10 +02:00
wm4
fb1266c98b player: update cache state only if requested
Add a mechanism to the client API code, which allows the player core to
query whether a client API event is needed at all. Use it for the cache
update.

In this case, this is probably a pure microoptimization; but the
mechanism will be useful for other things too.
2014-08-28 17:49:09 +02:00