diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2011-01-03 16:41:19 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2011-01-03 16:41:19 +0000 |
| commit | b664f62e36b5f0ac296567e423816dab3811075d (patch) | |
| tree | 7ca49c59d7332d7c1e51139efa12466b6730e511 /apps/plugins/mpegplayer/stream_mgr.c | |
| parent | f8fde296a63dd06efef5cf71c9fdb2c26c5a3fd6 (diff) | |
| download | rockbox-b664f62e36b5f0ac296567e423816dab3811075d.zip rockbox-b664f62e36b5f0ac296567e423816dab3811075d.tar.gz rockbox-b664f62e36b5f0ac296567e423816dab3811075d.tar.bz2 rockbox-b664f62e36b5f0ac296567e423816dab3811075d.tar.xz | |
MPEGPlayer graphics mutation: Implement a more visible FPS display and remove the debugging info from it. Tweak thumbnailing and printing of unavailable frames.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28960 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/stream_mgr.c')
| -rw-r--r-- | apps/plugins/mpegplayer/stream_mgr.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index cee384f..6607402 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c @@ -695,8 +695,8 @@ static intptr_t send_video_msg(long id, intptr_t data) if (disk_buf_status() != STREAM_STOPPED) break; /* Prepare image if not playing */ - if (!parser_prepare_image(str_parser.last_seek_time)) - return false; /* Preparation failed */ + /* Ignore return and try video thread anyway */ + parser_prepare_image(str_parser.last_seek_time); /* Image ready - pass message to video thread */ break; @@ -766,6 +766,25 @@ void stream_vo_set_clip(const struct vo_rect *rc) stream_mgr_unlock(); } +bool stream_vo_get_clip(struct vo_rect *rc) +{ + bool retval; + + if (!rc) + return false; + + stream_mgr_lock(); + + retval = send_video_msg(VIDEO_GET_CLIP_RECT, + (intptr_t)&stream_mgr.parms.rc); + + *rc = stream_mgr.parms.rc; + + stream_mgr_unlock(); + + return retval; +} + #ifndef HAVE_LCD_COLOR /* Show/hide the gray video overlay (independently of vo visibility). */ void stream_gray_show(bool show) @@ -810,6 +829,23 @@ bool stream_draw_frame(bool no_prepare) return retval; } +bool stream_set_callback(long id, void *fn) +{ + bool retval = false; + + stream_mgr_lock(); + + switch (id) + { + case VIDEO_SET_POST_FRAME_CALLBACK: + retval = send_video_msg(id, (intptr_t)fn); + } + + stream_mgr_unlock(); + + return retval; +} + /* Return the time playback should resume if interrupted */ uint32_t stream_get_resume_time(void) { |