Michael Niedermayer
4f63d6d3b5
avdevice/x11grab: fix error handling in pixel formats
...
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
65e78a2e4b
x11grab: Refactor pixel format parsing
11 years ago
Luca Barbato
bb3ead7e54
x11grab: Fallback to normal XImage if SHM is not supported
11 years ago
Luca Barbato
58396e806c
x11grab: Use a typedef for the context, as most other code does
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Luca Barbato
7bb505a33c
x11grab: Drop a spurious space in the extension reporting message
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Luca Barbato
20e82b41fc
x11grab: Small near-cosmetic refactorings
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Luca Barbato
f07a4290a0
x11grab: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Nicolas George
8e2976860f
lavd/x11grab: reindent after last commit.
11 years ago
Nicolas George
1d12df1ad7
lavd/x11grab: add an option to disable MIT-SHM.
...
With remote displays supporting the MIT-SHM extension,
the extension is detected and used, but attaching fails
asynchronously.
11 years ago
Nicolas George
16c6795465
lavd/x11grab: check 32-bits color masks.
...
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.
11 years ago
Nicolas George
36fbe3c789
lavd/x11grab: change error code for unsupported visuals.
11 years ago
Nicolas George
a65c0a3fe8
lavd/x11grab: disable drawing mouse without XFixes.
...
Fix a segfault if the XFixes extension is not available on
the X11 server.
Can be reproduced using the VNC server.
11 years ago
Lukasz Marek
f607767d93
lavd: add categories to device implementations
...
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
11 years ago
Carl Eugen Hoyos
f60c3a7c1b
lavd/x11grab: Support AV_PIX_FMT_PAL8.
...
Fixes ticket #3068 .
11 years ago
Paul B Mahol
0addc82880
avdevice/x11grab: use AV_OPT_TYPE_VIDEO_RATE
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
1ee8fadb81
avdevice/x11grab: allocate just one Cursor
...
Fixes resource leak and Ticket2450
Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
11d695d120
x11grab: fix mixed declaration and code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Isaac Dooley
469a65b150
x11: Fix x11grab BadCursor
...
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>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
124134e424
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Stefano Sabatini
4270d8c04d
lavd/x11grab: deprecate "nomouse" specification in filename
...
Favor draw_mouse option. Should simplify parsing, and make it more
robust.
13 years ago
Stefano Sabatini
c93b796c3e
lavd/x11grab: apply misc consistency fixes to options definition
...
In particular, do not upcase first word, do not use final dot, use a verb
to specify what the option does, sort entries by name, apply random
vertical align.
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Clément Bœsch
16dc5f2050
Replace various inlined inverse AVRational with av_inv_q().
13 years ago
Anton Khirnov
c4ef6a3e4b
Add missing libavutil/time.h includes.
13 years ago
Diego Biurrun
24f8961f93
x11grab: cosmetics: consistent naming for x11grab-related things
13 years ago
Nicolas George
5732f40e3f
x11grab: use AV_OPT_TYPE_IMAGE_SIZE.
13 years ago
Michael Niedermayer
50d67d951c
x11grab: fix compilation
...
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Antonio Ospite
d3958ab4ed
x11grab: fix a memory leak exposed by valgrind
...
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>
13 years ago
Diego Biurrun
cfac648e6a
doxygen: Remove documentation for non-existing parameters; misc small fixes.
13 years ago
Carl Eugen Hoyos
de05e41bfc
Use the correct pix_fmt for 32bit x11grab.
...
Remove adding a constant value to each pixel to make it opaque.
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
13 years ago
Diego Biurrun
e873c03ac7
misc Doxygen markup improvements
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Carl Eugen Hoyos
b3c67372a5
Force opaque alpha channel for 32bit x11grab image.
...
Fixes ticket #163 .
Approved-by: Clemens Fruhwirth
Approved-by: Edouard Gomez
13 years ago
Anton Khirnov
3b3bbdd3e6
lavf,lavd: replace av_new_stream->avformat_new_stream part I.
...
Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Diego Biurrun
30b4ee7901
Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.
14 years ago
Anton Khirnov
c14fe6bc99
lavf,lavd: remove all usage of AVFormatParameters from demuxers.
...
AVFormatParameters are converted into corresponding private options in
av_open_input_file/stream() compat wrappers, so accessing them from
demuxers is redundant.
14 years ago
Yu-Jie Lin
1442d29533
x11grab: add show_region AVOption.
...
Draw the current grabbing region for indication.
Signed-off-by: Yu-Jie Lin <livibetter@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Yu-Jie Lin
085791a92e
x11grab: add follow_mouse AVOption.
...
-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>
14 years ago
Anton Khirnov
ce558c8f59
x11grab: replace undocumented nomouse hackery with a private option.
14 years ago
Diego Biurrun
f9853c1b9c
libavdevice: Remove disabled code.
14 years ago
Sven C. Dack
2f2c60400a
x11grab: remove a memory allocation and the associated memcpy.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Anton Khirnov
367732832f
lavf,lavc: free avoptions in a generic way.
...
It's simpler and less error-prone.
Fixes some memleaks along the way.
14 years ago
Anton Khirnov
ff494cbdaf
x11grab: add framerate private option.
14 years ago
Stefano Sabatini
6b899e16de
lavdev: prefer the inclusion of avdevice.h over that of libavformat/avformat.h
14 years ago
Anton Khirnov
724a900c45
x11grab: add video_size private option.
14 years ago
Anton Khirnov
3102fb0351
x11grab: factorize returning error codes.
14 years ago