aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-08-29 12:09:04 +0200
committerGravatar wm4 <wm4@nowhere>2014-08-29 12:31:52 +0200
commit68ff8a0484b592a629ef2bbcb0537265ae36d1d0 (patch)
tree9dafc6d3e5bea87957134ddbca426abb4a4c6117
parent4bc9c52a122ba51c8fd8f2aea923f8cb2bab1d5f (diff)
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.
-rw-r--r--audio/chmap.h2
-rw-r--r--audio/decode/ad_lavc.c2
-rw-r--r--audio/decode/dec_audio.c2
-rw-r--r--audio/filter/af_convertsignendian.c2
-rw-r--r--audio/format.h2
-rw-r--r--audio/out/ao.h2
-rw-r--r--audio/out/ao_lavc.c1
-rwxr-xr-xaudio/out/ao_wasapi.h2
-rw-r--r--audio/out/pull.c2
-rw-r--r--audio/out/push.c2
-rw-r--r--common/codecs.c2
-rw-r--r--common/common.c2
-rw-r--r--common/common.h2
-rw-r--r--common/msg.c4
-rw-r--r--common/msg.h2
-rw-r--r--common/playlist.h2
-rw-r--r--common/tags.c2
-rw-r--r--common/tags.h2
-rw-r--r--compat/compiler.h27
-rw-r--r--compat/libav.h24
-rw-r--r--demux/demux.h2
-rw-r--r--demux/demux_cue.c2
-rw-r--r--demux/demux_lavf.c3
-rw-r--r--demux/demux_mkv.c2
-rw-r--r--demux/ebml.c2
-rw-r--r--demux/ebml.h2
-rw-r--r--demux/ms_hdr.h2
-rw-r--r--input/cmd_parse.c2
-rw-r--r--input/event.h2
-rw-r--r--input/input.c2
-rw-r--r--input/input.h2
-rw-r--r--input/keycodes.c2
-rw-r--r--input/pipe.c2
-rw-r--r--misc/bstr.c (renamed from bstr/bstr.c)0
-rw-r--r--misc/bstr.h (renamed from bstr/bstr.h)0
-rw-r--r--misc/charset_conv.h2
-rw-r--r--misc/ring.c2
-rw-r--r--old-makefile3
-rw-r--r--options/m_config.h2
-rw-r--r--options/m_option.h2
-rw-r--r--options/path.h2
-rw-r--r--osdep/atomics.h (renamed from compat/atomics.h)0
-rw-r--r--osdep/compiler.h28
-rw-r--r--osdep/mpbswap.h (renamed from compat/mpbswap.h)0
-rw-r--r--osdep/terminal-unix.c2
-rw-r--r--player/lua.c2
-rw-r--r--player/screenshot.c2
-rw-r--r--player/scripting.c2
-rw-r--r--player/timeline/tl_cue.c2
-rw-r--r--player/timeline/tl_matroska.c2
-rw-r--r--player/timeline/tl_mpv_edl.c2
-rw-r--r--stream/stream.c4
-rw-r--r--stream/stream.h2
-rw-r--r--stream/stream_cdda.c2
-rw-r--r--stream/stream_lavf.c2
-rw-r--r--sub/osd_libass.c2
-rw-r--r--sub/sd_lavc_conv.c2
-rw-r--r--sub/sd_lavf_srt.c2
-rw-r--r--sub/sd_microdvd.c2
-rw-r--r--sub/sd_srt.c2
-rw-r--r--talloc.h2
-rw-r--r--video/decode/vd_lavc.c6
-rw-r--r--video/filter/vf_divtc.c2
-rw-r--r--video/filter/vf_scale.c1
-rw-r--r--video/image_writer.c2
-rw-r--r--video/img_format.c2
-rw-r--r--video/img_format.h2
-rw-r--r--video/out/gl_common.h2
-rw-r--r--video/out/gl_lcms.c2
-rw-r--r--video/out/gl_video.c2
-rw-r--r--video/out/vo.c2
-rw-r--r--video/out/vo_image.c2
-rw-r--r--video/out/vo_lavc.c1
-rw-r--r--video/out/vo_opengl.c2
-rw-r--r--video/out/wayland_common.c2
-rw-r--r--video/out/x11_common.c2
-rw-r--r--wscript_build.py4
77 files changed, 94 insertions, 134 deletions
diff --git a/audio/chmap.h b/audio/chmap.h
index 37815a25b6..22cf6fb73b 100644
--- a/audio/chmap.h
+++ b/audio/chmap.h
@@ -20,7 +20,7 @@
#include <inttypes.h>
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#define MP_NUM_CHANNELS 8
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index c4372ba4b3..afff84ef00 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -37,8 +37,6 @@
#include "ad.h"
#include "audio/fmt-conversion.h"
-#include "compat/libav.h"
-
struct priv {
AVCodecContext *avctx;
AVFrame *avframe;
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index c7580a23d8..0afcd8857e 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -28,7 +28,7 @@
#include "config.h"
#include "common/codecs.h"
#include "common/msg.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "stream/stream.h"
#include "demux/demux.h"
diff --git a/audio/filter/af_convertsignendian.c b/audio/filter/af_convertsignendian.c
index 45b365efd8..a0b47b38a3 100644
--- a/audio/filter/af_convertsignendian.c
+++ b/audio/filter/af_convertsignendian.c
@@ -20,7 +20,7 @@
#include "af.h"
#include "audio/format.h"
-#include "compat/mpbswap.h"
+#include "osdep/mpbswap.h"
static bool test_conversion(int src_format, int dst_format)
{
diff --git a/audio/format.h b/audio/format.h
index 788f4ed1c1..c4afe7a428 100644
--- a/audio/format.h
+++ b/audio/format.h
@@ -26,7 +26,7 @@
#include <stdbool.h>
#include "osdep/endian.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#if BYTE_ORDER == BIG_ENDIAN
#define AF_SELECT_LE_BE(LE, BE) BE
diff --git a/audio/out/ao.h b/audio/out/ao.h
index 59de0c08b1..3eb2925971 100644
--- a/audio/out/ao.h
+++ b/audio/out/ao.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "audio/chmap.h"
#include "audio/chmap_sel.h"
diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c
index 34cf2c21ac..357c34763d 100644
--- a/audio/out/ao_lavc.c
+++ b/audio/out/ao_lavc.c
@@ -28,7 +28,6 @@
#include <libavutil/common.h>
#include <libavutil/audioconvert.h>
-#include "compat/libav.h"
#include "config.h"
#include "options/options.h"
#include "common/common.h"
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h
index 52813b586d..36428b4aea 100755
--- a/audio/out/ao_wasapi.h
+++ b/audio/out/ao_wasapi.h
@@ -28,7 +28,7 @@
#include <mmdeviceapi.h>
#include <avrt.h>
-#include "compat/atomics.h"
+#include "osdep/atomics.h"
typedef struct wasapi_state {
struct mp_log *log;
diff --git a/audio/out/pull.c b/audio/out/pull.c
index eb77be81a2..0613006f07 100644
--- a/audio/out/pull.c
+++ b/audio/out/pull.c
@@ -30,7 +30,7 @@
#include "osdep/timer.h"
#include "osdep/threads.h"
-#include "compat/atomics.h"
+#include "osdep/atomics.h"
#include "misc/ring.h"
/*
diff --git a/audio/out/push.c b/audio/out/push.c
index f35c597100..91b4a67571 100644
--- a/audio/out/push.c
+++ b/audio/out/push.c
@@ -35,7 +35,7 @@
#include "osdep/threads.h"
#include "osdep/timer.h"
-#include "compat/atomics.h"
+#include "osdep/atomics.h"
#include "audio/audio.h"
#include "audio/audio_buffer.h"
diff --git a/common/codecs.c b/common/codecs.c
index 1cbab44969..f89ef0c318 100644
--- a/common/codecs.c
+++ b/common/codecs.c
@@ -17,7 +17,7 @@
#include <assert.h>
#include "talloc.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/msg.h"
#include "codecs.h"
diff --git a/common/common.c b/common/common.c
index afab994d72..a74205dd92 100644
--- a/common/common.c
+++ b/common/common.c
@@ -22,7 +22,7 @@
#include <libavutil/common.h>
#include "talloc.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#define appendf(ptr, ...) \
diff --git a/common/common.h b/common/common.h
index 6c759e9258..b9c3e1e5ea 100644
--- a/common/common.h
+++ b/common/common.h
@@ -24,7 +24,7 @@
#include <stdbool.h>
#include <stdint.h>
-#include "compat/compiler.h"
+#include "osdep/compiler.h"
#include "talloc.h"
// double should be able to represent this exactly
diff --git a/common/msg.c b/common/msg.c
index 6bde6d481d..866cae5c9d 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -27,8 +27,8 @@
#include "talloc.h"
-#include "bstr/bstr.h"
-#include "compat/atomics.h"
+#include "misc/bstr.h"
+#include "osdep/atomics.h"
#include "common/common.h"
#include "common/global.h"
#include "misc/ring.h"
diff --git a/common/msg.h b/common/msg.h
index 80aec2f5b3..5ca868d4bb 100644
--- a/common/msg.h
+++ b/common/msg.h
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <stdint.h>
-#include "compat/compiler.h"
+#include "osdep/compiler.h"
struct mp_log;
diff --git a/common/playlist.h b/common/playlist.h
index 73227f071c..ea0e3698a2 100644
--- a/common/playlist.h
+++ b/common/playlist.h
@@ -19,7 +19,7 @@
#define MPLAYER_PLAYLIST_H
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
struct playlist_param {
bstr name, value;
diff --git a/common/tags.c b/common/tags.c
index c722d5d89c..bc9d98ea2f 100644
--- a/common/tags.c
+++ b/common/tags.c
@@ -17,7 +17,7 @@
#include <libavutil/dict.h>
#include "tags.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
void mp_tags_set_str(struct mp_tags *tags, const char *key, const char *value)
{
diff --git a/common/tags.h b/common/tags.h
index 375289695f..b6db5f3df2 100644
--- a/common/tags.h
+++ b/common/tags.h
@@ -1,7 +1,7 @@
#ifndef MP_TAGS_H
#define MP_TAGS_H
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
struct mp_tags {
char **keys;
diff --git a/compat/compiler.h b/compat/compiler.h
deleted file mode 100644
index a507cd02c2..0000000000
--- a/compat/compiler.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MPV_COMPILER_H
-#define MPV_COMPILER_H
-
-#define MP_EXPAND_ARGS(...) __VA_ARGS__
-
-#ifdef __GNUC__
-
-#define MP_NORETURN __attribute__((noreturn))
-
-/** Use gcc attribute to check printf fns. a1 is the 1-based index of
- * the parameter containing the format, and a2 the index of the first
- * argument. **/
-#ifdef __MINGW32__
-// MinGW maps "printf" to the non-standard MSVCRT functions, even if
-// __USE_MINGW_ANSI_STDIO is defined and set to 1. We need to use "gnu_printf",
-// which isn't necessarily available on other GCC compatible compilers.
-#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (gnu_printf, a1, a2)))
-#else
-#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (printf, a1, a2)))
-#endif
-
-#else
-#define PRINTF_ATTRIBUTE(a1, a2)
-#define MP_NORETURN
-#endif
-
-#endif
diff --git a/compat/libav.h b/compat/libav.h
deleted file mode 100644
index 608cedaa8b..0000000000
--- a/compat/libav.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This file is part of mpv.
- *
- * mpv is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPV_LIBAV_COMPAT_H
-#define MPV_LIBAV_COMPAT_H
-
-// There's nothing here. But for how long?
-
-#endif /* MPV_LIBAV_COMPAT_H */
diff --git a/demux/demux.h b/demux/demux.h
index 20e6b8a15e..b1c1e28128 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -25,7 +25,7 @@
#include <string.h>
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "common/tags.h"
#include "packet.h"
diff --git a/demux/demux_cue.c b/demux/demux_cue.c
index bfca04dcad..2f2e6fca46 100644
--- a/demux/demux_cue.c
+++ b/demux/demux_cue.c
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <string.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "demux.h"
#include "stream/stream.h"
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 79565993a4..988c3da4e4 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -39,13 +39,12 @@
# include <libavutil/display.h>
#endif
#include <libavutil/opt.h>
-#include "compat/libav.h"
#include "options/options.h"
#include "common/msg.h"
#include "common/tags.h"
#include "common/av_common.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "stream/stream.h"
#include "demux.h"
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index dff08ec894..5e2e0f904f 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -44,7 +44,7 @@
#include "talloc.h"
#include "common/av_common.h"
#include "options/options.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "stream/stream.h"
#include "demux.h"
#include "stheader.h"
diff --git a/demux/ebml.c b/demux/ebml.c
index 7e79ee04c8..fdebc4a8ed 100644
--- a/demux/ebml.c
+++ b/demux/ebml.c
@@ -34,7 +34,7 @@
#include "talloc.h"
#include "ebml.h"
#include "stream/stream.h"
-#include "compat/mpbswap.h"
+#include "osdep/mpbswap.h"
#include "common/msg.h"
// Whether the id is a known Matroska level 1 element (allowed as element on
diff --git a/demux/ebml.h b/demux/ebml.h
index a544ad41cf..9d7a0cc924 100644
--- a/demux/ebml.h
+++ b/demux/ebml.h
@@ -24,7 +24,7 @@
#include <stdbool.h>
#include "stream/stream.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
struct mp_log;
diff --git a/demux/ms_hdr.h b/demux/ms_hdr.h
index e44f3589ad..795b070cef 100644
--- a/demux/ms_hdr.h
+++ b/demux/ms_hdr.h
@@ -19,7 +19,7 @@
#ifndef MPLAYER_MS_HDR_H
#define MPLAYER_MS_HDR_H
-#include "compat/mpbswap.h"
+#include "osdep/mpbswap.h"
#include "video/img_fourcc.h"
// These structs must be binary-compatible to the native win32 types,
diff --git a/input/cmd_parse.c b/input/cmd_parse.c
index db44ccaf5e..05cd066dbf 100644
--- a/input/cmd_parse.c
+++ b/input/cmd_parse.c
@@ -18,7 +18,7 @@
#include <stddef.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "common/msg.h"
#include "options/m_option.h"
diff --git a/input/event.h b/input/event.h
index 820932d9da..a1cb542f8f 100644
--- a/input/event.h
+++ b/input/event.h
@@ -15,7 +15,7 @@
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
struct input_ctx;
diff --git a/input/input.c b/input/input.c
index e85d16ccd2..908d50d014 100644
--- a/input/input.c
+++ b/input/input.c
@@ -48,7 +48,7 @@
#include "options/path.h"
#include "talloc.h"
#include "options/options.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "stream/stream.h"
#include "common/common.h"
diff --git a/input/input.h b/input/input.h
index a8341d7773..431519a47c 100644
--- a/input/input.h
+++ b/input/input.h
@@ -20,7 +20,7 @@
#define MPLAYER_INPUT_H
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "cmd_list.h"
#include "cmd_parse.h"
diff --git a/input/keycodes.c b/input/keycodes.c
index 00f983e140..a92b6ed0c8 100644
--- a/input/keycodes.c
+++ b/input/keycodes.c
@@ -20,7 +20,7 @@
#include <string.h>
#include <strings.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "common/msg.h"
diff --git a/input/pipe.c b/input/pipe.c
index 59f6a64c2b..12922f590c 100644
--- a/input/pipe.c
+++ b/input/pipe.c
@@ -10,7 +10,7 @@
#endif
#include "common/msg.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "osdep/io.h"
#include "input.h"
#include "cmd_parse.h"
diff --git a/bstr/bstr.c b/misc/bstr.c
index a6268b4d53..a6268b4d53 100644
--- a/bstr/bstr.c
+++ b/misc/bstr.c
diff --git a/bstr/bstr.h b/misc/bstr.h
index a1e99dd4a5..a1e99dd4a5 100644
--- a/bstr/bstr.h
+++ b/misc/bstr.h
diff --git a/misc/charset_conv.h b/misc/charset_conv.h
index e9efa48444..93bd91cffe 100644
--- a/misc/charset_conv.h
+++ b/misc/charset_conv.h
@@ -2,7 +2,7 @@
#define MP_CHARSET_CONV_H
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
struct mp_log;
diff --git a/misc/ring.c b/misc/ring.c
index 804e6330b0..41c9c6a99e 100644
--- a/misc/ring.c
+++ b/misc/ring.c
@@ -21,7 +21,7 @@
#include <libavutil/common.h>
#include <assert.h>
#include "talloc.h"
-#include "compat/atomics.h"
+#include "osdep/atomics.h"
#include "ring.h"
struct mp_ring {
diff --git a/old-makefile b/old-makefile
index d0568c0722..2c3c623eb8 100644
--- a/old-makefile
+++ b/old-makefile
@@ -146,7 +146,6 @@ SOURCES = audio/audio.c \
audio/out/ao_pcm.c \
audio/out/pull.c \
audio/out/push.c \
- bstr/bstr.c \
common/av_common.c \
common/av_log.c \
common/codecs.c \
@@ -175,6 +174,7 @@ SOURCES = audio/audio.c \
input/input.c \
input/keycodes.c \
input/pipe.c \
+ misc/bstr.c \
misc/charset_conv.c \
misc/dispatch.c \
misc/rendezvous.c \
@@ -303,7 +303,6 @@ DIRS = . \
audio/decode \
audio/filter \
audio/out \
- bstr \
common \
compat \
input \
diff --git a/options/m_config.h b/options/m_config.h
index 958dc3d5e4..eb255428e0 100644
--- a/options/m_config.h
+++ b/options/m_config.h
@@ -22,7 +22,7 @@
#include <stddef.h>
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
// m_config provides an API to manipulate the config variables in MPlayer.
// It makes use of the Options API to provide a context stack that
diff --git a/options/m_option.h b/options/m_option.h
index 13afea22df..d0ca211aa1 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -23,7 +23,7 @@
#include <stddef.h>
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "audio/chmap.h"
// m_option allows to parse, print and copy data of various types.
diff --git a/options/path.h b/options/path.h
index 30ca34d205..6e64cd1d3c 100644
--- a/options/path.h
+++ b/options/path.h
@@ -22,7 +22,7 @@
#define MPLAYER_PATH_H
#include <stdbool.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
struct mpv_global;
diff --git a/compat/atomics.h b/osdep/atomics.h
index e5fb717a78..e5fb717a78 100644
--- a/compat/atomics.h
+++ b/osdep/atomics.h
diff --git a/osdep/compiler.h b/osdep/compiler.h
index 1b878a9b3d..a507cd02c2 100644
--- a/osdep/compiler.h
+++ b/osdep/compiler.h
@@ -1 +1,27 @@
-#include "compat/compiler.h"
+#ifndef MPV_COMPILER_H
+#define MPV_COMPILER_H
+
+#define MP_EXPAND_ARGS(...) __VA_ARGS__
+
+#ifdef __GNUC__
+
+#define MP_NORETURN __attribute__((noreturn))
+
+/** Use gcc attribute to check printf fns. a1 is the 1-based index of
+ * the parameter containing the format, and a2 the index of the first
+ * argument. **/
+#ifdef __MINGW32__
+// MinGW maps "printf" to the non-standard MSVCRT functions, even if
+// __USE_MINGW_ANSI_STDIO is defined and set to 1. We need to use "gnu_printf",
+// which isn't necessarily available on other GCC compatible compilers.
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (gnu_printf, a1, a2)))
+#else
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (printf, a1, a2)))
+#endif
+
+#else
+#define PRINTF_ATTRIBUTE(a1, a2)
+#define MP_NORETURN
+#endif
+
+#endif
diff --git a/compat/mpbswap.h b/osdep/mpbswap.h
index f75c8b86c8..f75c8b86c8 100644
--- a/compat/mpbswap.h
+++ b/osdep/mpbswap.h
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index 26f288486e..b4890ee30c 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -43,7 +43,7 @@
#include <unistd.h>
#include "common/common.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "input/input.h"
#include "input/keycodes.h"
#include "misc/ctype.h"
diff --git a/player/lua.c b/player/lua.c
index c9c0001347..dbf0756648 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -39,7 +39,7 @@
#include "options/m_option.h"
#include "input/input.h"
#include "options/path.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "osdep/timer.h"
#include "osdep/threads.h"
#include "sub/osd.h"
diff --git a/player/screenshot.c b/player/screenshot.c
index 63bf29fbd7..4e22afc69d 100644
--- a/player/screenshot.c
+++ b/player/screenshot.c
@@ -28,7 +28,7 @@
#include "screenshot.h"
#include "core.h"
#include "command.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/msg.h"
#include "options/path.h"
#include "video/mp_image.h"
diff --git a/player/scripting.c b/player/scripting.c
index 1efe6389f6..3c9829b16d 100644
--- a/player/scripting.c
+++ b/player/scripting.c
@@ -30,7 +30,7 @@
#include "common/common.h"
#include "common/msg.h"
#include "options/path.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "core.h"
#include "client.h"
#include "libmpv/client.h"
diff --git a/player/timeline/tl_cue.c b/player/timeline/tl_cue.c
index d5e8b08164..a4f23c45cf 100644
--- a/player/timeline/tl_cue.c
+++ b/player/timeline/tl_cue.c
@@ -27,7 +27,7 @@
#include "common/msg.h"
#include "demux/demux.h"
#include "options/path.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "stream/stream.h"
diff --git a/player/timeline/tl_matroska.c b/player/timeline/tl_matroska.c
index cfcc379867..5e69610bd4 100644
--- a/player/timeline/tl_matroska.c
+++ b/player/timeline/tl_matroska.c
@@ -34,7 +34,7 @@
#include "common/msg.h"
#include "demux/demux.h"
#include "options/path.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "common/playlist.h"
#include "stream/stream.h"
diff --git a/player/timeline/tl_mpv_edl.c b/player/timeline/tl_mpv_edl.c
index 69cd4e97ce..e11b483935 100644
--- a/player/timeline/tl_mpv_edl.c
+++ b/player/timeline/tl_mpv_edl.c
@@ -27,7 +27,7 @@
#include "common/msg.h"
#include "demux/demux.h"
#include "options/path.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "stream/stream.h"
diff --git a/stream/stream.c b/stream/stream.c
index e9bbbc8412..78859bc44f 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -31,7 +31,7 @@
#include <assert.h>
#include <libavutil/common.h>
-#include "compat/mpbswap.h"
+#include "osdep/mpbswap.h"
#include "talloc.h"
@@ -39,7 +39,7 @@
#include "common/common.h"
#include "common/global.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/msg.h"
#include "options/options.h"
#include "options/path.h"
diff --git a/stream/stream.h b/stream/stream.h
index 2cd3d9f5fa..a961267aac 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -27,7 +27,7 @@
#include <sys/types.h>
#include <fcntl.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
enum streamtype {
STREAMTYPE_GENERIC = 0,
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index 1a03c443df..79f700c260 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -46,7 +46,7 @@
#include "options/m_option.h"
#include "options/m_config.h"
#include "options/options.h"
-#include "compat/mpbswap.h"
+#include "osdep/mpbswap.h"
#include "common/msg.h"
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c
index afb92f279f..37c6adc51c 100644
--- a/stream/stream_lavf.c
+++ b/stream/stream_lavf.c
@@ -31,7 +31,7 @@
#include "cookies.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "talloc.h"
struct stream_lavf_params *stream_lavf_opts;
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index 90807fa60a..1fea27ced6 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -25,7 +25,7 @@
#include "config.h"
#include "talloc.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/common.h"
#include "common/msg.h"
#include "osd.h"
diff --git a/sub/sd_lavc_conv.c b/sub/sd_lavc_conv.c
index 3414d66b25..09e960cde5 100644
--- a/sub/sd_lavc_conv.c
+++ b/sub/sd_lavc_conv.c
@@ -27,7 +27,7 @@
#include "talloc.h"
#include "common/msg.h"
#include "common/av_common.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "sd.h"
#define HAVE_AV_WEBVTT (LIBAVCODEC_VERSION_MICRO >= 100)
diff --git a/sub/sd_lavf_srt.c b/sub/sd_lavf_srt.c
index 0a48afa990..8f1f7de78b 100644
--- a/sub/sd_lavf_srt.c
+++ b/sub/sd_lavf_srt.c
@@ -21,7 +21,7 @@
#include <inttypes.h>
#include <assert.h>
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "sd.h"
/*
diff --git a/sub/sd_microdvd.c b/sub/sd_microdvd.c
index 5de9a1814b..cd4d52398e 100644
--- a/sub/sd_microdvd.c
+++ b/sub/sd_microdvd.c
@@ -27,7 +27,7 @@
#include <libavutil/common.h>
#include "common/msg.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "sd.h"
struct line {
diff --git a/sub/sd_srt.c b/sub/sd_srt.c
index 160f865e11..d2628c9b92 100644
--- a/sub/sd_srt.c
+++ b/sub/sd_srt.c
@@ -28,7 +28,7 @@
#include "common/common.h"
#include "common/msg.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "misc/ctype.h"
#include "sd.h"
diff --git a/talloc.h b/talloc.h
index 1eeef8dca1..11f996b34d 100644
--- a/talloc.h
+++ b/talloc.h
@@ -2,6 +2,6 @@
#include <stdio.h>
#include <stdarg.h>
-#include "compat/compiler.h"
+#include "osdep/compiler.h"
#include "ta/ta_talloc.h"
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 350f5f16b2..1d33742bc5 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -28,17 +28,15 @@
#include <libavutil/intreadwrite.h>
#include <libavutil/pixdesc.h>
-#include "compat/libav.h"
-
#include "talloc.h"
#include "config.h"
#include "common/msg.h"
#include "options/options.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/av_common.h"
#include "common/codecs.h"
-#include "compat/mpbswap.h"
+#include "osdep/mpbswap.h"
#include "video/fmt-conversion.h"
#include "vd.h"
diff --git a/video/filter/vf_divtc.c b/video/filter/vf_divtc.c
index 093aa2883b..79abd94065 100644
--- a/video/filter/vf_divtc.c
+++ b/video/filter/vf_divtc.c
@@ -26,7 +26,7 @@
#include "config.h"
#include "common/msg.h"
#include "options/m_option.h"
-#include "compat/mpbswap.h"
+#include "osdep/mpbswap.h"
#include "video/img_format.h"
#include "video/mp_image.h"
diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c
index 11c4044483..eac1aa79a9 100644
--- a/video/filter/vf_scale.c
+++ b/video/filter/vf_scale.c
@@ -32,7 +32,6 @@
#include "video/mp_image.h"
#include "vf.h"
#include "video/fmt-conversion.h"
-#include "compat/mpbswap.h"
#include "video/sws_utils.h"
diff --git a/video/image_writer.c b/video/image_writer.c
index c6da4ff7e5..122379f725 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -23,8 +23,6 @@
#include <libavcodec/avcodec.h>
#include <libavutil/mem.h>
-#include "compat/libav.h"
-
#include "config.h"
#if HAVE_JPEG
diff --git a/video/img_format.c b/video/img_format.c
index 9290a598bb..e838b5ca55 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -22,8 +22,6 @@
#include <libavutil/pixfmt.h>
#include <libavutil/pixdesc.h>
-#include "compat/libav.h"
-
#include "video/img_format.h"
#include "video/mp_image.h"
#include "video/fmt-conversion.h"
diff --git a/video/img_format.h b/video/img_format.h
index 03ae1e91d3..3eb6ba16a8 100644
--- a/video/img_format.h
+++ b/video/img_format.h
@@ -22,7 +22,7 @@
#include <inttypes.h>
#include "osdep/endian.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#if BYTE_ORDER == BIG_ENDIAN
#define MP_SELECT_LE_BE(LE, BE) BE
diff --git a/video/out/gl_common.h b/video/out/gl_common.h
index 2c6ae92224..21c276fb85 100644
--- a/video/out/gl_common.h
+++ b/video/out/gl_common.h
@@ -30,7 +30,7 @@
#include "config.h"
#include "common/msg.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "vo.h"
#include "video/csputils.h"
diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c
index b8416bea30..71fe66eb0a 100644
--- a/video/out/gl_lcms.c
+++ b/video/out/gl_lcms.c
@@ -28,7 +28,7 @@
#include "stream/stream.h"
#include "common/common.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/msg.h"
#include "options/m_option.h"
#include "options/path.h"
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 359013a6e6..5cf832d201 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -30,7 +30,7 @@
#include "gl_video.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "gl_common.h"
#include "gl_osd.h"
#include "filter_kernels.h"
diff --git a/video/out/vo.c b/video/out/vo.c
index 5b63f3cfc2..f7f0f1664a 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -36,7 +36,7 @@
#include "misc/dispatch.h"
#include "misc/rendezvous.h"
#include "options/options.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "vo.h"
#include "aspect.h"
#include "input/input.h"
diff --git a/video/out/vo_image.c b/video/out/vo_image.c
index da6d78f3d8..991265da23 100644
--- a/video/out/vo_image.c
+++ b/video/out/vo_image.c
@@ -25,7 +25,7 @@
#include <libswscale/swscale.h>
#include "config.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "osdep/io.h"
#include "options/path.h"
#include "talloc.h"
diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c
index aa42bc6e1b..da6817d0ca 100644
--- a/video/out/vo_lavc.c
+++ b/video/out/vo_lavc.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include "compat/libav.h"
#include "common/common.h"
#include "options/options.h"
#include "video/fmt-conversion.h"
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index a3be9bb1e7..3b6e3a2e43 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -36,7 +36,7 @@
#include "talloc.h"
#include "common/common.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "common/msg.h"
#include "options/m_config.h"
#include "vo.h"
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index e560faccd2..c7cbf2fb2f 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -31,7 +31,7 @@
#include <linux/input.h>
#include "config.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "options/options.h"
#include "common/msg.h"
#include "talloc.h"
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 6d5485edf2..e9389c5f38 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -23,7 +23,7 @@
#include <limits.h>
#include "config.h"
-#include "bstr/bstr.h"
+#include "misc/bstr.h"
#include "options/options.h"
#include "common/common.h"
#include "common/msg.h"
diff --git a/wscript_build.py b/wscript_build.py
index cfd28088da..95860bb471 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -155,9 +155,6 @@ def build(ctx):
( "audio/out/pull.c" ),
( "audio/out/push.c" ),
- ## Bstr
- ( "bstr/bstr.c" ),
-
## Core
( "common/av_common.c" ),
( "common/av_log.c" ),
@@ -198,6 +195,7 @@ def build(ctx):
( "input/lirc.c", "lirc" ),
## Misc
+ ( "misc/bstr.c" ),
( "misc/charset_conv.c" ),
( "misc/dispatch.c" ),
( "misc/ring.c" ),