On Sun, Sep 27, 2015 at 8:58 PM, Anton Khirnov <[email protected]> wrote:
> The public API should not depend on the build configuration.
> ---
> libavcodec/Makefile | 3 ++-
> libavcodec/d3d11va.c | 10 ++++++++++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index f163a79..701d6fe 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -19,6 +19,7 @@ OBJS = allcodecs.o
> \
> bitstream.o \
> bitstream_filter.o \
> codec_desc.o \
> + d3d11va.o \
> dv_profile.o \
> imgconvert.o \
> log2_tab.o \
> @@ -581,7 +582,7 @@ OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o
> adpcm_data.o
> OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
>
> # hardware accelerators
> -OBJS-$(CONFIG_D3D11VA) += d3d11va.o dxva2.o
> +OBJS-$(CONFIG_D3D11VA) += dxva2.o
> OBJS-$(CONFIG_DXVA2) += dxva2.o
> OBJS-$(CONFIG_VAAPI) += vaapi.o
> OBJS-$(CONFIG_VDA) += vda.o
> diff --git a/libavcodec/d3d11va.c b/libavcodec/d3d11va.c
> index eea01b8..17bea27 100644
> --- a/libavcodec/d3d11va.c
> +++ b/libavcodec/d3d11va.c
> @@ -23,6 +23,8 @@
> #include <stddef.h>
>
> #include "config.h"
> +
> +#if CONFIG_D3D11VA
> #include "libavutil/error.h"
> #include "libavutil/mem.h"
>
> @@ -36,3 +38,11 @@ AVD3D11VAContext *av_d3d11va_alloc_context(void)
> res->context_mutex = INVALID_HANDLE_VALUE;
> return res;
> }
> +#else
> +struct AVD3D11VAContext *av_d3d11va_alloc_context(void);
is this because of previous declarations? ok then
> +struct AVD3D11VAContext *av_d3d11va_alloc_context(void)
> +{
> + return NULL;
> +}
> +#endif // CONFIG_D3D11VA
nit /* CONFIG_D3D11VA */
--
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel