summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-29 12:09:04 +0200
committerwm4 <wm4@nowhere>2014-08-29 12:31:52 +0200
commit68ff8a0484b592a629ef2bbcb0537265ae36d1d0 (patch)
tree9dafc6d3e5bea87957134ddbca426abb4a4c6117
parent4bc9c52a122ba51c8fd8f2aea923f8cb2bab1d5f (diff)
downloadmpv-68ff8a0484b592a629ef2bbcb0537265ae36d1d0.tar.bz2
mpv-68ff8a0484b592a629ef2bbcb0537265ae36d1d0.tar.xz
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/