mirror of
https://github.com/mpv-player/mpv
synced 2025-02-21 23:36:58 +00:00
Reduce recursive config.h inclusions in headers
In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
This commit is contained in:
parent
5e0424f17f
commit
2c08bf1bd7
@ -22,6 +22,8 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "common/common.h"
|
||||
|
||||
#include "options/m_option.h"
|
||||
#include "options/m_config.h"
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "options/options.h"
|
||||
#include "audio/format.h"
|
||||
#include "audio/chmap.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <libavutil/common.h>
|
||||
#include <libavutil/mem.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "common/common.h"
|
||||
#include "af.h"
|
||||
#include "audio/audio_buffer.h"
|
||||
#include "audio/fmt-conversion.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include "config.h"
|
||||
|
||||
#include "bstr/bstr.h"
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
|
@ -21,6 +21,10 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "compat/compiler.h"
|
||||
|
||||
struct mp_log;
|
||||
|
||||
@ -131,9 +135,6 @@ extern int verbose;
|
||||
int mp_msg_test(int mod, int lev);
|
||||
bool mp_msg_test_log(struct mp_log *log, int lev);
|
||||
|
||||
#include "config.h"
|
||||
#include "common/common.h"
|
||||
|
||||
// Note: using mp_msg_log or the MP_ERR/... macros is preferred.
|
||||
void mp_msg_va(int mod, int lev, const char *format, va_list va);
|
||||
void mp_msg(int mod, int lev, const char *format, ... ) PRINTF_ATTRIBUTE(3, 4);
|
||||
|
@ -26,8 +26,6 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* Screen size. Initialized by load_termcap() and get_screen_size() */
|
||||
extern int screen_width;
|
||||
extern int screen_height;
|
||||
|
@ -20,7 +20,6 @@
|
||||
#define MPLAYER_GLOB_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "config.h"
|
||||
|
||||
typedef struct {
|
||||
size_t gl_pathc;
|
||||
|
@ -19,7 +19,6 @@
|
||||
#ifndef MPLAYER_STREAM_H
|
||||
#define MPLAYER_STREAM_H
|
||||
|
||||
#include "config.h"
|
||||
#include "common/msg.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "talloc.h"
|
||||
#include "common/common.h"
|
||||
#include "common/msg.h"
|
||||
#include "options/m_option.h"
|
||||
#include "stream.h"
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "talloc.h"
|
||||
#include "common/common.h"
|
||||
#include "common/msg.h"
|
||||
|
||||
#include <libgen.h>
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "talloc.h"
|
||||
|
||||
#include "common/common.h"
|
||||
#include "img_convert.h"
|
||||
#include "osd.h"
|
||||
#include "video/img_format.h"
|
||||
|
@ -5,8 +5,6 @@
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "demux/stheader.h"
|
||||
#include "video/mp_image.h"
|
||||
#include "video/hwdec.h"
|
||||
|
@ -16,9 +16,11 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "common/msg.h"
|
||||
#include "libavutil/avutil.h"
|
||||
#include <libavutil/pixdesc.h>
|
||||
#include <libavutil/avutil.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "common/msg.h"
|
||||
#include "video/img_format.h"
|
||||
#include "fmt-conversion.h"
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include "common/common.h"
|
||||
#include "common/msg.h"
|
||||
#include "csputils.h"
|
||||
#include "video/img_format.h"
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
struct vo;
|
||||
struct mp_rect;
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/opt.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "sws_utils.h"
|
||||
|
||||
#include "common/common.h"
|
||||
|
Loading…
Reference in New Issue
Block a user