summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/video_out.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-12-29 19:46:35 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-12-29 19:46:35 +0000
commita222f27c4a17ed8f9809cda7861fe5f23d4cc0c1 (patch)
treed393a23d83549f99772bb156e59ffb88725148b6 /apps/plugins/mpegplayer/video_out.h
parent1d0f6b90ff43776e55b4b9f062c9bea3f99aa768 (diff)
downloadrockbox-a222f27c4a17ed8f9809cda7861fe5f23d4cc0c1.tar.gz
rockbox-a222f27c4a17ed8f9809cda7861fe5f23d4cc0c1.zip
mpegplayer: Make playback engine fully seekable and frame-accurate and split into logical parts. Be sure to have all current features work. Actual UI for seeking will be added soon. Recommended GOP size is about 15-30 frames depending on target or seeking can be slow with really long GOPs (nature of MPEG video). More refined encoding recommendations for a particular player should be posted soon.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15977 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/video_out.h')
-rw-r--r--apps/plugins/mpegplayer/video_out.h46
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 */
28struct vo_ext
29{
30 int w, h;
31};
32
33/* Structure that defines a rectangle by its edges */
34struct vo_rect
35{
36 int l, t, r, b;
37};
38
24void vo_draw_frame (uint8_t * const * buf); 39void vo_draw_frame (uint8_t * const * buf);
25void vo_draw_frame_thumb (uint8_t * const * buf); 40bool vo_draw_frame_thumb (uint8_t * const * buf,
41 const struct vo_rect *rc);
42bool vo_init (void);
43bool vo_show (bool show);
44bool vo_is_visible(void);
26void vo_setup (const mpeg2_sequence_t * sequence); 45void vo_setup (const mpeg2_sequence_t * sequence);
46void vo_dimensions(struct vo_ext *sz);
27void vo_cleanup (void); 47void vo_cleanup (void);
48
49/* Sets all coordinates of a vo_rect to 0 */
50void vo_rect_clear(struct vo_rect *rc);
51/* Returns true if left >= right or top >= bottom */
52bool vo_rect_empty(const struct vo_rect *rc);
53/* Initializes a vo_rect using upper-left corner and extents */
54void 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 */
58bool 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. */
67bool 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 */