• Nicolas George's avatar
    lavd/xcbgrab: do not try to create refcounted packets. · 0bd1be65
    Nicolas George authored
    The framework will allocate a buffer and copy the data to it,
    that takes time. But it avoids constently creating and
    destroyng the shared memory segment, and that saves more time.
    
    On my setup,
    from ~200 to ~300 FPS at full screen (1920×1200),
    from ~1400 to ~3300 at smaller size (640×480),
    similar to legacy x11grab and confirmed by others.
    
    Plus, shared memory segments are a scarce resource,
    allocating potentially many is a bad idea.
    
    Note: if the application were to drop all references to the
    buffer before the next call to av_read_frame(), then passing
    the shared memory segment as a refcounted buffer would be
    even more efficient, but it is hard to guarantee, and it does
    not happen with the ffmpeg command-line tool. Using a small
    number of preallocated buffers and resorting to a copy when
    the pool is exhausted would be a solution to get the better
    of both worlds.
    0bd1be65
Name
Last commit
Last update
..
tests Loading commit data...
Makefile Loading commit data...
alldevices.c Loading commit data...
alsa.c Loading commit data...
alsa.h Loading commit data...
alsa_dec.c Loading commit data...
alsa_enc.c Loading commit data...
avdevice.c Loading commit data...
avdevice.h Loading commit data...
avdeviceres.rc Loading commit data...
avfoundation.m Loading commit data...
bktr.c Loading commit data...
caca.c Loading commit data...
decklink_common.cpp Loading commit data...
decklink_common.h Loading commit data...
decklink_common_c.h Loading commit data...
decklink_dec.cpp Loading commit data...
decklink_dec.h Loading commit data...
decklink_dec_c.c Loading commit data...
decklink_enc.cpp Loading commit data...
decklink_enc.h Loading commit data...
decklink_enc_c.c Loading commit data...
dshow.c Loading commit data...
dshow_capture.h Loading commit data...
dshow_common.c Loading commit data...
dshow_crossbar.c Loading commit data...
dshow_enummediatypes.c Loading commit data...
dshow_enumpins.c Loading commit data...
dshow_filter.c Loading commit data...
dshow_pin.c Loading commit data...
dv1394.c Loading commit data...
dv1394.h Loading commit data...
fbdev_common.c Loading commit data...
fbdev_common.h Loading commit data...
fbdev_dec.c Loading commit data...
fbdev_enc.c Loading commit data...
file_open.c Loading commit data...
gdigrab.c Loading commit data...
iec61883.c Loading commit data...
internal.h Loading commit data...
jack.c Loading commit data...
lavfi.c Loading commit data...
libavdevice.v Loading commit data...
libcdio.c Loading commit data...
libdc1394.c Loading commit data...
openal-dec.c Loading commit data...
opengl_enc.c Loading commit data...
opengl_enc_shaders.h Loading commit data...
oss.c Loading commit data...
oss.h Loading commit data...
oss_dec.c Loading commit data...
oss_enc.c Loading commit data...
pulse_audio_common.c Loading commit data...
pulse_audio_common.h Loading commit data...
pulse_audio_dec.c Loading commit data...
pulse_audio_enc.c Loading commit data...
qtkit.m Loading commit data...
sdl2.c Loading commit data...
sndio.c Loading commit data...
sndio.h Loading commit data...
sndio_dec.c Loading commit data...
sndio_enc.c Loading commit data...
timefilter.c Loading commit data...
timefilter.h Loading commit data...
utils.c Loading commit data...
v4l.c Loading commit data...
v4l2-common.c Loading commit data...
v4l2-common.h Loading commit data...
v4l2.c Loading commit data...
v4l2enc.c Loading commit data...
version.h Loading commit data...
vfwcap.c Loading commit data...
x11grab.c Loading commit data...
xcbgrab.c Loading commit data...
xv.c Loading commit data...