[FFmpeg-cvslog] xcbgrab: XCB-based screen capture

Nicolas George george at nsup.org
Tue Oct 28 10:05:29 CET 2014

Le sextidi 6 brumaire, an CCXXIII, compn a écrit :
> so its name is changed in the makefile, but not the device name?

It seems that Anton noticed it too on the other side.

> from x11grab.c:
> static const AVOption options[] = {
>     { "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",
>       OFFSET(follow_mouse), AV_OPT_TYPE_INT, {.i64 = 0}, -1, INT_MAX, DEC, "follow_mouse" },
>     { "centered",     "keep the mouse pointer at the center of grabbing region when following",
>       0, AV_OPT_TYPE_CONST, {.i64 = -1}, INT_MIN, INT_MAX, DEC, "follow_mouse" },

I am sorry, I do not understand the point you are trying to make by quoting
that piece of code. Are there options present in FFmpeg's x11grab that are
absent from this new xcbgrab, possibly because they were absent from libav's
x11grab? Or is it just related to your next point?

> is this file based on x11grab.c ? if so , copyrights need to be
> modified.

Depends on what you call "based on". This file is certainly based on
x11grab.c in the sense that it has been written to imitate x11grab.c in
terms of features and working logic, but that does not elicit copyright.
Regarding the code itself, my understanding reading Luca's messages is that
it is a new implementation. Of course, the parts that are far from the
back-end library and straightforward are bound to look similar.

> i've confused myself with x11grab x11grab_xlib and x11grab_xcb , is the
> name of this demuxer correct?

Well, this can be confusing if you did not follow the evolution of X.

X11 is the name of the protocol.
Xlib is the usual name of the most common library used to write client
libX11 is the technical name of Xlib, i.e. the file name and SONAME.
XCB is the usual name of the new client library produced by X.org /

Technically, XCB is slightly lower-level but more efficient than Xlib.

From an user's point of view, whether an application uses XCB or Xlib should
not matter. This is even truer nowadays, because most users have X.org's
implementation of Xlib, which is a wrapper around XCB.

Therefore, I think it is logical to have both devices called "x11grab", i.e.
"grab from an X11 server".

The same goes whenever there are several feature-equivalent implementations
for the same thing: you do not have both httpopenssl:// and httpgnutls://,
you just have https:// using one of the library internally.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20141028/f665f09a/attachment.asc>

More information about the ffmpeg-cvslog mailing list