diff options
Diffstat (limited to 'apps/plugins/mpegplayer/video_thread.c')
-rw-r--r-- | apps/plugins/mpegplayer/video_thread.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c index feee643d12..6508d28d1d 100644 --- a/apps/plugins/mpegplayer/video_thread.c +++ b/apps/plugins/mpegplayer/video_thread.c | |||
@@ -63,15 +63,21 @@ static void draw_fps(struct video_thread_data *td) | |||
63 | uint32_t start; | 63 | uint32_t start; |
64 | uint32_t clock_ticks = stream_get_ticks(&start); | 64 | uint32_t clock_ticks = stream_get_ticks(&start); |
65 | int fps = 0; | 65 | int fps = 0; |
66 | int buf_pct; | ||
66 | char str[80]; | 67 | char str[80]; |
67 | 68 | ||
68 | clock_ticks -= start; | 69 | clock_ticks -= start; |
69 | if (clock_ticks != 0) | 70 | if (clock_ticks != 0) |
70 | fps = muldiv_uint32(CLOCK_RATE*100, td->num_drawn, clock_ticks); | 71 | fps = muldiv_uint32(CLOCK_RATE*100, td->num_drawn, clock_ticks); |
71 | 72 | ||
72 | rb->snprintf(str, sizeof(str), "%d.%02d %d %d ", | 73 | buf_pct = muldiv_uint32(100, pcm_output_used(), PCMOUT_BUFSIZE); |
74 | |||
75 | rb->snprintf(str, sizeof(str), "v:%d.%02d %d %d a:%02d%% %d %d ", | ||
76 | /* Video information */ | ||
73 | fps / 100, fps % 100, td->num_skipped, | 77 | fps / 100, fps % 100, td->num_skipped, |
74 | td->info->display_picture->temporal_reference); | 78 | td->info->display_picture->temporal_reference, |
79 | /* Audio information */ | ||
80 | buf_pct, pcm_underruns, pcm_skipped); | ||
75 | lcd_(putsxy)(0, 0, str); | 81 | lcd_(putsxy)(0, 0, str); |
76 | 82 | ||
77 | vo_lock(); | 83 | vo_lock(); |
@@ -277,7 +283,6 @@ static int sync_decoder(struct video_thread_data *td, | |||
277 | while (1) | 283 | while (1) |
278 | { | 284 | { |
279 | mpeg2_state_t mp2state = mpeg2_parse(td->mpeg2dec); | 285 | mpeg2_state_t mp2state = mpeg2_parse(td->mpeg2dec); |
280 | rb->yield(); | ||
281 | 286 | ||
282 | switch (mp2state) | 287 | switch (mp2state) |
283 | { | 288 | { |
@@ -697,7 +702,6 @@ static void video_thread(void) | |||
697 | 702 | ||
698 | picture_decode: | 703 | picture_decode: |
699 | mp2state = mpeg2_parse (td.mpeg2dec); | 704 | mp2state = mpeg2_parse (td.mpeg2dec); |
700 | rb->yield(); | ||
701 | 705 | ||
702 | switch (mp2state) | 706 | switch (mp2state) |
703 | { | 707 | { |