From a5fc3f4df4bec2b6ae1c22fb83cf495f31773122 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 3 Jan 2008 17:14:28 +0000 Subject: Initial WVS for mpegplayer. Adjusts to the user's preferred font and uses FF/RW preferences set for playback. Picked a random color for the base WVS color but it could be configured. Some engine tweaks to accomodate it since certain nescessities are clearer now. Fix a clipped YUV output bug in the SIM. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15991 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/mpegplayer/video_out.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'apps/plugins/mpegplayer/video_out.h') diff --git a/apps/plugins/mpegplayer/video_out.h b/apps/plugins/mpegplayer/video_out.h index 08cd7aa848..ed8c4c5907 100644 --- a/apps/plugins/mpegplayer/video_out.h +++ b/apps/plugins/mpegplayer/video_out.h @@ -24,6 +24,16 @@ #ifndef VIDEO_OUT_H #define VIDEO_OUT_H +#if LCD_WIDTH >= LCD_HEIGHT +#define SCREEN_WIDTH LCD_WIDTH +#define SCREEN_HEIGHT LCD_HEIGHT +#define LCD_LANDSCAPE +#else /* Assume the screen is rotated on portrait LCDs */ +#define SCREEN_WIDTH LCD_HEIGHT +#define SCREEN_HEIGHT LCD_WIDTH +#define LCD_PORTRAIT +#endif + /* Structure to hold width and height values */ struct vo_ext { @@ -43,9 +53,18 @@ bool vo_init (void); bool vo_show (bool show); bool vo_is_visible(void); void vo_setup (const mpeg2_sequence_t * sequence); +void vo_set_clip_rect(const struct vo_rect *rc); void vo_dimensions(struct vo_ext *sz); void vo_cleanup (void); +#if NUM_CORES > 1 || !defined (HAVE_LCD_COLOR) +void vo_lock(void); +void vo_unlock(void); +#else +static inline void vo_lock(void) {} +static inline void vo_unlock(void) {} +#endif + /* Sets all coordinates of a vo_rect to 0 */ void vo_rect_clear(struct vo_rect *rc); /* Returns true if left >= right or top >= bottom */ @@ -68,4 +87,10 @@ bool vo_rect_intersect(struct vo_rect *rc_dst, const struct vo_rect *rc1, const struct vo_rect *rc2); +bool vo_rect_union(struct vo_rect *rc_dst, + const struct vo_rect *rc1, + const struct vo_rect *rc2); + +void vo_rect_offset(struct vo_rect *rc, int dx, int dy); + #endif /* VIDEO_OUT_H */ -- cgit v1.2.3