Skip to content

Commit

Permalink
Refactor VDA and hw-accel video decode setting
Browse files Browse the repository at this point in the history
  • Loading branch information
andoma committed Dec 16, 2015
1 parent 8ff42cf commit 275cfc0
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 17 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ SRCS += src/video/video_playback.c \
src/video/h264_annexb.c \

SRCS-$(CONFIG_VDPAU) += src/video/vdpau.c
SRCS-$(CONFIG_VDA) += src/video/vda.c

SRCS-$(CONFIG_CEDAR) += \
src/ui/glw/glw_video_sunxi.c \
Expand Down
1 change: 0 additions & 1 deletion configure.osx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ enable realpath
enable polarssl
enable librtmp
enable dvd
enable vda
enable fsevents
enable webpopup

Expand Down
2 changes: 1 addition & 1 deletion src/arch/android/android_video_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ android_codec_create(media_codec_t *mc, const media_codec_params_t *mcp,
jmethodID mid;
const char *type = NULL;
const char *nicename = NULL;
if(!video_settings.android_video_accel)
if(!video_settings.video_accel)
return 1;

switch(mc->codec_id) {
Expand Down
1 change: 1 addition & 0 deletions src/arch/osx/osx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SRCS += src/arch/osx/osx_app.m \
src/fileaccess/fa_funopen.c \
src/fileaccess/fa_fs.c \
src/ui/glw/glw_video_vda.c \
src/video/vda.c \


SRCS-$(CONFIG_WEBPOPUP) += src/arch/osx/osx_webpopup.m
Expand Down
2 changes: 1 addition & 1 deletion src/video/vda.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ video_vda_codec_create(media_codec_t *mc, const media_codec_params_t *mcp,
CFNumberRef cv_pix_fmt;
int zero_copy = 1;

if(mc->codec_id != AV_CODEC_ID_H264 || !video_settings.vda)
if(mc->codec_id != AV_CODEC_ID_H264 || !video_settings.video_accel)
return 1;

if(mcp == NULL || mcp->extradata == NULL || mcp->extradata_size == 0 ||
Expand Down
17 changes: 7 additions & 10 deletions src/video/video_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,16 @@ video_settings_init(void)
NULL);
#endif

#if ENABLE_VDA
setting_create(SETTING_BOOL, s, SETTINGS_INITIAL_UPDATE,
SETTING_TITLE(_p("Enable VDA")),
SETTING_HTSMSG("vda", store, "videoplayback"),
SETTING_WRITE_BOOL(&video_settings.vda),
NULL);
#endif

#ifdef __ANDROID__
#if defined(__APPLE__) || defined(__ANDROID__)
setting_create(SETTING_BOOL, s, SETTINGS_INITIAL_UPDATE,
SETTING_TITLE(_p("Hardware accelerated decoding")),
SETTING_HTSMSG("videoaccel", store, "videoplayback"),
SETTING_WRITE_BOOL(&video_settings.android_video_accel),
#if defined(__APPLE__)
SETTING_VALUE(1),
#else
SETTING_VALUE(0),
#endif
SETTING_WRITE_BOOL(&video_settings.video_accel),
NULL);
#endif

Expand Down
3 changes: 1 addition & 2 deletions src/video/video_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ struct video_settings {
int vdpau_deinterlace;
int vdpau_deinterlace_resolution_limit;
int continuous_playback;
int vda;
int android_video_accel;
int video_accel;

int seek_back_step;
int seek_fwd_step;
Expand Down
1 change: 0 additions & 1 deletion support/configure.inc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ CONFIG_LIST="
sqlite_locking
sqlite_internal
libav
vda
tlsf
airplay
webpopup
Expand Down

0 comments on commit 275cfc0

Please sign in to comment.