Commit 2fbdf30e authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'b31328d0'

* commit 'b31328d0':
  xcbgrab: Provide better names for the y and x option

Conflicts:
	doc/indevs.texi
	libavdevice/x11grab.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 53dd75e9 b31328d0
......@@ -1102,6 +1102,16 @@ It may be necessary to disable it for remote displays (legacy x11grab
only).
@end table
@subsection @var{grab_x} @var{grab_y} AVOption
The syntax is:
@example
-grab_x @var{x_offset} -grab_y @var{y_offset}
@end example
Set the grabing region coordinates. The are expressed as offset from the top left
corner of the X11 window. The default value is 0.
@section decklink
The decklink input device provides capture capabilities for Blackmagic
......
......@@ -657,6 +657,8 @@ static int x11grab_read_close(AVFormatContext *s1)
#define OFFSET(x) offsetof(X11GrabContext, x)
#define DEC AV_OPT_FLAG_DECODING_PARAM
static const AVOption options[] = {
{ "grab_x", "Initial x coordinate.", OFFSET(x_off), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, D },
{ "grab_y", "Initial y coordinate.", OFFSET(y_off), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, D },
{ "draw_mouse", "draw the mouse pointer", OFFSET(draw_mouse), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, DEC },
{ "follow_mouse", "move the grabbing region when the mouse pointer reaches within specified amount of pixels to the edge of region",
......
......@@ -81,6 +81,8 @@ typedef struct XCBGrabContext {
static const AVOption options[] = {
{ "x", "Initial x coordinate.", OFFSET(x), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, D },
{ "y", "Initial y coordinate.", OFFSET(y), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, D },
{ "grab_x", "Initial x coordinate.", OFFSET(x), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, D },
{ "grab_y", "Initial y coordinate.", OFFSET(y), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, D },
{ "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = "vga" }, 0, 0, D },
{ "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "ntsc" }, 0, 0, D },
{ "draw_mouse", "Draw the mouse pointer.", OFFSET(draw_mouse), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, D },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment