summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2007-04-04 22:51:57 +0000
committerMarcoen Hirschberg <marcoen@gmail.com>2007-04-04 22:51:57 +0000
commit4d9c0012d42b35ed5e0a8f2280d1ea2ba220b259 (patch)
treeb7342d21dbb0606559945028b53f6f890f5f69e4
parentc6fce6cad3e259d4ea4d92ea9022298204125669 (diff)
downloadrockbox-4d9c0012d42b35ed5e0a8f2280d1ea2ba220b259.tar.gz
rockbox-4d9c0012d42b35ed5e0a8f2280d1ea2ba220b259.zip
just pass the struct to vo_setup instead of multiple arguments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13022 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c7
-rw-r--r--apps/plugins/mpegplayer/video_out.h4
-rw-r--r--apps/plugins/mpegplayer/video_out_rockbox.c23
3 files changed, 13 insertions, 21 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 86145bb4b6..a2e22ed2bd 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -879,12 +879,7 @@ static void video_thread(void)
continue;
case STATE_SEQUENCE:
- vo_setup(info->sequence->display_width,
- info->sequence->display_height,
- info->sequence->width,
- info->sequence->height,
- info->sequence->chroma_width,
- info->sequence->chroma_height);
+ vo_setup(info->sequence);
mpeg2_skip (mpeg2dec, false);
break;
diff --git a/apps/plugins/mpegplayer/video_out.h b/apps/plugins/mpegplayer/video_out.h
index febb47e2ba..0d91eb7b1c 100644
--- a/apps/plugins/mpegplayer/video_out.h
+++ b/apps/plugins/mpegplayer/video_out.h
@@ -22,6 +22,4 @@
*/
void vo_draw_frame (uint8_t * const * buf);
-void vo_setup (unsigned int display_width, unsigned int display_height,
- unsigned int width, unsigned int height,
- unsigned int chroma_width, unsigned int chroma_height);
+void vo_setup (const mpeg2_sequence_t * sequence);
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c
index 627222ded9..e3f8ba0264 100644
--- a/apps/plugins/mpegplayer/video_out_rockbox.c
+++ b/apps/plugins/mpegplayer/video_out_rockbox.c
@@ -213,27 +213,26 @@ void vo_draw_frame (uint8_t * const * buf)
#define SCREEN_HEIGHT LCD_WIDTH
#endif
-void vo_setup(unsigned int display_width, unsigned int display_height, unsigned int width, unsigned int height,
- unsigned int chroma_width, unsigned int chroma_height)
+void vo_setup(const mpeg2_sequence_t * sequence)
{
- image_width=width;
- image_height=height;
- image_chroma_x=image_width/chroma_width;
- image_chroma_y=image_height/chroma_height;
+ image_width=sequence->width;
+ image_height=sequence->height;
+ image_chroma_x=image_width/sequence->chroma_width;
+ image_chroma_y=image_height/sequence->chroma_height;
- if (display_width >= SCREEN_WIDTH) {
+ if (sequence->display_width >= SCREEN_WIDTH) {
output_width = SCREEN_WIDTH;
output_x = 0;
} else {
- output_width = display_width;
- output_x = (SCREEN_WIDTH-display_width)/2;
+ output_width = sequence->display_width;
+ output_x = (SCREEN_WIDTH-sequence->display_width)/2;
}
- if (display_height >= SCREEN_HEIGHT) {
+ if (sequence->display_height >= SCREEN_HEIGHT) {
output_height = SCREEN_HEIGHT;
output_y = 0;
} else {
- output_height = display_height;
- output_y = (SCREEN_HEIGHT-display_height)/2;
+ output_height = sequence->display_height;
+ output_y = (SCREEN_HEIGHT-sequence->display_height)/2;
}
}