[Ffmpeg-devel] [PATCH] Make x11grab output mouse warning only once
Panagiotis Issaris
takis.issaris
Wed Jan 31 11:34:16 CET 2007
Hi,
On Wed, 2007-01-31 at 11:04 +0100, Panagiotis Issaris wrote:
> Hi,
>
> On Wed, 2007-01-31 at 04:14 +0100, Michael Niedermayer wrote:
> > Hi
> >
> > On Wed, Jan 31, 2007 at 03:01:29AM +0100, Panagiotis Issaris wrote:
> > > Hi,
> > >
> > > The attached patch makes x11grab output its warning that it
> > > couldn't find the mouse pointer only once. This to prevent
> > > flooding of the terminal when grabbing from a different X screen.
> > >
> > > x11grab.c | 6 +++++-
> > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > >
> > > I'm not sure everybody will like this, because if the "error" reoccurs,
> > > the warning will not. In my case, when grabbing from -f x11grab -vd x11:0.1
> > > while working on :0.0, the continuous outputting of warnings hides all
> > > useful FFmpeg info.
> >
> > rejected,
> As expected...
>
> > the existence of a mouse pointer is not a global property as
> > such the use of a static variable is not appropriate
>
> >
> > if i have 2 x11grab instances i want 2 warnings or none if neither can
> > find the mouse
> ... although for an other reason then I had anticipated :)
>
> Hmm. To be able to do this correct, I would think I'd have to add a
> similar variable to x11_grab_t. Would that be okay?
The attached patch provides it not as a global variable but as a member
of the context, so that the warning can be show once per x11grab
instance. Doesn't look that nice to me though...
Furthermore, this patch is not tested as I do not have a dual-screen
setup here at work.
x11grab.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
With friendly regards,
Takis
--
vCard: http://www.issaris.org/pi.vcf
Public key: http://www.issaris.org/pi.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20070131T113032-ffmpeg-x11grab_warning_once.diff
Type: text/x-patch
Size: 1229 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070131/53909190/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070131/53909190/attachment.pgp>
More information about the ffmpeg-devel
mailing list