summaryrefslogtreecommitdiff
path: root/libavdevice/x11grab.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* 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.
* avdevice: Add missing header for NULL_IF_CONFIG_SMALLDiego Biurrun2015-04-09
| | | | Also reshuffle headers into canonical order where appropriate.
* x11grab: Unbreak buildingChristian Hujer2015-02-28
| | | | | | | The correct macro is DEC not D. Broken in b31328d008985f87f0a7c83c700847cef1a4f08c Signed-off-by: Anton Khirnov <anton@khirnov.net>
* 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>
* 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>
* 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
* x11grab: Check for XFixes availability at runtimeLuca Barbato2014-10-04
|
* x11grab: Refactor pixel format parsingLuca Barbato2014-09-03
|
* x11grab: Fallback to normal XImage if SHM is not supportedLuca Barbato2014-09-03
|
* x11grab: Use a typedef for the context, as most other code doesLuca Barbato2014-08-28
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* x11grab: Drop a spurious space in the extension reporting messageLuca Barbato2014-08-28
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* x11grab: Small near-cosmetic refactoringsLuca Barbato2014-08-28
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* x11grab: K&R formatting cosmeticsLuca Barbato2014-08-28
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* 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>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Add missing libavutil/time.h includes.Anton Khirnov2012-07-28
|
* x11grab: cosmetics: consistent naming for x11grab-related thingsDiego Biurrun2012-07-28
|
* x11grab: fix a memory leak exposed by valgrindAntonio Ospite2012-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | When using "-f x11grab -i :0.0" valgrind reports a definitely lost memory block with this message: ==31544== 5 bytes in 1 blocks are definitely lost in loss record 1 of 2 ==31544== at 0x4026E68: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==31544== by 0x4026F17: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==31544== by 0x60D399A: av_malloc (in /usr/lib/x86_64-linux-gnu/libavutil.so.51.22.1) ==31544== by 0x60D3A70: av_strdup (in /usr/lib/x86_64-linux-gnu/libavutil.so.51.22.1) ==31544== by 0x4A2BE58: ??? (in /usr/lib/x86_64-linux-gnu/libavdevice.so.53.2.0) ==31544== by 0x506D29E: avformat_open_input (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.0) ==31544== by 0x400A80: main (in /home/ao2/WIP/am7xxx-play/tests/a.out) The 5 bytes lost are the ones from param = av_strdup(":0.0"), so let's free param in the exit path. Also check the av_strdup() return value. Note: calling av_free(param) even when av_strdup() fails and param is NULL is OK and keeps the code simpler without adding another label to skip av_free(). Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* doxygen: Remove documentation for non-existing parameters; misc small fixes.Diego Biurrun2012-02-28
|
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* misc Doxygen markup improvementsDiego Biurrun2011-12-05
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* lavf,lavd: replace av_new_stream->avformat_new_stream part I.Anton Khirnov2011-10-19
| | | | | Trivial replacements with sed are done in this commit: sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
* AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov2011-10-12
|
* Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.Diego Biurrun2011-09-24
|
* lavf,lavd: remove all usage of AVFormatParameters from demuxers.Anton Khirnov2011-08-15
| | | | | | AVFormatParameters are converted into corresponding private options in av_open_input_file/stream() compat wrappers, so accessing them from demuxers is redundant.
* x11grab: add show_region AVOption.Yu-Jie Lin2011-07-31
| | | | | | | Draw the current grabbing region for indication. Signed-off-by: Yu-Jie Lin <livibetter@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* x11grab: add follow_mouse AVOption.Yu-Jie Lin2011-07-31
| | | | | | | | | -follow_mouse centered|PIXELS move grabbing region to where mouse pointer at the center; or only move when pointer reaches within PIXELS to the edge. Signed-off-by: Yu-Jie Lin <livibetter@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* x11grab: replace undocumented nomouse hackery with a private option.Anton Khirnov2011-07-08
|
* libavdevice: Remove disabled code.Diego Biurrun2011-07-07
|
* x11grab: remove a memory allocation and the associated memcpy.Sven C. Dack2011-06-12
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf,lavc: free avoptions in a generic way.Anton Khirnov2011-06-05
| | | | | | It's simpler and less error-prone. Fixes some memleaks along the way.
* x11grab: add framerate private option.Anton Khirnov2011-06-04
|
* x11grab: add video_size private option.Anton Khirnov2011-05-27
|
* x11grab: factorize returning error codes.Anton Khirnov2011-05-27
|
* configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-12
| | | | | | | | | | | | | | | | Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems since it causes certain system functions to be hidden on some (BSD) systems. The solution is to only add the flag on systems that really require it, i.e. glibc-based ones. This change makes BSD systems compile out-of-the-box without the need for adding specific flags manually. It also allows dropping a number of flags set manually on a file-per-file basis, but were only present to work around breakage introduced by the presence of _POSIX_C_SOURCE. Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions in several places already, so it is preferable to define it globally instead of littering source files with individual #defines only needed for glibc.
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.
* Make x11grab cursor drawing suck lessJason Garrett-Glaser2010-11-07
| | | | | | | | | | | | | This new version: 1. Works on 24-bit and 32-bit input, not just 32-bit. 2. Doesn't try to run on 16-bit or 8-bit, instead of outright crashing. 3. Does proper alpha-blending, so cursor shadows look correct. 4. Doesn't swap R and B. Mostly fixes issue 1997. Fixes issue 2056. Originally committed as revision 25690 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove non-existing stray arguments from Doxygen function documentation.Diego Biurrun2010-07-02
| | | | Originally committed as revision 23976 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix grammar errors in documentationMåns Rullgård2010-06-30
| | | | Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove stray semicolon.Carl Eugen Hoyos2010-06-21
| | | | Originally committed as revision 23691 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* x11grab: AVFormatParameters are always passed from av_open_input_stream(),Ramiro Polla2010-03-23
| | | | | | there is no need to check for it. Originally committed as revision 22651 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define _XOPEN_SOURCE as 600 before including a XSI extension header.Carl Eugen Hoyos2009-12-14
| | | | Originally committed as revision 20871 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use enum PixelFormat as type for input_pixfmt to avoid one icc warning.Carl Eugen Hoyos2009-12-14
| | | | Originally committed as revision 20859 to svn://svn.ffmpeg.org/ffmpeg/trunk