Skip to content

Commit

Permalink
Move compat/ and bstr/ directory contents somewhere else
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wm4 committed Aug 29, 2014
1 parent 4bc9c52 commit 68ff8a0
Show file tree
Hide file tree
Showing 77 changed files with 94 additions and 134 deletions.
2 changes: 1 addition & 1 deletion audio/chmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <inttypes.h>
#include <stdbool.h>
#include "bstr/bstr.h"
#include "misc/bstr.h"

#define MP_NUM_CHANNELS 8

Expand Down
2 changes: 0 additions & 2 deletions audio/decode/ad_lavc.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include "ad.h"
#include "audio/fmt-conversion.h"

#include "compat/libav.h"

struct priv {
AVCodecContext *avctx;
AVFrame *avframe;
Expand Down
2 changes: 1 addition & 1 deletion audio/decode/dec_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion audio/filter/af_convertsignendian.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion audio/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion audio/out/ao.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion audio/out/ao_lavc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion audio/out/ao_wasapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion audio/out/pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "osdep/timer.h"
#include "osdep/threads.h"
#include "compat/atomics.h"
#include "osdep/atomics.h"
#include "misc/ring.h"

/*
Expand Down
2 changes: 1 addition & 1 deletion audio/out/push.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion common/codecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...) \
Expand Down
2 changes: 1 addition & 1 deletion common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions common/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion common/msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <stdlib.h>
#include <stdint.h>

#include "compat/compiler.h"
#include "osdep/compiler.h"

struct mp_log;

Expand Down
2 changes: 1 addition & 1 deletion common/playlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion common/tags.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion common/tags.h
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
27 changes: 0 additions & 27 deletions compat/compiler.h

This file was deleted.

24 changes: 0 additions & 24 deletions compat/libav.h

This file was deleted.

2 changes: 1 addition & 1 deletion demux/demux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion demux/demux_cue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 1 addition & 2 deletions demux/demux_lavf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion demux/demux_mkv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion demux/ebml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion demux/ebml.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <stdbool.h>

#include "stream/stream.h"
#include "bstr/bstr.h"
#include "misc/bstr.h"

struct mp_log;

Expand Down
2 changes: 1 addition & 1 deletion demux/ms_hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion input/cmd_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion input/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion input/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion input/keycodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion input/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion misc/charset_conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define MP_CHARSET_CONV_H

#include <stdbool.h>
#include "bstr/bstr.h"
#include "misc/bstr.h"

struct mp_log;

Expand Down
2 changes: 1 addition & 1 deletion misc/ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions old-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -303,7 +303,6 @@ DIRS = . \
audio/decode \
audio/filter \
audio/out \
bstr \
common \
compat \
input \
Expand Down
2 changes: 1 addition & 1 deletion options/m_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion options/m_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 68ff8a0

Please sign in to comment.