Commit 3a6ddf00 authored by Jean-Paul Saman's avatar Jean-Paul Saman

VAAPI-X11: add --vaapi-vout-recycle option to change vout recycle behaviour.

By default the VLC core tries to recycle video outputs. In case of AMD/ATI
graphics cards (as on the AMD Fusion archtecture) this value should be false.
The default value 'false' also works for NVidia and Intel Graphics cards, thus
it is safe to leave the value as is.
parent ef71d876
......@@ -224,6 +224,9 @@ vlc_module_begin ()
set_capability ("vout display", 275)
set_callbacks (OpenVaapiX11, CloseVaapiX11)
add_shortcut ("vaapi-x11", "vaapi-xcb", "xid")
add_bool( VOUT_CFG_PREFIX "recycle", false,
VOUT_RECYCLE_TEXT, VOUT_RECYCLE_LONGTEXT, true )
#endif
vlc_module_end ()
......
......@@ -274,6 +274,16 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
"for encoding the audio bitstream. It takes the following options: " \
"main, low, ssr (not supported) and ltp (default: main)" )
/*
* Video output options
*/
#define VOUT_CFG_PREFIX "vaapi-vout-"
#define VOUT_RECYCLE_TEXT N_( "Recycle the vout (default false)" )
#define VOUT_RECYCLE_LONGTEXT N_( "Enable the vout to be recycled by VLC core. " \
"By default VLC core recycles the video outputs if possible. If you have " \
"an AMD/ATI graphics card, then this setting should be false." )
#define AVCODEC_COMMON_MEMBERS \
int i_cat; \
int i_codec_id; \
......
......@@ -288,7 +288,8 @@ int OpenVaapiX11(vlc_object_t *obj)
info.has_pictures_invalid = false;
info.has_event_thread = true;
info.has_hide_mouse = false;
info.can_recycle = false;
/* NOTE: Needs to be false for AMD/ATI Graphics cards */
info.can_recycle = var_CreateGetBool(vd, VOUT_CFG_PREFIX "recycle");
/* Setup vout_display_t once everything is fine */
if (VASubtitleFourCC(sys->vaconn, VA_FOURCC_RGBA, &sys->sub_fmt, &sys->sflags) == VLC_SUCCESS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment