mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-12 19:18:44 +02:00
0bd1be65e8
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. |
||
---|---|---|
.. | ||
tests | ||
alldevices.c | ||
alsa_dec.c | ||
alsa_enc.c | ||
alsa.c | ||
alsa.h | ||
avdevice.c | ||
avdevice.h | ||
avdeviceres.rc | ||
avfoundation.m | ||
bktr.c | ||
caca.c | ||
decklink_common_c.h | ||
decklink_common.cpp | ||
decklink_common.h | ||
decklink_dec_c.c | ||
decklink_dec.cpp | ||
decklink_dec.h | ||
decklink_enc_c.c | ||
decklink_enc.cpp | ||
decklink_enc.h | ||
dshow_capture.h | ||
dshow_common.c | ||
dshow_crossbar.c | ||
dshow_enummediatypes.c | ||
dshow_enumpins.c | ||
dshow_filter.c | ||
dshow_pin.c | ||
dshow.c | ||
dv1394.c | ||
dv1394.h | ||
fbdev_common.c | ||
fbdev_common.h | ||
fbdev_dec.c | ||
fbdev_enc.c | ||
file_open.c | ||
gdigrab.c | ||
iec61883.c | ||
internal.h | ||
jack.c | ||
lavfi.c | ||
libavdevice.v | ||
libcdio.c | ||
libdc1394.c | ||
Makefile | ||
openal-dec.c | ||
opengl_enc_shaders.h | ||
opengl_enc.c | ||
oss_dec.c | ||
oss_enc.c | ||
oss.c | ||
oss.h | ||
pulse_audio_common.c | ||
pulse_audio_common.h | ||
pulse_audio_dec.c | ||
pulse_audio_enc.c | ||
qtkit.m | ||
sdl2.c | ||
sndio_dec.c | ||
sndio_enc.c | ||
sndio.c | ||
sndio.h | ||
timefilter.c | ||
timefilter.h | ||
utils.c | ||
v4l2-common.c | ||
v4l2-common.h | ||
v4l2.c | ||
v4l2enc.c | ||
v4l.c | ||
version.h | ||
vfwcap.c | ||
x11grab.c | ||
xcbgrab.c | ||
xv.c |