mpeg.h/c cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23652 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
db82be4390
commit
a052102cfb
10 changed files with 30 additions and 54 deletions
|
@ -38,7 +38,6 @@
|
|||
#include "codecs.h"
|
||||
#include "lang.h"
|
||||
#include "keyboard.h"
|
||||
#include "mpeg.h"
|
||||
#include "buffering.h"
|
||||
#include "mp3_playback.h"
|
||||
#include "backlight.h"
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "screens.h"
|
||||
#include "usb_screen.h"
|
||||
#include "talk.h"
|
||||
#include "mpeg.h"
|
||||
#include "audio.h"
|
||||
#include "mp3_playback.h"
|
||||
#include "settings.h"
|
||||
|
|
21
apps/mpeg.c
21
apps/mpeg.c
|
@ -54,6 +54,27 @@
|
|||
#include "lcd.h"
|
||||
#endif
|
||||
|
||||
#define MPEG_SWAP_CHUNKSIZE 0x2000
|
||||
#define MPEG_HIGH_WATER 2 /* We leave 2 bytes empty because otherwise we
|
||||
wouldn't be able to see the difference between
|
||||
an empty buffer and a full one. */
|
||||
#define MPEG_LOW_WATER 0x60000
|
||||
#define MPEG_RECORDING_LOW_WATER 0x80000
|
||||
#define MPEG_LOW_WATER_CHUNKSIZE 0x40000
|
||||
#define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000
|
||||
#if (CONFIG_STORAGE & STORAGE_MMC)
|
||||
#define MPEG_PLAY_PENDING_THRESHOLD 0x20000
|
||||
#define MPEG_PLAY_PENDING_SWAPSIZE 0x20000
|
||||
#else
|
||||
#define MPEG_PLAY_PENDING_THRESHOLD 0x10000
|
||||
#define MPEG_PLAY_PENDING_SWAPSIZE 0x10000
|
||||
#endif
|
||||
|
||||
#define MPEG_MAX_PRERECORD_SECONDS 30
|
||||
|
||||
/* For ID3 info and VBR header */
|
||||
#define MPEG_RESERVED_HEADER_SPACE (4096 + 576)
|
||||
|
||||
#ifndef SIMULATOR
|
||||
extern unsigned long mas_version_code;
|
||||
#endif
|
||||
|
|
42
apps/mpeg.h
42
apps/mpeg.h
|
@ -21,46 +21,8 @@
|
|||
#ifndef _MPEG_H_
|
||||
#define _MPEG_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "metadata.h"
|
||||
|
||||
#define MPEG_SWAP_CHUNKSIZE 0x2000
|
||||
#define MPEG_HIGH_WATER 2 /* We leave 2 bytes empty because otherwise we
|
||||
wouldn't be able to see the difference between
|
||||
an empty buffer and a full one. */
|
||||
#define MPEG_LOW_WATER 0x60000
|
||||
#define MPEG_RECORDING_LOW_WATER 0x80000
|
||||
#define MPEG_LOW_WATER_CHUNKSIZE 0x40000
|
||||
#define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000
|
||||
#if (CONFIG_STORAGE & STORAGE_MMC)
|
||||
#define MPEG_PLAY_PENDING_THRESHOLD 0x20000
|
||||
#define MPEG_PLAY_PENDING_SWAPSIZE 0x20000
|
||||
#else
|
||||
#define MPEG_PLAY_PENDING_THRESHOLD 0x10000
|
||||
#define MPEG_PLAY_PENDING_SWAPSIZE 0x10000
|
||||
#endif
|
||||
|
||||
#define MPEG_MAX_PRERECORD_SECONDS 30
|
||||
|
||||
/* For ID3 info and VBR header */
|
||||
#define MPEG_RESERVED_HEADER_SPACE (4096 + 576)
|
||||
|
||||
#if (CONFIG_CODEC == MAS3587F) || defined(SIMULATOR)
|
||||
|
||||
#if CONFIG_TUNER & S1A0903X01
|
||||
int mpeg_get_mas_pllfreq(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
unsigned long mpeg_get_last_header(void);
|
||||
|
||||
/* in order to keep the recording here, I have to expose this */
|
||||
void rec_tick(void);
|
||||
void playback_tick(void); /* FixMe: get rid of this, use mp3_get_playtime() */
|
||||
|
||||
void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3));
|
||||
void audio_set_track_buffer_event(void (*handler)(struct mp3entry *id3));
|
||||
void audio_set_track_unbuffer_event(void (*handler)(struct mp3entry *id3));
|
||||
void audio_set_cuesheet_callback(bool (*handler)(const char *filename));
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -112,12 +112,4 @@ enum {
|
|||
Q_CODEC_DO_CALLBACK,
|
||||
};
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
void audio_next_dir(void);
|
||||
void audio_prev_dir(void);
|
||||
#else
|
||||
#define audio_next_dir() ({ })
|
||||
#define audio_prev_dir() ({ })
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "button.h"
|
||||
#include "status.h"
|
||||
#include "thread.h"
|
||||
#include "mpeg.h"
|
||||
#include "audio.h"
|
||||
#include "mp3_playback.h"
|
||||
#include "ctype.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "powermgmt.h"
|
||||
#include "lcd.h"
|
||||
#include "led.h"
|
||||
#include "mpeg.h"
|
||||
#include "audio.h"
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "thread.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "usb.h"
|
||||
#include "backlight.h"
|
||||
#include "audio.h"
|
||||
#include "mpeg.h"
|
||||
#include "talk.h"
|
||||
#include "string.h"
|
||||
#include "rtc.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "usb.h"
|
||||
#include "sound.h"
|
||||
#include "dsp.h"
|
||||
#include "mpeg.h"
|
||||
#include "audio.h"
|
||||
#include "power.h"
|
||||
#include "powermgmt.h"
|
||||
|
|
|
@ -77,6 +77,9 @@ void audio_beep(int duration);
|
|||
unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size);
|
||||
/* only implemented in playback.c, but called from firmware */
|
||||
|
||||
void audio_next_dir(void);
|
||||
void audio_prev_dir(void);
|
||||
|
||||
#else /* hwcodec only */
|
||||
struct audio_debug
|
||||
{
|
||||
|
@ -105,6 +108,10 @@ struct audio_debug
|
|||
void audio_get_debugdata(struct audio_debug *dbgdata);
|
||||
/* unsigned int audio_error(void); - unused function */
|
||||
void audio_init_playback(void);
|
||||
|
||||
#define audio_next_dir() ({ })
|
||||
#define audio_prev_dir() ({ })
|
||||
|
||||
#endif
|
||||
|
||||
/* channel modes */
|
||||
|
|
Loading…
Reference in a new issue