1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00
Commit Graph

36942 Commits

Author SHA1 Message Date
wm4
4833e92b54 vda: attempt to fix build (2)
Still no OSX here.
2013-12-22 01:44:19 +01:00
wm4
cb36f9fddb path-macosx: attempt to fix build
Untested... no OSX here.
2013-12-22 01:36:45 +01:00
wm4
0a3e9a9ac3 Merge branch 'msg_refactor'
This branch changes mp_msg() so that it doesn't require global context.
The changes are pretty violent.
2013-12-21 23:15:32 +01:00
wm4
245e5b8441 msg: remove global state 2013-12-21 23:11:12 +01:00
wm4
678ce04b3f msg: don't prefix slave-mode stuff by default 2013-12-21 22:13:05 +01:00
wm4
8e75cc3339 player: use separate msg prefix for statusline
So the user can specifically mute or unmute the status line with
--msglevel. Accidentally removed with commit 5e0c4ec3.
2013-12-21 22:13:05 +01:00
wm4
6aaea76b4d demux: don't prefix tag output with demuxer name
Add a separate mp_log instance for this purpose.
2013-12-21 22:13:05 +01:00
wm4
eef36f03ea msg: rename mp_msg_log -> mp_msg
Same for companion functions.
2013-12-21 22:13:04 +01:00
wm4
eba5d025d2 msg: convert defines to enum
Also get rid of MSGL_HINT and the many MSGL_DBG* levels.
2013-12-21 22:13:04 +01:00
wm4
3fa584e280 msg: remove legacy stuff 2013-12-21 21:43:17 +01:00
wm4
893aaf8d12 vo_opengl_old: remove leftovers 2013-12-21 21:43:17 +01:00
wm4
455214acef macosx_application: replace mp_msg with stderr for semi-fatal error
Apparently this should never be run anyway.
2013-12-21 21:43:17 +01:00
wm4
1a0e83e708 cpudetect: remove mp_msg calls
Worthless anyway.
2013-12-21 21:43:17 +01:00
wm4
ad2199128d path lookup functions: mp_msg conversions
There's a single mp_msg() in path.c, but all path lookup functions seem
to depend on it, so we get a rat-tail of stuff we have to change. This
is probably a good thing though, because we can have the path lookup
functions also access options, so we could allow overriding the default
config path, or ignore the MPV_HOME environment variable, and such
things.

Also take the chance to consistently add talloc_ctx parameters to the
path lookup functions.

Also, this change causes a big mess on configfiles.c. It's the same
issue: everything suddenly needs a (different) context argument. Make it
less wild by providing a mp_load_auto_profiles() function, which
isolates most of it to configfiles.c.
2013-12-21 21:43:17 +01:00
wm4
232b8de095 af_export: require filename argument
Since mp_find_user_config_file() is going to get a context argument,
which would be annoying to do in the audio chain (actually I'm just
lazy).
2013-12-21 21:43:17 +01:00
wm4
d9b5652cac quvi: mp_msg conversions 2013-12-21 21:43:17 +01:00
wm4
33c8fd789d charset_conv: mp_msg conversions 2013-12-21 21:43:16 +01:00
wm4
0335011f11 stream: mp_msg conversions
We also drop some slave mode stuff from stream_vcd.
2013-12-21 21:43:16 +01:00
wm4
3dbc9007b0 demux: mp_msg conversions
The TV code pretends to be part of stream/, but it's actually demuxer
code too. The audio_in code is shared between the TV code and
stream_radio.c, so stream_radio.c needs a small hack until stream.c is
converted.
2013-12-21 21:43:16 +01:00
wm4
9149e2af56 playlist_parser: mp_msg conversion 2013-12-21 21:43:16 +01:00
wm4
8cd1b33a22 x11: mp_msg conversion for fstype help output 2013-12-21 21:43:16 +01:00
wm4
9428e05b3f encode_lavc: mp_msg conversions
Miss two mp_msg calls, because these conflict with future commits.
2013-12-21 21:43:16 +01:00
wm4
09e588662e options: some more mp_msg conversions 2013-12-21 21:43:16 +01:00
wm4
d57eaa7e30 av_log: mp_msg conversion
This is pretty nasty, because FFmpeg/Libav is yet another library with a
global message callback. We do something with mutexes trying to get it
done, but of course we can't actually solve this problem. If more than
one library in a process use FFmpeg/Libav, only one of them will get log
messages.
2013-12-21 21:43:16 +01:00
wm4
7bdee8f35e m_option: add mp_log context to sub-module print_help callback 2013-12-21 21:43:16 +01:00
wm4
9242c34fa2 m_option: add mp_log callback to OPT_STRING_VALIDATE options
And also convert a bunch of other code, especially ao_wasapi and
ao_portaudio.
2013-12-21 21:43:16 +01:00
wm4
d8d42b44fc m_option, m_config: mp_msg conversions
Always pass around mp_log contexts in the option parser code. This of
course affects all users of this API as well.

In stream.c, pass a mp_null_log, because we can't do it properly yet.
This will be fixed later.
2013-12-21 21:05:02 +01:00
wm4
a2d144fc8f m_property: mp_msg conversions
Includes some semi-crappy hacks to avoid changing too much code for this
conversion (allowing NULL log argument for m_property_do()).
2013-12-21 21:04:21 +01:00
wm4
ed71606e65 input: rework how input sources are added
Until now, there were two functions to add input sources (stuff like
stdin input, slave mode, lirc, joystick). Unify them to a single
function (mp_input_add_fd()), and make sure the associated callbacks
always have a context parameter.

Change the lirc and joystick code such that they take store their state
in a context struct (probably worthless), and use the new mp_msg
replacements (the point of this refactoring).

Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in
the terminal handling code.
2013-12-21 20:50:13 +01:00
wm4
dadf3a9a46 m_config: add custom context to includefunc callback 2013-12-21 20:50:13 +01:00
wm4
3846fc7587 sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
wm4
92f9b51426 find_subfiles: mp_msg conversions 2013-12-21 20:50:13 +01:00
wm4
15ae64d369 player/timeline: mp_msg conversions 2013-12-21 20:50:13 +01:00
wm4
9825906f73 demux: use fprintf() for printing fatal errors
We print these before calling abort(), which is deadly unclean anyway.
Avoids having to add log contexts.
2013-12-21 20:50:13 +01:00
wm4
02a9fbd0ce codecs: avoid having to print error message
The mp_select_decoders() function doesn't have a log context (and I
don't want to give it one), so get rid of the mp_msg error message by
enhancing the semantics such that the syntax error is replaced by a new
feature. Now doing "--ad=something" will enable all decoders in the
"something" module, same as "--ad=something:*". Pretty useless, but gets
rid of the annoyance.
2013-12-21 20:50:13 +01:00
wm4
5f0fbacf16 codecs: mp_msg conversion 2013-12-21 20:50:12 +01:00
wm4
71b6a52295 av_common: abuse av_log to print message instead of mp_msg
Saves a little bit of pain.
2013-12-21 20:50:12 +01:00
wm4
138d183d83 ao: some missing mp_msg conversions 2013-12-21 20:50:12 +01:00
wm4
7cc3c3aeec ao_wasapi: mp_msg conversions
Remove the nonsensical print_lock too.

Things that are called from the option validator are not converted yet,
because the option parser doesn't provide a log context yet.
2013-12-21 20:50:12 +01:00
wm4
60c06fec1e audio/fmt-conversion.c: remove unknown audio format messages
Same deal as with video/fmt-conversion.c.
2013-12-21 20:50:12 +01:00
wm4
1974c9b49d audio: mp_msg conversions 2013-12-21 20:50:12 +01:00
wm4
4abe6b862f mixer: mp_msg conversions 2013-12-21 20:50:11 +01:00
wm4
57359a1d62 lua: minor simplification
Using m_property_do() is more complicated, and will have to be changed
later for mp_msg conversions.
2013-12-21 20:50:11 +01:00
wm4
eb15265d5a osdep/priority: drop message output when setting priority 2013-12-21 20:50:11 +01:00
wm4
fb5ee5bfbe player: use MSGL_SMODE for some slave-mode stuff
Replacement for MSGT_IDENTIFY. Can't kill it off completely yet; certain
people would complain to me personally.
2013-12-21 20:50:11 +01:00
wm4
95d94238f4 img_format: drop message about unknown pixel formats
Too bad.
2013-12-21 20:50:11 +01:00
wm4
823bf0029d bitmap_packer: use printf() for fatal message
This is printed right before abort(), which is bad style anyway.
Converting this to mp_msg will help nobody, and passing through a mp_log
is effort.
2013-12-21 20:50:11 +01:00
wm4
70af7ab8e5 vaapi: mp_msg conversions
This ended up a little bit messy. In order to get a mp_log everywhere,
mostly make use of the fact that va_surface already references global
state anyway.
2013-12-21 20:50:11 +01:00
wm4
9e0b84c321 vdpau: mp_msg conversions 2013-12-21 20:50:11 +01:00
wm4
64278128d8 video/fmt-conversion.c: remove unknown pixel format messages
This removes the messages printed on unknown pixel format messages.
Passing a mp_log to them would be too messy. Actually, this is a good
change, because in the past we often had trouble with these messages
printed too often (causing terminal spam etc.), and printing warnings or
error messages on the caller sides is much cleaner.

vd_lavc.c had a change earlier to print an error message if a decoder
outputs an unsupported pixel format.
2013-12-21 20:50:11 +01:00