Commit Graph

4 Commits

Author SHA1 Message Date
wm4 55d7f9ded1 player: add automatic loading of external cover art files
Picks up files like "cover.jpg". It's made part of normal external file
loading, so I'm adding 3 new options that are direct equivalents for the
options that control loading of external subtitle and audio files. Even
though I bet nobody wants them and they just increase confusion... I
guess the world is actually hell, so this outcome should be fine.

It prefers non-specific external files like "cover.jpg" over embedded
cover art. Not sure if that's wanted or unwanted.

There's some pain over explicitly marking such files as external
pictures. This is basically an optimization: in most cases, a heuristic
would treat an image file loaded with --external-file the same (it's a
heuristic because ffmpeg can't tell us whether something is an image or
a video). However, even with this heuristic, it would decode the cover
art picture again on each seek, which would essentially slow down
seeking in audio files. This bothered me greatly, which is why I'm
adding these additional options at all, and bothered with the previous
commit.

Fixes: #3056
2020-09-28 00:12:52 +02:00
wm4 f8ab59eacd player: get rid of mpv_global.opts
This was always a legacy thing. Remove it by applying an orgy of
mp_get_config_group() calls, and sometimes m_config_cache_alloc() or
mp_read_option_raw().

win32 changes untested.
2018-05-24 19:56:35 +02:00
wm4 5bfbe6dfde external_files: change license to LGPL
While we could easily ifdef-out this file for a LGPL core, it's still
annoying, and also the only GPL file remaining in player/ that is not
based on mplayer.c.

This file originates from subreader.c. It's not clear whether the
original author of it gave us permission to relicense to LGPL (he
probably did, but without further clarification it's sort of ambiguous),
but the subtitle file search code was written by other authors anyway
(see 7eef93819f).

One contribution (574eb892ea) is a bit of a corner case, as
test_ext_list() now does a bstrcasecmp(). But I don't think the
copyright remains here. (I asked the author anyway, just in case. But
I didn't wait for the answer.)

In some other cases, contributors who could not be reached added some
subtitle extensions. I don't think those are copyrightable on their own,
but I dropped them anyway just to be sure.
2017-06-20 14:22:10 +02:00
wm4 8782354e6d player: rename and move find_subfiles.c
This was in sub/, because the code used to be specific to subtitles. It
was extended to automatically load external audio files too, and moving
the file and renaming it was long overdue.
2015-09-20 18:05:06 +02:00