1
0
Fork 0
forked from len0rd/rockbox

mpegplayer: Use the core DSP to process audio. Removes the sample rate restriction on audio and any mpeg audio samplerate may be used. Use the global sound settings for audio output with the option to force any one of the processing stages off. All are forced off by default. I didn't personally care to fully duplicate the Sound Settings menu which would have been needed since using the core one would affect settings globally and exactly the same configuration probably isn't desired since the CPU load for video playback is much greater. Rebalance the threading to compensate with some expense to buffering speed.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16194 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2008-02-01 02:25:15 +00:00
parent 7e402d8202
commit f90cbcb652
10 changed files with 298 additions and 76 deletions

View file

@ -63,15 +63,21 @@ static void draw_fps(struct video_thread_data *td)
uint32_t start;
uint32_t clock_ticks = stream_get_ticks(&start);
int fps = 0;
int buf_pct;
char str[80];
clock_ticks -= start;
if (clock_ticks != 0)
fps = muldiv_uint32(CLOCK_RATE*100, td->num_drawn, clock_ticks);
rb->snprintf(str, sizeof(str), "%d.%02d %d %d ",
buf_pct = muldiv_uint32(100, pcm_output_used(), PCMOUT_BUFSIZE);
rb->snprintf(str, sizeof(str), "v:%d.%02d %d %d a:%02d%% %d %d ",
/* Video information */
fps / 100, fps % 100, td->num_skipped,
td->info->display_picture->temporal_reference);
td->info->display_picture->temporal_reference,
/* Audio information */
buf_pct, pcm_underruns, pcm_skipped);
lcd_(putsxy)(0, 0, str);
vo_lock();
@ -277,7 +283,6 @@ static int sync_decoder(struct video_thread_data *td,
while (1)
{
mpeg2_state_t mp2state = mpeg2_parse(td->mpeg2dec);
rb->yield();
switch (mp2state)
{
@ -697,7 +702,6 @@ static void video_thread(void)
picture_decode:
mp2state = mpeg2_parse (td.mpeg2dec);
rb->yield();
switch (mp2state)
{