Skip to content

Commit

Permalink
Move files part of the playback core to player sub-directory
Browse files Browse the repository at this point in the history
All these files access mp_core.h and MPContext, and form the actual
player application. They should be all in one place, and separate
from the other sources that are mere utility helpers.

Preparation for splitting mplayer.c into multiple smaller parts.
  • Loading branch information
wm4 committed Oct 30, 2013
1 parent 884b460 commit a84258d
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/demux/ebml_defs.c
/demux/ebml_types.h
/sub/osd_font.h
/mpvcore/lua/*.inc
/mpvcore/player/lua/*.inc
/DOCS/man/*/mpv.1
/DOCS/man/*/mpv.aux
/DOCS/man/*/mpv.log
Expand Down
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ SOURCES-$(WAYLAND) += video/out/vo_wayland.c video/out/wayland_comm
SOURCES-$(VF_LAVFI) += video/filter/vf_lavfi.c
SOURCES-$(AF_LAVFI) += audio/filter/af_lavfi.c

SOURCES-$(LUA) += mpvcore/mp_lua.c
SOURCES-$(LUA) += mpvcore/player/mp_lua.c

ifeq ($(HAVE_AVUTIL_REFCOUNTING),no)
SOURCES-yes += video/decode/lavc_dr1.c
Expand Down Expand Up @@ -194,27 +194,27 @@ SOURCES = audio/audio.c \
mpvcore/bstr.c \
mpvcore/charset_conv.c \
mpvcore/codecs.c \
mpvcore/command.c \
mpvcore/cpudetect.c \
mpvcore/m_config.c \
mpvcore/m_option.c \
mpvcore/m_property.c \
mpvcore/mp_common.c \
mpvcore/mp_msg.c \
mpvcore/mp_ring.c \
mpvcore/mplayer.c \
mpvcore/options.c \
mpvcore/parser-cfg.c \
mpvcore/parser-mpcmd.c \
mpvcore/path.c \
mpvcore/playlist.c \
mpvcore/playlist_parser.c \
mpvcore/screenshot.c \
mpvcore/version.c \
mpvcore/input/input.c \
mpvcore/timeline/tl_edl.c \
mpvcore/timeline/tl_matroska.c \
mpvcore/timeline/tl_cue.c \
mpvcore/player/command.c \
mpvcore/player/mplayer.c \
mpvcore/player/screenshot.c \
mpvcore/player/timeline/tl_edl.c \
mpvcore/player/timeline/tl_matroska.c \
mpvcore/player/timeline/tl_cue.c \
osdep/io.c \
osdep/numcores.c \
osdep/timer.c \
Expand Down Expand Up @@ -408,16 +408,16 @@ sub/osd_libass.c: sub/osd_font.h
sub/osd_font.h: TOOLS/file2string.pl sub/osd_font.otf
./$^ >$@

mpvcore/mp_lua.c: mpvcore/lua/defaults.inc
mpvcore/lua/defaults.inc: TOOLS/file2string.pl mpvcore/lua/defaults.lua
mpvcore/player/mp_lua.c: mpvcore/player/lua/defaults.inc
mpvcore/player/lua/defaults.inc: TOOLS/file2string.pl mpvcore/player/lua/defaults.lua
./$^ >$@

mpvcore/mp_lua.c: mpvcore/lua/assdraw.inc
mpvcore/lua/assdraw.inc: TOOLS/file2string.pl mpvcore/lua/assdraw.lua
mpvcore/player/mp_lua.c: mpvcore/player/lua/assdraw.inc
mpvcore/player/lua/assdraw.inc: TOOLS/file2string.pl mpvcore/player/lua/assdraw.lua
./$^ >$@

mpvcore/mp_lua.c: mpvcore/lua/osc.inc
mpvcore/lua/osc.inc: TOOLS/file2string.pl mpvcore/lua/osc.lua
mpvcore/player/mp_lua.c: mpvcore/player/lua/osc.inc
mpvcore/player/lua/osc.inc: TOOLS/file2string.pl mpvcore/player/lua/osc.lua
./$^ >$@

# ./configure must be rerun if it changed
Expand Down Expand Up @@ -518,9 +518,9 @@ clean:
-$(RM) video/out/gl_video_shaders.h
-$(RM) video/out/x11_icon.inc
-$(RM) sub/osd_font.h
-$(RM) mpvcore/lua/defaults.inc
-$(RM) mpvcore/lua/assdraw.inc
-$(RM) mpvcore/lua/osc.inc
-$(RM) mpvcore/player/lua/defaults.inc
-$(RM) mpvcore/player/lua/assdraw.inc
-$(RM) mpvcore/player/lua/osc.inc

distclean: clean
-$(RM) config.log config.mak config.h TAGS tags
Expand Down
2 changes: 1 addition & 1 deletion mpvcore/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "audio/mixer.h"
#include "audio/filter/af.h"
#include "audio/decode/dec_audio.h"
#include "mp_core.h"
#include "player/mp_core.h"
#include "osdep/priority.h"

