From f106a109941347ec7d7ff34c422889161f94f93c Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 27 Sep 2018 15:24:20 +0900 Subject: [PATCH] msdk: Fix building on MSVC And add missing #ifdef _WIN32 for MSVC build https://bugzilla.gnome.org/show_bug.cgi?id=797211 --- sys/msdk/gstmsdkenc.c | 2 ++ sys/msdk/gstmsdksystemmemory.c | 2 ++ sys/msdk/gstmsdkvideomemory.c | 4 +++- sys/msdk/gstmsdkvpp.c | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/msdk/gstmsdkenc.c b/sys/msdk/gstmsdkenc.c index 69acdf59f2..8a19b1c564 100644 --- a/sys/msdk/gstmsdkenc.c +++ b/sys/msdk/gstmsdkenc.c @@ -1096,6 +1096,7 @@ gst_msdkenc_get_surface_from_pool (GstMsdkEnc * thiz, GstBufferPool * pool, return msdk_surface; } +#ifndef _WIN32 static gboolean import_dmabuf_to_msdk_surface (GstMsdkEnc * thiz, GstBuffer * buf, MsdkSurface * msdk_surface) @@ -1156,6 +1157,7 @@ import_dmabuf_to_msdk_surface (GstMsdkEnc * thiz, GstBuffer * buf, return TRUE; } +#endif static MsdkSurface * gst_msdkenc_get_surface_from_frame (GstMsdkEnc * thiz, diff --git a/sys/msdk/gstmsdksystemmemory.c b/sys/msdk/gstmsdksystemmemory.c index b81307322b..54ee2ae005 100644 --- a/sys/msdk/gstmsdksystemmemory.c +++ b/sys/msdk/gstmsdksystemmemory.c @@ -30,7 +30,9 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _WIN32 #include +#endif #include #include "gstmsdksystemmemory.h" diff --git a/sys/msdk/gstmsdkvideomemory.c b/sys/msdk/gstmsdkvideomemory.c index f25128f12a..b9b4f9ca71 100644 --- a/sys/msdk/gstmsdkvideomemory.c +++ b/sys/msdk/gstmsdkvideomemory.c @@ -30,9 +30,11 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _WIN32 #include -#include #include +#endif +#include #include "gstmsdkvideomemory.h" #include "gstmsdkallocator.h" diff --git a/sys/msdk/gstmsdkvpp.c b/sys/msdk/gstmsdkvpp.c index de4e45208b..eea834461a 100644 --- a/sys/msdk/gstmsdkvpp.c +++ b/sys/msdk/gstmsdkvpp.c @@ -513,6 +513,7 @@ get_surface_from_pool (GstMsdkVPP * thiz, GstBufferPool * pool, return msdk_surface; } +#ifndef _WIN32 static gboolean import_dmabuf_to_msdk_surface (GstMsdkVPP * thiz, GstBuffer * buf, MsdkSurface * msdk_surface) @@ -576,6 +577,7 @@ import_dmabuf_to_msdk_surface (GstMsdkVPP * thiz, GstBuffer * buf, return TRUE; } +#endif static MsdkSurface * get_msdk_surface_from_input_buffer (GstMsdkVPP * thiz, GstBuffer * inbuf)