[asterisk-dev] how to generate periodic wakeup signals for a channel driver ?
Luigi Rizzo
rizzo at icir.org
Tue Sep 18 01:24:07 CDT 2007
On Mon, Sep 17, 2007 at 11:28:22PM +0200, Tzafrir Cohen wrote:
> On Mon, Sep 17, 2007 at 02:03:29PM -0700, Luigi Rizzo wrote:
> > On Mon, Sep 17, 2007 at 03:51:35PM -0500, Tilghman Lesher wrote:
> > > On Monday 17 September 2007 15:03, Luigi Rizzo wrote:
> > > > sorry if the question is trivial...
> > > >
> > > > while adding videosupport to chan_oss/chan_alsa, which you can find at
> > > >
> > > > http://svn.digium.com/view/asterisk/team/rizzo/video_v2/
> > > >
> > > > I just realised that the various video sources that I am using
> > > > (webcam using the 'gspca' driver, or X11 grabber) do not support
> > > > a select()/poll() interface, so i cannot rely on that (and on
> > > > ast_channel_set_fd() ) to wakeup the channel driver when data
> > > > is ready; I need a separate timing source.
> > > >
> > > > What are the options ? Right now I am [ab]using the audio source
> > > > to poll the video source, but audio too is not always available.
> > >
> > > Why not use Zaptel for timing?
> >
> > ENOZAPTEL here :)
> > (sure, i could use the fake device driver but if there is a more
> > generic and portable way i prefer that).
>
> Zaptel is available on FreeBSD.
>
> But then again, what if you have more than one such channel?
if i am not mistaken, either ztdummy or zaptel provide as
many timing channels as you like - basically you open the device,
issue an ioctl to set the timeout, and then select() on the file
descriptor to be woken up.
So multiple channels are not a problem (except for scalability issues
in the ztdummy/zaptel, but this is not an issue here)
cheers
luigi
More information about the asterisk-dev
mailing list