summaryrefslogtreecommitdiff
path: root/libavdevice/x11grab.c
Commit message (Collapse)AuthorAge
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avdevice: Fix max value of AV_OPT_TYPE_VIDEO_RATEMichael Niedermayer2016-06-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | x11grab: fixed next frame capture time calculationTrevor \\\\ Higgins2016-02-05
| | | | | | | | | | | | | | The next frame time could slip, causing the frame rate to drop until frames were dropped. Now will capture at the next correct moment instead. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avdevice/x11grab: use av_clip() instead of nested min & maxClément Bœsch2015-06-06
| | | | | | | | | | Note: [xy]_off and screen_[wh] variables are int, as well as X11GrabContext.{width,height,x_off,y_off}.
* | Merge commit 'c201069fac9a76e6604f9d84d76a172434d62200'Michael Niedermayer2015-04-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c201069fac9a76e6604f9d84d76a172434d62200': avdevice: Add missing header for NULL_IF_CONFIG_SMALL Conflicts: libavdevice/alsa-audio-dec.c libavdevice/alsa-audio-enc.c libavdevice/pulse_audio_dec.c libavdevice/sndio_enc.c libavdevice/vfwcap.c libavdevice/x11grab.c libavdevice/xcbgrab.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avdevice: Add missing header for NULL_IF_CONFIG_SMALLDiego Biurrun2015-04-09
| | | | | | | | Also reshuffle headers into canonical order where appropriate.
* | Merge commit '802987f8c7033ec8b82b35438d3822cf7f761166'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | | | | | | | * commit '802987f8c7033ec8b82b35438d3822cf7f761166': x11grab: Unbreak building Conflicts: libavdevice/x11grab.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Unbreak buildingChristian Hujer2015-02-28
| | | | | | | | | | | | | | The correct macro is DEC not D. Broken in b31328d008985f87f0a7c83c700847cef1a4f08c Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'b31328d008985f87f0a7c83c700847cef1a4f08c'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | | | | | | | | | * commit 'b31328d008985f87f0a7c83c700847cef1a4f08c': xcbgrab: Provide better names for the y and x option Conflicts: doc/indevs.texi libavdevice/x11grab.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * xcbgrab: Provide better names for the y and x optionLuca Barbato2015-02-24
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '2a5ac99e6e06078713f684fee2466c91f677b303'Michael Niedermayer2014-10-05
|\| | | | | | | | | | | | | | | | | | | | | * commit '2a5ac99e6e06078713f684fee2466c91f677b303': x11grab: Check the XQueryPointer return value Conflicts: libavdevice/x11grab.c See: 69c34a6ac986e31b5286a1d566617ec25b93e6a7 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Check the XQueryPointer return valueAntonio Ospite2014-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The paint_mouse_pointer() code uses XFixes to retrieve the cursor coordinates, but XFixes gives no information about which 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. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489'Michael Niedermayer2014-10-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489': x11grab: Check XFixesGetCursorImage return value Conflicts: libavdevice/x11grab.c See: a65c0a3fe822386be30fd3371af9f0d008b02874 The warning with adjusted text is kept from a65c0a3fe822386be30fd3371af9f0d008b02874 but drawing the cursor is not disabled in case XFixesGetCursorImage() fails Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Check XFixesGetCursorImage return valueLuca Barbato2014-10-04
| | | | | | | | | | | | | | It could return NULL if the cursor is outside the screen, the connection timed out or the system is out of memory. CC: libav-stable@libav.org
* | Merge commit '89fa2b5616274194d90bde0aeebf6adbd1245193'Michael Niedermayer2014-10-05
|\| | | | | | | | | | | | | | | * commit '89fa2b5616274194d90bde0aeebf6adbd1245193': x11grab: Check for XFixes availability at runtime See: a65c0a3fe822386be30fd3371af9f0d008b02874 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Check for XFixes availability at runtimeLuca Barbato2014-10-04
| |
* | avdevice/x11grab: fix cursor drawing in multi-screen setupAntonio Ospite2014-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | avdevice/x11grab: rename the "w" Window to "root" in paint_mouse_pointerAntonio Ospite2014-09-09
| | | | | | | | | | | | | | | | | | 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>
* | avdevice/x11grab: fix error handling in pixel formatsMichael Niedermayer2014-09-04
| | | | | | | | | | Reviewed-by: Benoit Fouet <benoit.fouet@free.fr> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '65e78a2e4b111627c0ebdf2c9baec95e5e21560d'Michael Niedermayer2014-09-03
|\| | | | | | | | | | | | | | | | | | | * commit '65e78a2e4b111627c0ebdf2c9baec95e5e21560d': x11grab: Refactor pixel format parsing Conflicts: libavdevice/x11grab.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Refactor pixel format parsingLuca Barbato2014-09-03
| |
* | Merge commit 'bb3ead7e54fec205c595cfb8b1d8900d50d3d1cc'Michael Niedermayer2014-09-03
|\| | | | | | | | | | | | | * commit 'bb3ead7e54fec205c595cfb8b1d8900d50d3d1cc': x11grab: Fallback to normal XImage if SHM is not supported Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Fallback to normal XImage if SHM is not supportedLuca Barbato2014-09-03
| |
* | Merge commit '58396e806c65fe0eb00e6ccf1980f810cdceed05'Michael Niedermayer2014-08-28
|\| | | | | | | | | | | | | | | | | | | * commit '58396e806c65fe0eb00e6ccf1980f810cdceed05': x11grab: Use a typedef for the context, as most other code does Conflicts: libavdevice/x11grab.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Use a typedef for the context, as most other code doesLuca Barbato2014-08-28
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '7bb505a33ca131906b2ceb2f298e104c862740ea'Michael Niedermayer2014-08-28
|\| | | | | | | | | | | | | | | | | | | | | * commit '7bb505a33ca131906b2ceb2f298e104c862740ea': x11grab: Drop a spurious space in the extension reporting message Conflicts: libavdevice/x11grab.c See: 9af209712099699d717596f55b08b3bac8b6b563 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Drop a spurious space in the extension reporting messageLuca Barbato2014-08-28
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '20e82b41fcad23ebbb18d89948aebfcc53921198'Michael Niedermayer2014-08-28
|\| | | | | | | | | | | | | | | | | | | * commit '20e82b41fcad23ebbb18d89948aebfcc53921198': x11grab: Small near-cosmetic refactorings Conflicts: libavdevice/x11grab.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: Small near-cosmetic refactoringsLuca Barbato2014-08-28
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'f07a4290a0e8f31796e348edd3ed06b8d15132d8'Michael Niedermayer2014-08-28
|\| | | | | | | | | | | | | | | | | | | * commit 'f07a4290a0e8f31796e348edd3ed06b8d15132d8': x11grab: K&R formatting cosmetics Conflicts: libavdevice/x11grab.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x11grab: K&R formatting cosmeticsLuca Barbato2014-08-28
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | lavd/x11grab: reindent after last commit.Nicolas George2014-07-17
| |
* | lavd/x11grab: add an option to disable MIT-SHM.Nicolas George2014-07-17
| | | | | | | | | | | | With remote displays supporting the MIT-SHM extension, the extension is detected and used, but attaching fails asynchronously.
* | lavd/x11grab: check 32-bits color masks.Nicolas George2014-07-17
| | | | | | | | | | | | | | 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.
* | lavd/x11grab: change error code for unsupported visuals.Nicolas George2014-07-17
| |
* | lavd/x11grab: disable drawing mouse without XFixes.Nicolas George2014-07-17
| | | | | | | | | | | | Fix a segfault if the XFixes extension is not available on the X11 server. Can be reproduced using the VNC server.
* | lavd: add categories to device implementationsLukasz Marek2014-03-03
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* | lavd/x11grab: Support AV_PIX_FMT_PAL8.Carl Eugen Hoyos2013-10-24
| | | | | | | | Fixes ticket #3068.
* | avdevice/x11grab: use AV_OPT_TYPE_VIDEO_RATEPaul B Mahol2013-07-26
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avdevice/x11grab: allocate just one CursorMichael Niedermayer2013-06-21
| | | | | | | | | | | | | | Fixes resource leak and Ticket2450 Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | x11grab: fix mixed declaration and codeMichael Niedermayer2012-10-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | x11: Fix x11grab BadCursorIsaac Dooley2012-10-23
| | | | | | | | | | | | | | | | Fixes Ticket1738 Based-on: A fix found in a perl module (http://ffmpeg.org/pipermail/ffmpeg-user/2012-August/008804.html) Reviewed-by: Clemens Fruhwirth <clemens@endorphin.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '716d413c13981da15323c7a3821860536eefdbbb'Michael Niedermayer2012-10-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '716d413c13981da15323c7a3821860536eefdbbb': Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat Conflicts: doc/examples/muxing.c ffmpeg.h ffmpeg_filter.c ffmpeg_opt.c ffplay.c ffprobe.c libavcodec/8bps.c libavcodec/aasc.c libavcodec/aura.c libavcodec/avcodec.h libavcodec/avs.c libavcodec/bfi.c libavcodec/bmp.c libavcodec/bmpenc.c libavcodec/c93.c libavcodec/cscd.c libavcodec/cyuv.c libavcodec/dpx.c libavcodec/dpxenc.c libavcodec/eatgv.c libavcodec/escape124.c libavcodec/ffv1.c libavcodec/flashsv.c libavcodec/fraps.c libavcodec/h264.c libavcodec/huffyuv.c libavcodec/iff.c libavcodec/imgconvert.c libavcodec/indeo3.c libavcodec/kmvc.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libx264.c libavcodec/ljpegenc.c libavcodec/mjpegdec.c libavcodec/mjpegenc.c libavcodec/motionpixels.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo_enc.c libavcodec/pamenc.c libavcodec/pcxenc.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/pnm.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/ptx.c libavcodec/qdrw.c libavcodec/qpeg.c libavcodec/qtrleenc.c libavcodec/raw.c libavcodec/rawdec.c libavcodec/rl2.c libavcodec/sgidec.c libavcodec/sgienc.c libavcodec/snowdec.c libavcodec/snowenc.c libavcodec/sunrast.c libavcodec/targa.c libavcodec/targaenc.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/tmv.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/vb.c libavcodec/vp3.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/xwddec.c libavcodec/xwdenc.c libavcodec/yop.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/drawutils.c libavfilter/formats.c libavfilter/src_movie.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_format.c libavfilter/vf_hflip.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/movenc.c libavformat/mxf.h libavformat/utils.c libavformat/yuv4mpeg.c libavutil/imgutils.c libavutil/pixdesc.c libswscale/input.c libswscale/output.c libswscale/swscale_internal.h libswscale/swscale_unscaled.c libswscale/utils.c libswscale/x86/swscale_template.c libswscale/x86/yuv2rgb.c libswscale/x86/yuv2rgb_template.c libswscale/yuv2rgb.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
| |
* | Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'Michael Niedermayer2012-09-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9': avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member Conflicts: libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libx264.c libavcodec/mpeg12enc.c libavcodec/options_table.h libavcodec/snowenc.c libavcodec/tiffenc.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/af_amix.c libavfilter/af_asyncts.c libavfilter/af_join.c libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_delogo.c libavfilter/vf_drawtext.c libavformat/http.c libavformat/img2dec.c libavformat/img2enc.c libavformat/movenc.c libavformat/mpegenc.c libavformat/mpegtsenc.c libavformat/options_table.h libavformat/segment.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '124134e42455763b28cc346fed1d07017a76e84e'Michael Niedermayer2012-09-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '124134e42455763b28cc346fed1d07017a76e84e': avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member Conflicts: libavcodec/aacenc.c libavcodec/libopenjpegenc.c libavcodec/options_table.h libavdevice/bktr.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/af_amix.c libavfilter/vf_drawtext.c libavformat/movenc.c libavformat/options_table.h libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>