mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 17:42:17 +00:00
88d79fc00d
This has two goals: 1. Getting rid of global variables to make the core library-safe. 2. Getting rid of all the MSGT_* constants and the inconsistent prefixes spread throughout the source code. Both goals are not immediately reached with this commit. It's a huge transition that will take time. There are over >2500 mp_msg calls in the source, which all have to be replaced for this to work. The inconsistent prefixes are in particular annoying. Lots of code manually prefixes messages, e.g. mp_msg(MSGT_VO, MSGL_V, "[vo] ..."). Sometimes the prefixes don't even follow this convention (for example vo_direct3d.c uses "<vo_direct3d>" as prefix). This commit allows automatically adding prefixes on request, so consistency will hopefully improve. For now, this commit adds unused stuff, and behavior should not change. In mplayer.c, move the GetCpuCaps() call, because that used mp_msg() before mp_msg_init() was run.
13 lines
280 B
C
13 lines
280 B
C
#ifndef MPV_MPV_H
|
|
#define MPV_MPV_H
|
|
|
|
// This should be accessed by glue code only, never normal code.
|
|
// The only purpose of this is to make mpv library-safe.
|
|
// Think hard before adding new members.
|
|
struct mpv_global {
|
|
struct MPOpts *opts;
|
|
struct mp_log *log;
|
|
};
|
|
|
|
#endif
|