summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Holst <holstsn@users.sourceforge.net>2003-03-19 01:11:12 +0000
committerStefan Holst <holstsn@users.sourceforge.net>2003-03-19 01:11:12 +0000
commit8b46aaa2a0460af4666c05089425d31dc516572c (patch)
tree9c62b36353178bb24af2ce130e273a13ccf4684f
parentfb8ae277e77d84966a4dc81ff65a4b2c5cd95739 (diff)
downloadxine-lib-8b46aaa2a0460af4666c05089425d31dc516572c.tar.gz
xine-lib-8b46aaa2a0460af4666c05089425d31dc516572c.tar.bz2
fb_visual_t for fb video driver, enable frame_output_cb in that driver.
CVS patchset: 4448 CVS date: 2003/03/19 01:11:12
-rw-r--r--include/xine.h.in22
-rw-r--r--src/video_out/video_out_fb.c20
2 files changed, 39 insertions, 3 deletions
diff --git a/include/xine.h.in b/include/xine.h.in
index b11668626..b82108ed3 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.h.in,v 1.66 2003/03/16 21:40:27 f1rmb Exp $
+ * $Id: xine.h.in,v 1.67 2003/03/19 01:11:12 holstsn Exp $
*
* public xine-lib (libxine) interface and documentation
*
@@ -948,6 +948,26 @@ typedef struct {
} x11_visual_t;
/*
+ * this is the visual data struct any fb gui
+ * may supply to the xine_open_video_driver call
+ * ("data" parameter) to get frame_output_cd calls
+ */
+
+typedef struct {
+
+ void (*frame_output_cb) (void *user_data,
+ int video_width, int video_height,
+ double video_pixel_aspect,
+ int *dest_x, int *dest_y,
+ int *dest_width, int *dest_height,
+ double *dest_pixel_aspect,
+ int *win_x, int *win_y);
+
+ void *user_data;
+
+} fb_visual_t;
+
+/*
* "type" constants for xine_gui_send_vo_data (...)
*/
diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c
index 819ef9258..dbea7b8b6 100644
--- a/src/video_out/video_out_fb.c
+++ b/src/video_out/video_out_fb.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_fb.c,v 1.23 2003/02/02 12:44:03 esnel Exp $
+ * $Id: video_out_fb.c,v 1.24 2003/03/19 01:11:13 holstsn Exp $
*
* video_out_fb.c, frame buffer xine driver by Miguel Freitas
*
@@ -573,7 +573,13 @@ static void fb_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen)
memset(frame->video_mem, 0,
this->fb_bytes_per_line * this->sc.gui_height);
}
-
+
+ if (this->sc.frame_output_cb) {
+ this->sc.delivered_height = frame->sc.delivered_height;
+ this->sc.delivered_width = frame->sc.delivered_width;
+ vo_scale_redraw_needed( &this->sc );
+ }
+
if(this->use_zero_copy)
{
if(this->old_frame)
@@ -925,6 +931,11 @@ static vo_driver_t *fb_open_plugin(video_driver_class_t *class_gen,
config_values_t *config;
fb_driver_t *this;
fb_class_t *class;
+ fb_visual_t *visual = NULL;
+
+ if (visual_gen) {
+ visual = (fb_visual_t *) visual_gen;
+ }
class = (fb_class_t *)class_gen;
config = class->config;
@@ -960,6 +971,11 @@ static vo_driver_t *fb_open_plugin(video_driver_class_t *class_gen,
this->sc.gui_height = this->fb_var.yres;
this->sc.user_ratio = ASPECT_AUTO;
+ if (visual) {
+ this->sc.frame_output_cb = visual->frame_output_cb;
+ this->sc.user_data = visual->user_data;
+ }
+
this->sc.scaling_disabled =
config->register_bool(config, "video.disable_scaling", 0,
_("disable all video scaling (faster!)"),