summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r--apps/plugins/mpegplayer/decode.c2
-rw-r--r--apps/plugins/mpegplayer/mpeg2.h10
-rw-r--r--apps/plugins/mpegplayer/mpeg2_internal.h2
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.h13
4 files changed, 12 insertions, 15 deletions
diff --git a/apps/plugins/mpegplayer/decode.c b/apps/plugins/mpegplayer/decode.c
index 9125120..9c8081e 100644
--- a/apps/plugins/mpegplayer/decode.c
+++ b/apps/plugins/mpegplayer/decode.c
@@ -191,7 +191,7 @@ mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec)
state = mpeg2dec->action (mpeg2dec);
- if ((int)state > (int)STATE_INTERNAL_NORETURN)
+ if (state > STATE_INTERNAL_NORETURN)
return state;
}
diff --git a/apps/plugins/mpegplayer/mpeg2.h b/apps/plugins/mpegplayer/mpeg2.h
index 2a63f39..bd14ead 100644
--- a/apps/plugins/mpegplayer/mpeg2.h
+++ b/apps/plugins/mpegplayer/mpeg2.h
@@ -130,6 +130,7 @@ typedef struct mpeg2_decoder_s mpeg2_decoder_t;
typedef enum
{
+ STATE_INTERNAL_NORETURN = -1,
STATE_BUFFER = 0,
STATE_SEQUENCE = 1,
STATE_SEQUENCE_REPEATED = 2,
@@ -199,7 +200,14 @@ typedef enum
MPEG2_ALLOC_CHUNK = 1,
MPEG2_ALLOC_YUV = 2,
MPEG2_ALLOC_CONVERT_ID = 3,
- MPEG2_ALLOC_CONVERTED = 4
+ MPEG2_ALLOC_CONVERTED = 4,
+ MPEG_ALLOC_CODEC_MALLOC,
+ MPEG_ALLOC_CODEC_CALLOC,
+ MPEG_ALLOC_MPEG2_BUFFER,
+ MPEG_ALLOC_AUDIOBUF,
+ MPEG_ALLOC_PCMOUT,
+ MPEG_ALLOC_DISKBUF,
+ __MPEG_ALLOC_FIRST = -256,
} mpeg2_alloc_t;
void * mpeg2_malloc (unsigned size, mpeg2_alloc_t reason);
diff --git a/apps/plugins/mpegplayer/mpeg2_internal.h b/apps/plugins/mpegplayer/mpeg2_internal.h
index cbc3e24..f8c9891 100644
--- a/apps/plugins/mpegplayer/mpeg2_internal.h
+++ b/apps/plugins/mpegplayer/mpeg2_internal.h
@@ -29,8 +29,6 @@
#include "config.h" /* for Rockbox CPU_ #defines */
-#define STATE_INTERNAL_NORETURN ((mpeg2_state_t)-1)
-
/* macroblock modes */
#define MACROBLOCK_INTRA 1
#define MACROBLOCK_PATTERN 2
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h
index 6247a6d..bf223c3 100644
--- a/apps/plugins/mpegplayer/mpegplayer.h
+++ b/apps/plugins/mpegplayer/mpegplayer.h
@@ -23,6 +23,8 @@
#ifndef MPEGPLAYER_H
#define MPEGPLAYER_H
+#include "mpeg2.h"
+
#ifdef HAVE_SCHEDULER_BOOSTCTRL
#define trigger_cpu_boost rb->trigger_cpu_boost
#define cancel_cpu_boost rb->cancel_cpu_boost
@@ -32,17 +34,6 @@
/* Memory allotments for various subsystems */
#define MIN_MEMMARGIN (4*1024)
-enum mpeg_malloc_reason_t
-{
- __MPEG_ALLOC_FIRST = -256,
- MPEG_ALLOC_CODEC_MALLOC,
- MPEG_ALLOC_CODEC_CALLOC,
- MPEG_ALLOC_MPEG2_BUFFER,
- MPEG_ALLOC_AUDIOBUF,
- MPEG_ALLOC_PCMOUT,
- MPEG_ALLOC_DISKBUF,
-};
-
/** Video thread **/
#define LIBMPEG2_ALLOC_SIZE (2*1024*1024)