From: Steve Lhomme <[email protected]>
---
avtools/Makefile | 2 +-
avtools/avconv_dxva2.c | 1 +
avtools/avconv_dxva_template.c | 7 ++++++-
avtools/avconv_guid.c | 20 ++++++++++++++++++++
4 files changed, 28 insertions(+), 2 deletions(-)
create mode 100644 avtools/avconv_guid.c
diff --git a/avtools/Makefile b/avtools/Makefile
index c23a605a55..5d374a9360 100644
--- a/avtools/Makefile
+++ b/avtools/Makefile
@@ -12,7 +12,7 @@ OBJS-avconv += avtools/avconv_opt.o
avtools/avconv_filter.o \
avtools/avconv_hw.o
OBJS-avconv-$(CONFIG_LIBMFX) += avtools/avconv_qsv.o
OBJS-avconv-$(CONFIG_VDA) += avtools/avconv_vda.o
-OBJS-avconv-$(HAVE_DXVA2_LIB) += avtools/avconv_dxva2.o
+OBJS-avconv-$(HAVE_DXVA2_LIB) += avtools/avconv_dxva2.o avtools/avconv_guid.o
define DOAVTOOL
OBJS-$(1) += avtools/cmdutils.o avtools/$(1).o $(OBJS-$(1)-yes)
diff --git a/avtools/avconv_dxva2.c b/avtools/avconv_dxva2.c
index 442a0bdbd8..4c6ef8d7be 100644
--- a/avtools/avconv_dxva2.c
+++ b/avtools/avconv_dxva2.c
@@ -63,6 +63,7 @@ typedef struct dxva_context DXVA_AV_CONTEXT;
typedef IDirectXVideoDecoderService *DXVA_DECODER_SERVICE;
#include "avconv_dxva_template.c"
+#include <initguid.h>
DEFINE_GUID(IID_IDirectXVideoDecoderService,
0xfc51a551,0xd5e7,0x11d9,0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
static void dxva2_uninit(AVCodecContext *s)
diff --git a/avtools/avconv_dxva_template.c b/avtools/avconv_dxva_template.c
index c6bd0c52f8..572a140e8f 100644
--- a/avtools/avconv_dxva_template.c
+++ b/avtools/avconv_dxva_template.c
@@ -16,9 +16,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifndef INITGUID
+#include <guiddef.h>
+#endif
+
/* define all the GUIDs used directly here,
to avoid problems with inconsistent dxva2api.h versions in mingw-w64 and
different MSVC version */
-#include <initguid.h>
DEFINE_GUID(DXVA2_ModeMPEG2_VLD, 0xee27417f,
0x5e28,0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);
DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD, 0x86695f12,
0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
DEFINE_GUID(DXVA2_ModeH264_E, 0x1b81be68,
0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
@@ -31,6 +34,7 @@ DEFINE_GUID(DXVA2_ModeHEVC_VLD_Main10,0x107af0e0,
0xef1a,0x4d19,0xab,0xa8,0x67,0
DEFINE_GUID(DXVA2_NoEncrypt, 0x1b81beD0,
0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(GUID_NULL, 0x00000000,
0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
+#ifndef INITGUID
typedef struct dxva_mode {
const GUID *guid;
enum AVCodecID codec;
@@ -287,3 +291,4 @@ fail:
dxva_uninit(s);
return AVERROR(EINVAL);
}
+#endif /* INITGUID */
diff --git a/avtools/avconv_guid.c b/avtools/avconv_guid.c
new file mode 100644
index 0000000000..0093e33e77
--- /dev/null
+++ b/avtools/avconv_guid.c
@@ -0,0 +1,20 @@
+/*
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <initguid.h>
+#include "avconv_dxva_template.c"
--
2.11.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel