summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r--apps/plugins/mpegplayer/Makefile78
-rw-r--r--apps/plugins/mpegplayer/audio_thread.c4
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c2
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c2
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.h2
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.make21
-rw-r--r--apps/plugins/mpegplayer/stream_mgr.c2
-rw-r--r--apps/plugins/mpegplayer/video_thread.c2
8 files changed, 28 insertions, 85 deletions
diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile
deleted file mode 100644
index 7f90cbcc8d..0000000000
--- a/apps/plugins/mpegplayer/Makefile
+++ /dev/null
@@ -1,78 +0,0 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(APPSDIR)/plugins/lib -I$(OUTDIR) -I$(BUILDDIR)
12CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \
13 -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -DMPEGPLAYER
14
15ifdef APPEXTRA
16 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
17endif
18
19LINKFILE := $(OBJDIR)/link.lds
20DEPFILE = $(OBJDIR)/dep-mpegplayer
21
22# This sets up 'SRC' based on the files mentioned in SOURCES
23include $(TOOLSDIR)/makesrc.inc
24
25SOURCES = $(SRC)
26OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
27OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
28DIRS = .
29
30LDS := ../plugin.lds
31OUTPUT = $(OUTDIR)/mpegplayer.rock
32
33all: $(OUTPUT)
34
35.PHONY: libmad-mpegplayer
36
37$(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer
38
39libmad-mpegplayer:
40 $(SILENT)mkdir -p $(OBJDIR)/libmad-mpegplayer
41 $(call PRINTS,MAKE in libmad for mpegplayer)$(MAKE) -C $(APPSDIR)/codecs/libmad MPEGPLAYER=1 OBJDIR=$(OBJDIR)/libmad-mpegplayer OUTPUT=$(BUILDDIR)/libmad-mpegplayer.a
42
43ifndef SIMVER
44$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) $(BUILDDIR)/libmad-mpegplayer.a
45 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -lgcc\
46 $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/mpegplayer.map
47
48$(OUTPUT): $(OBJDIR)/mpegplayer.elf
49 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
50else
51# This is the SDL simulator version
52
53$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
54 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -lmad-mpegplayer -o $@
55ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
56# 'x' must be kept or you'll have "Win32 error 5"
57# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
58# #define ERROR_ACCESS_DENIED 5L
59else
60 @chmod -x $@
61endif
62
63endif # end of sdl-simulator
64
65include $(TOOLSDIR)/make.inc
66
67# MEMORYSIZE should be passed on to this makefile with the chosen memory size
68# given in number of MB
69$(LINKFILE): $(LDS)
70 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
71 $(DEFINES) -E -P - >$@
72
73clean:
74 $(call PRINTS,cleaning mpegplayer)rm -rf $(OBJDIR)/mpegplayer
75 $(SILENT)rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE)
76
77-include $(DEPFILE)
78
diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c
index 351581548f..45226575c9 100644
--- a/apps/plugins/mpegplayer/audio_thread.c
+++ b/apps/plugins/mpegplayer/audio_thread.c
@@ -22,8 +22,8 @@
22 ****************************************************************************/ 22 ****************************************************************************/
23#include "plugin.h" 23#include "plugin.h"
24#include "mpegplayer.h" 24#include "mpegplayer.h"
25#include "../../codecs/libmad/bit.h" 25#include "codecs/libmad/bit.h"
26#include "../../codecs/libmad/mad.h" 26#include "codecs/libmad/mad.h"
27 27
28/** Audio stream and thread **/ 28/** Audio stream and thread **/
29struct pts_queue_slot; 29struct pts_queue_slot;
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 14863c943d..0c66f3ff32 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -1,5 +1,5 @@
1#include "plugin.h" 1#include "plugin.h"
2#include "helper.h" 2#include "lib/helper.h"
3#include "lib/configfile.h" 3#include "lib/configfile.h"
4#include "lib/oldmenuapi.h" 4#include "lib/oldmenuapi.h"
5 5
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 5e34c2b041..dc2dc0d1fd 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -101,7 +101,7 @@
101 *****************************************************************************/ 101 *****************************************************************************/
102#include "plugin.h" 102#include "plugin.h"
103#include "mpegplayer.h" 103#include "mpegplayer.h"
104#include "helper.h" 104#include "lib/helper.h"
105#include "mpeg_settings.h" 105#include "mpeg_settings.h"
106#include "mpeg2.h" 106#include "mpeg2.h"
107#include "video_out.h" 107#include "video_out.h"
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h
index 4ee30b7b00..323f8f34f1 100644
--- a/apps/plugins/mpegplayer/mpegplayer.h
+++ b/apps/plugins/mpegplayer/mpegplayer.h
@@ -85,7 +85,7 @@ enum mpeg_malloc_reason_t
85 85
86#else 86#else
87 87
88#include "grey.h" 88#include "lib/grey.h"
89#define DRAW_BLACK GREY_BLACK 89#define DRAW_BLACK GREY_BLACK
90#define DRAW_DARKGRAY GREY_DARKGRAY 90#define DRAW_DARKGRAY GREY_DARKGRAY
91#define DRAW_LIGHTGRAY GREY_LIGHTGRAY 91#define DRAW_LIGHTGRAY GREY_LIGHTGRAY
diff --git a/apps/plugins/mpegplayer/mpegplayer.make b/apps/plugins/mpegplayer/mpegplayer.make
new file mode 100644
index 0000000000..7242be3715
--- /dev/null
+++ b/apps/plugins/mpegplayer/mpegplayer.make
@@ -0,0 +1,21 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
8#
9
10MPEGSRCDIR := $(APPSDIR)/plugins/mpegplayer
11MPEGBUILDDIR := $(BUILDDIR)/apps/plugins/mpegplayer
12
13ROCKS += $(MPEGBUILDDIR)/mpegplayer.rock
14
15MPEG_SRC := $(call preprocess, $(MPEGSRCDIR)/SOURCES)
16MPEG_OBJ := $(call c2obj, $(MPEG_SRC))
17
18# add source files to OTHER_SRC to get automatic dependencies
19OTHER_SRC += $(MPEG_SRC)
20
21$(MPEGBUILDDIR)/mpegplayer.rock: $(MPEG_OBJ) $(CODECDIR)/libmad-mpeg.a
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c
index ae1ff512ea..424d2fe503 100644
--- a/apps/plugins/mpegplayer/stream_mgr.c
+++ b/apps/plugins/mpegplayer/stream_mgr.c
@@ -22,7 +22,7 @@
22 ****************************************************************************/ 22 ****************************************************************************/
23#include "plugin.h" 23#include "plugin.h"
24#include "mpegplayer.h" 24#include "mpegplayer.h"
25#include "grey.h" 25#include "lib/grey.h"
26#include "mpeg_settings.h" 26#include "mpeg_settings.h"
27 27
28#ifndef HAVE_LCD_COLOR 28#ifndef HAVE_LCD_COLOR
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c
index 91f08a5a66..100904b01b 100644
--- a/apps/plugins/mpegplayer/video_thread.c
+++ b/apps/plugins/mpegplayer/video_thread.c
@@ -23,7 +23,7 @@
23#include "plugin.h" 23#include "plugin.h"
24#include "mpegplayer.h" 24#include "mpegplayer.h"
25#include "mpeg2dec_config.h" 25#include "mpeg2dec_config.h"
26#include "grey.h" 26#include "lib/grey.h"
27#include "video_out.h" 27#include "video_out.h"
28#include "mpeg_settings.h" 28#include "mpeg_settings.h"
29 29