diff options
Diffstat (limited to 'apps/plugins/mpegplayer/video_out.h')
-rw-r--r-- | apps/plugins/mpegplayer/video_out.h | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/apps/plugins/mpegplayer/video_out.h b/apps/plugins/mpegplayer/video_out.h index ec3f7c65d3..08cd7aa848 100644 --- a/apps/plugins/mpegplayer/video_out.h +++ b/apps/plugins/mpegplayer/video_out.h | |||
@@ -21,7 +21,51 @@ | |||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef VIDEO_OUT_H | ||
25 | #define VIDEO_OUT_H | ||
26 | |||
27 | /* Structure to hold width and height values */ | ||
28 | struct vo_ext | ||
29 | { | ||
30 | int w, h; | ||
31 | }; | ||
32 | |||
33 | /* Structure that defines a rectangle by its edges */ | ||
34 | struct vo_rect | ||
35 | { | ||
36 | int l, t, r, b; | ||
37 | }; | ||
38 | |||
24 | void vo_draw_frame (uint8_t * const * buf); | 39 | void vo_draw_frame (uint8_t * const * buf); |
25 | void vo_draw_frame_thumb (uint8_t * const * buf); | 40 | bool vo_draw_frame_thumb (uint8_t * const * buf, |
41 | const struct vo_rect *rc); | ||
42 | bool vo_init (void); | ||
43 | bool vo_show (bool show); | ||
44 | bool vo_is_visible(void); | ||
26 | void vo_setup (const mpeg2_sequence_t * sequence); | 45 | void vo_setup (const mpeg2_sequence_t * sequence); |
46 | void vo_dimensions(struct vo_ext *sz); | ||
27 | void vo_cleanup (void); | 47 | void vo_cleanup (void); |
48 | |||
49 | /* Sets all coordinates of a vo_rect to 0 */ | ||
50 | void vo_rect_clear(struct vo_rect *rc); | ||
51 | /* Returns true if left >= right or top >= bottom */ | ||
52 | bool vo_rect_empty(const struct vo_rect *rc); | ||
53 | /* Initializes a vo_rect using upper-left corner and extents */ | ||
54 | void vo_rect_set_ext(struct vo_rect *rc, int x, int y, | ||
55 | int width, int height); | ||
56 | /* Query if two rectangles intersect | ||
57 | * If either are empty returns false */ | ||
58 | bool vo_rects_intersect(const struct vo_rect *rc1, | ||
59 | const struct vo_rect *rc2); | ||
60 | |||
61 | /* Intersect two rectangles | ||
62 | * Resulting rectangle is placed in rc_dst. | ||
63 | * rc_dst is set to empty if they don't intersect. | ||
64 | * Empty source rectangles do not intersect any rectangle. | ||
65 | * rc_dst may be the same structure as rc1 or rc2. | ||
66 | * Returns true if the resulting rectangle is not empty. */ | ||
67 | bool vo_rect_intersect(struct vo_rect *rc_dst, | ||
68 | const struct vo_rect *rc1, | ||
69 | const struct vo_rect *rc2); | ||
70 | |||
71 | #endif /* VIDEO_OUT_H */ | ||