[vdr] [ANNOUNCE] vdr-xine-0.7.1 plugin

mike lewis lachlanlewis at gmail.com
Fri Mar 4 14:16:42 CET 2005

> I'd be happy to play with the code a little to see If I can do this,
> as i think its very simply an extension of what Reinhard has done.
> But I have no idea how to tell if a post plugin can listen to an input
> event.  I can't see any examples of an post plugin listening to input
> events.
OK,I think I bit off more that I can chew here ;-).  I'mno coder lets
face it.  I've read through the expand plugin and it does not have an
existing event structure.  So I'mnot sure where exactly or what type
of queue to use.

>From xine.h, the options for queue's are:
i) A callback: this is what the vdr plugin uses to send key events to
vdr from xine.
ii) a non-blocking wait. this is what the also sound plugin uses.

OK cool, so I can read code, that was pretty hard ;-) (no really, I
had to get out my '12 easy lessons of C' book from 10 years ago).

So where too from here? Can anyone offer some psudo code ideas on how
it couldwork?

>From what I can see in event.c, "static post_plugin_t
*expand_open_plugin" (what does static mean refer to?) is the function
which makes call draw (function expand_draw):
  port = _x_post_intercept_video_port(&this->post, video_target[0],
&input, &output);
  port->new_port.get_frame     = expand_get_frame;
  port->intercept_ovl          = expand_intercept_ovl;
  port->new_manager->add_event = expand_overlay_add_event;
  port->new_frame->draw        = expand_draw;

So, what I'm thinking, in the spirit of KISS (this is a necessity for
me, because the last S is me *wink*) is to simply:
i) initiate the event_function with zoom setting of 0 (expected range 0-6)
   if event = zoom in, zoom+=1
   if event = zoom out, zoom-=1

ii) create a callback on an event_function.

iii) in expand_draw, modify centre_cut_out_mode code to "levels" of
zoom, 0-6 (where 0 is no zoom and 6 is zoom as is).  Then do zoom as
per zoom level.  If center_cut_out_mode=1 then do zoom 6 where

OK wow, i hope the above make sense.

Comments PLEASE ;-)


More information about the vdr mailing list