summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-02-22 20:36:08 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-02-24 22:31:20 +0100
commitb31328d008985f87f0a7c83c700847cef1a4f08c (patch)
tree56f96a99a9dbeae48ab224c235264c2f3b34a8fc /libavdevice
parentda7e561964ee833678dc24fae0b0265358126d1e (diff)
xcbgrab: Provide better names for the y and x option
Incidentally `-y` also collides with avconv global options. Update x11grab to match and document the option. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/x11grab.c2
-rw-r--r--libavdevice/xcbgrab.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 3aa4294059..bb5d09db64 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -614,6 +614,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 },
{ "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = "vga"}, 0, 0, DEC },
{ "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC },
{ "draw_mouse", "Draw the mouse pointer.", OFFSET(draw_mouse), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, DEC },
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index 57450f24a8..a29cd9b921 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -77,6 +77,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 },