int network_bandwidth=0;
Expand Down
18 changes: 8 additions & 10 deletions mpvcore/command.c → mpvcore/player/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,26 @@
#include "config.h"
#include "talloc.h"
#include "command.h"
#include "input/input.h"
#include "mpvcore/mp_common.h"
#include "mpvcore/input/input.h"
#include "stream/stream.h"
#include "demux/demux.h"
#include "demux/stheader.h"
#include "resolve.h"
#include "playlist.h"
#include "playlist_parser.h"
#include "mpvcore/resolve.h"
#include "mpvcore/playlist.h"
#include "mpvcore/playlist_parser.h"
#include "sub/sub.h"
#include "sub/dec_sub.h"
#include "mpvcore/m_option.h"
#include "m_property.h"
#include "m_config.h"
#include "mpvcore/m_property.h"
#include "mpvcore/m_config.h"
#include "video/filter/vf.h"
#include "video/decode/vd.h"
#include "mp_osd.h"
#include "video/out/vo.h"
#include "video/csputils.h"
#include "playlist.h"
#include "audio/mixer.h"
#include "audio/out/ao.h"
#include "mpvcore/mp_common.h"
#include "audio/filter/af.h"
#include "video/decode/dec_video.h"
#include "audio/decode/dec_audio.h"
Expand All @@ -66,8 +65,7 @@
#include <sys/mman.h>
#endif

#include "mpvcore/mp_core.h"

#include "mp_core.h"
#include "mp_lua.h"

struct command_ctx {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions mpvcore/mp_lua.c → mpvcore/player/mp_lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

#include "talloc.h"

#include "mp_common.h"
#include "mp_lua.h"
#include "mpvcore/mp_common.h"
#include "mpvcore/m_property.h"
#include "mpvcore/mp_msg.h"
#include "mpvcore/m_option.h"
#include "mpvcore/input/input.h"
#include "mpvcore/path.h"
#include "mpvcore/bstr.h"
#include "osdep/timer.h"
#include "sub/sub.h"
#include "mp_core.h"
#include "mp_msg.h"
#include "m_property.h"
#include "m_option.h"
#include "command.h"
#include "input/input.h"
#include "sub/sub.h"
#include "osdep/timer.h"
#include "path.h"
#include "bstr.h"
#include "mp_lua.h"

// List of builtin modules and their contents as strings.
// All these are generated from mpvcore/lua/*.lua
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions mpvcore/mplayer.c → mpvcore/player/mplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

#include "mpvcore/mpv_global.h"
#include "mpvcore/mp_msg.h"
#include "av_log.h"
#include "mpvcore/av_log.h"


#include "mpvcore/m_option.h"
Expand All @@ -77,9 +77,9 @@
#include "sub/dec_sub.h"
#include "sub/sd.h"

#include "mpvcore/mp_osd.h"
#include "mp_osd.h"
#include "video/out/vo.h"
#include "mpvcore/screenshot.h"
#include "screenshot.h"

#include "sub/sub.h"
#include "mpvcore/cpudetect.h"
Expand Down Expand Up @@ -146,7 +146,7 @@

#include "audio/mixer.h"

#include "mpvcore/mp_core.h"
#include "mp_core.h"
#include "mpvcore/options.h"

#include "mp_lua.h"
Expand Down Expand Up @@ -198,7 +198,7 @@ static const char av_desync_help_text[] = _(
// ---

#include "mpvcore/mp_common.h"
#include "mpvcore/command.h"
#include "command.h"

static void reset_subtitles(struct MPContext *mpctx);
static void reinit_subs(struct MPContext *mpctx);
Expand Down
8 changes: 4 additions & 4 deletions mpvcore/screenshot.c → mpvcore/player/screenshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
#include "osdep/io.h"

#include "talloc.h"
#include "mpvcore/screenshot.h"
#include "mpvcore/mp_core.h"
#include "mpvcore/command.h"
#include "screenshot.h"
#include "mp_core.h"
#include "command.h"
#include "mpvcore/bstr.h"
#include "mpvcore/mp_msg.h"
#include "mpvcore/mp_osd.h"
#include "mp_osd.h"
#include "mpvcore/path.h"
#include "video/mp_image.h"
#include "video/decode/dec_video.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "talloc.h"

#include "mpvcore/mp_core.h"
#include "mpvcore/player/mp_core.h"
#include "mpvcore/mp_msg.h"
#include "demux/demux.h"
#include "mpvcore/path.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "talloc.h"

#include "mpvcore/mp_core.h"
#include "mpvcore/player/mp_core.h"
#include "mpvcore/mp_msg.h"
#include "demux/demux.h"
#include "mpvcore/path.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "talloc.h"

#include "mpvcore/mp_core.h"
#include "mpvcore/player/mp_core.h"
#include "mpvcore/mp_msg.h"
#include "demux/demux.h"
#include "mpvcore/path.h"
Expand Down

0 comments on commit a84258d

Please sign in to comment.