[vlc-commits] avcodec: rename libvaapi_dr_plugin to libvaapi_plugin
Thomas Guillem
git at videolan.org
Sat Sep 2 14:28:46 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Sep 2 14:27:26 2017 +0200| [3102683e8f7ca2120ae785623d09d734d9e2a143] | committer: Thomas Guillem
avcodec: rename libvaapi_dr_plugin to libvaapi_plugin
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3102683e8f7ca2120ae785623d09d734d9e2a143
---
modules/codec/Makefile.am | 10 +++++-----
modules/codec/avcodec/vaapi.c | 37 ++++++++++++++++++-------------------
2 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
index 89453f6204..10eb160d36 100644
--- a/modules/codec/Makefile.am
+++ b/modules/codec/Makefile.am
@@ -380,16 +380,16 @@ libvaapi_drm_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DVLC_VA_BACKEND_DRM
libvaapi_drm_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(LIBVA_DRM_CFLAGS) $(AVCODEC_CFLAGS)
libvaapi_drm_plugin_la_LIBADD = $(LIBVA_DRM_LIBS)
-libvaapi_dr_plugin_la_SOURCES = \
+libvaapi_plugin_la_SOURCES = \
codec/avcodec/vaapi.c hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h
-libvaapi_dr_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DVLC_VA_BACKEND_DR
-libvaapi_dr_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVCODEC_CFLAGS)
-libvaapi_dr_plugin_la_LIBADD = $(LIBVA_LIBS)
+libvaapi_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
+libvaapi_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVCODEC_CFLAGS)
+libvaapi_plugin_la_LIBADD = $(LIBVA_LIBS)
if HAVE_AVCODEC_VAAPI
if HAVE_VAAPI_DRM
codec_LTLIBRARIES += libvaapi_drm_plugin.la
endif
-codec_LTLIBRARIES += libvaapi_dr_plugin.la
+codec_LTLIBRARIES += libvaapi_plugin.la
endif
libdxva2_plugin_la_SOURCES = \
diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index 04711ad3d4..957bb7b8a8 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -117,9 +117,9 @@ static int GetVaProfile(AVCodecContext *ctx, const es_format_t *fmt,
return VLC_SUCCESS;
}
-#ifdef VLC_VA_BACKEND_DR
+#ifndef VLC_VA_BACKEND_DRM
-static int GetDR(vlc_va_t *va, picture_t *pic, uint8_t **data)
+static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
{
(void) va;
@@ -129,7 +129,7 @@ static int GetDR(vlc_va_t *va, picture_t *pic, uint8_t **data)
return VLC_SUCCESS;
}
-static void DeleteDR(vlc_va_t *va, void *hwctx)
+static void Delete(vlc_va_t *va, void *hwctx)
{
vlc_va_sys_t *sys = va->sys;
vlc_object_t *o = VLC_OBJECT(va);
@@ -142,8 +142,8 @@ static void DeleteDR(vlc_va_t *va, void *hwctx)
free(sys);
}
-static int CreateDR(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
- const es_format_t *fmt, picture_sys_t *p_sys)
+static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
+ const es_format_t *fmt, picture_sys_t *p_sys)
{
if (pix_fmt != AV_PIX_FMT_VAAPI_VLD || p_sys == NULL)
return VLC_EGENERIC;
@@ -201,7 +201,7 @@ static int CreateDR(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
ctx->hwaccel_context = &sys->hw_ctx;
va->sys = sys;
va->description = vaQueryVendorString(sys->hw_ctx.display);
- va->get = GetDR;
+ va->get = Get;
return VLC_SUCCESS;
error:
@@ -219,7 +219,7 @@ error:
#else /* DRM */
-static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
+static int GetDRM(vlc_va_t *va, picture_t *pic, uint8_t **data)
{
vlc_va_sys_t *sys = va->sys;
@@ -237,7 +237,7 @@ static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
return VLC_SUCCESS;
}
-static void Delete(vlc_va_t *va, void **hwctx)
+static void DeleteDRM(vlc_va_t *va, void **hwctx)
{
vlc_va_sys_t *sys = va->sys;
vlc_object_t *o = VLC_OBJECT(va);
@@ -250,15 +250,13 @@ static void Delete(vlc_va_t *va, void **hwctx)
free(sys);
}
-#ifdef VLC_VA_BACKEND_DRM
static void DRMNativeDestroy(VANativeDisplay native)
{
vlc_close((intptr_t) native);
}
-#endif
-static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
- const es_format_t *fmt, picture_sys_t *p_sys)
+static int CreateDRM(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
+ const es_format_t *fmt, picture_sys_t *p_sys)
{
if (pix_fmt != AV_PIX_FMT_VAAPI_VLD || p_sys)
return VLC_EGENERIC;
@@ -356,7 +354,7 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
ctx->hwaccel_context = &sys->hw_ctx;
va->sys = sys;
va->description = vaQueryVendorString(sys->hw_ctx.display);
- va->get = Get;
+ va->get = GetDRM;
return VLC_SUCCESS;
error:
@@ -374,16 +372,17 @@ error:
#endif
vlc_module_begin ()
-#if defined (VLC_VA_BACKEND_DRM)
+#ifdef VLC_VA_BACKEND_DRM
set_description( N_("VA-API video decoder via DRM") )
set_capability( "hw decoder", 0 )
- set_callbacks( Create, Delete )
-#elif defined (VLC_VA_BACKEND_DR)
- set_description( N_("VA-API direct video decoder") )
+ set_callbacks( CreateDRM, DeleteDRM )
+ add_shortcut( "vaapi", "vaapi_drm" )
+#else
+ set_description( N_("VA-API video decoder") )
set_capability( "hw decoder", 100 )
- set_callbacks( CreateDR, DeleteDR )
+ set_callbacks( Create, Delete )
+ add_shortcut( "vaapi" )
#endif
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_VCODEC )
- add_shortcut( "vaapi" )
vlc_module_end ()
More information about the vlc-commits
mailing list