The code uses XFixes to retrieve the cursor coordinates, but XFixes
gives no information of what screen the pointer is on; this results in
always drawing the cursor on the captured screen even if the mouse
pointer was on another screen.
For example, when capturing from screen 1 (i.e. -f x11grab -i ":0.1")
the cursor was being drawn in the captured image even when the mouse
pointer was actually on screen 0, which is wrong and visually confusing.
Use XQueryPointer to check that the pointer is actually on the screen
which is being captured.
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This specifies better the meaning of the variable, and is also in
preparation of a subsequent change which will introduce a temporary
Window variable for which "w" is an good name.
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Additionally, make sure a buffer gets enqueued again (even in error paths) after
it has been succesfully dequeued.
Tested-by: Dmitry Volyntsev <xeioexception@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
This file with the incorrect name was added after the name was fixed in all other files.
This is thus fixing a mistake
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
PulseAudio expilitly requires name of the source.
This patch makes it use default source when not provided.
It simplifies programistic use.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
As of September 14 2012, v4l_enumstd() will return ENODATA
when a device's std field is set to 0. That is, the device
does not have a standard format. In order to properly
handle this case, v4l2_set_parameters should catch the
ENODATA code and break instead of failing.
Below is the v4l2-core commit describing this change.
>>commit a5338190efc7cfa8c99a6856342a77d21c9a05cf
>>Author: Hans Verkuil <hans.verkuil@cisco.com>
>>Date: Fri Sep 14 06:45:43 2012 -0300
>>
>> [media] v4l2-core: tvnorms may be 0 for a given input, handle that case
>>
>> Currently the core code looks at tvnorms to see whether ENUMSTD
>> or G_PARM should be enabled. This is not a good check for drivers
>> that support the STD API on one input and the DV Timings API on another.
>> In that case tvnorms may be 0.
>> Instead check whether s_std is present (for ENUMSTD) or whether g_std or
>> current_norm is present for g_parm.
>> Also, in the enumstd core function return ENODATA if tvnorms is 0,
>> because in that case the current input does not support the STD API
>> and ENUMSTD should return ENODATA for that.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Used to expose ff_raw_pix_fmt_tags[] to other libav* libraries
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The were wrongly being exported and used by libavdevice
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Example of non-mappable file is /dev/stdin. Previously passing it as
graph_file value returned error.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Also add a note about SNDCTL_DSP_GETFMTS which may fail even if OSS is
available.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The X11 servers by VNC, at 32-bits depths, has the following masks:
R:0x000007ff G:0x003ff800 B:0xffc00000
This is not compatible with AV_PIX_FMT_0RGB32, and the result
is success with completely wrong colors.
MSVC does not allow passing file pointers between libs
This API can thus not work with MSVC and as it was very recently added
and its it was in no release its removial should not cause any problems
A better API will be implemented, but its not finished yet, this revert is
to avoid potentially blocking the release
Found-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>