Rearange menu of mpegplayer. Add new menu with "settings" and "quit", and remove...
[kugel-rb.git] / apps / mpeg.h
blob3aaa99088141776e480b35548a8c33c6681f1bcc
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef _MPEG_H_
22 #define _MPEG_H_
24 #include <stdbool.h>
25 #include "metadata.h"
27 #define MPEG_SWAP_CHUNKSIZE 0x2000
28 #define MPEG_HIGH_WATER 2 /* We leave 2 bytes empty because otherwise we
29 wouldn't be able to see the difference between
30 an empty buffer and a full one. */
31 #define MPEG_LOW_WATER 0x60000
32 #define MPEG_RECORDING_LOW_WATER 0x80000
33 #define MPEG_LOW_WATER_CHUNKSIZE 0x40000
34 #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000
35 #if (CONFIG_STORAGE & STORAGE_MMC)
36 #define MPEG_PLAY_PENDING_THRESHOLD 0x20000
37 #define MPEG_PLAY_PENDING_SWAPSIZE 0x20000
38 #else
39 #define MPEG_PLAY_PENDING_THRESHOLD 0x10000
40 #define MPEG_PLAY_PENDING_SWAPSIZE 0x10000
41 #endif
43 #define MPEG_MAX_PRERECORD_SECONDS 30
45 /* For ID3 info and VBR header */
46 #define MPEG_RESERVED_HEADER_SPACE (4096 + 576)
48 #if (CONFIG_CODEC == MAS3587F) || defined(SIMULATOR)
50 #if CONFIG_TUNER & S1A0903X01
51 int mpeg_get_mas_pllfreq(void);
52 #endif
54 #endif
55 unsigned long mpeg_get_last_header(void);
57 /* in order to keep the recording here, I have to expose this */
58 void rec_tick(void);
59 void playback_tick(void); /* FixMe: get rid of this, use mp3_get_playtime() */
61 void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3));
62 void audio_set_track_buffer_event(void (*handler)(struct mp3entry *id3));
63 void audio_set_track_unbuffer_event(void (*handler)(struct mp3entry *id3));
64 void audio_set_cuesheet_callback(bool (*handler)(const char *filename));
66 #endif