summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/pcm_output.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-12-29 19:46:35 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-12-29 19:46:35 +0000
commita222f27c4a17ed8f9809cda7861fe5f23d4cc0c1 (patch)
treed393a23d83549f99772bb156e59ffb88725148b6 /apps/plugins/mpegplayer/pcm_output.h
parent1d0f6b90ff43776e55b4b9f062c9bea3f99aa768 (diff)
downloadrockbox-a222f27c4a17ed8f9809cda7861fe5f23d4cc0c1.tar.gz
rockbox-a222f27c4a17ed8f9809cda7861fe5f23d4cc0c1.zip
mpegplayer: Make playback engine fully seekable and frame-accurate and split into logical parts. Be sure to have all current features work. Actual UI for seeking will be added soon. Recommended GOP size is about 15-30 frames depending on target or seeking can be slow with really long GOPs (nature of MPEG video). More refined encoding recommendations for a particular player should be posted soon.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15977 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/pcm_output.h')
-rw-r--r--apps/plugins/mpegplayer/pcm_output.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/pcm_output.h b/apps/plugins/mpegplayer/pcm_output.h
new file mode 100644
index 0000000000..8a230b87a5
--- /dev/null
+++ b/apps/plugins/mpegplayer/pcm_output.h
@@ -0,0 +1,46 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * PCM output buffer declarations
11 *
12 * Copyright (c) 2007 Michael Sevakis
13 *
14 * All files in this archive are subject to the GNU General Public License.
15 * See the file COPYING in the source tree root for full license agreement.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef PCM_OUTPUT_H
22#define PCM_OUTPUT_H
23
24struct pcm_frame_header /* Header added to pcm data every time a decoded
25 audio frame is sent out */
26{
27 uint32_t size; /* size of this frame - including header */
28 uint32_t time; /* timestamp for this frame in audio ticks */
29 unsigned char data[]; /* open array of audio data */
30} ALIGNED_ATTR(4);
31
32bool pcm_output_init(void);
33void pcm_output_exit(void);
34void pcm_output_flush(void);
35void pcm_output_set_clock(uint32_t time);
36uint32_t pcm_output_get_clock(void);
37uint32_t pcm_output_get_ticks(uint32_t *start);
38void pcm_output_play_pause(bool play);
39void pcm_output_stop(void);
40void pcm_output_drain(void);
41struct pcm_frame_header * pcm_output_get_buffer(void);
42void pcm_output_add_data(void);
43ssize_t pcm_output_used(void);
44ssize_t pcm_output_free(void);
45
46#endif /* PCM_OUTPUT_H */