From 04b37b5d7fcd5ffd141054177611d5168629e4ac Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Sat, 11 Jul 2020 11:29:09 +0200 Subject: avdevice/xcbgrab: Add select_region option This patch adds a select_region option to the xcbgrab input device. If set to 1, the user will be prompted to select the grabbing area graphically by clicking and dragging. A rectangle will be drawn to mark the grabbing area. A single click with no dragging will select the whole screen. The option overwrites the video_size, grab_x, and grab_y options if set by the user. For testing, just set the select_region option as follows: ffmpeg -f x11grab -select_region 1 -i :0.0 output.mp4 The drawing happens directly on the root window using standard rubber banding techniques, so it is very efficient and doesn't depend on any X extensions or compositors. Reviewed-by: Andriy Gelman Signed-off-by: Omar Emara --- doc/indevs.texi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/indevs.texi') diff --git a/doc/indevs.texi b/doc/indevs.texi index 3d554bc8d8..62b6ebb3e3 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -1503,6 +1503,14 @@ ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg @subsection Options @table @option +@item select_region +Specify whether to select the grabbing area graphically using the pointer. +A value of @code{1} prompts the user to select the grabbing area graphically +by clicking and dragging. A single click with no dragging will select the +whole screen. A region with zero width or height will also select the whole +screen. This option overwrites the @var{video_size}, @var{grab_x}, and +@var{grab_y} options. Default value is @code{0}. + @item draw_mouse Specify whether to draw the mouse pointer. A value of @code{0} specifies not to draw the pointer. Default value is @code{1}. -- cgit v1.2.3