Commit f106a109 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Nirbheek Chauhan
Browse files

msdk: Fix building on MSVC

And add missing #ifdef _WIN32 for MSVC build

https://bugzilla.gnome.org/show_bug.cgi?id=797211
parent 44ecf53d
...@@ -1096,6 +1096,7 @@ gst_msdkenc_get_surface_from_pool (GstMsdkEnc * thiz, GstBufferPool * pool, ...@@ -1096,6 +1096,7 @@ gst_msdkenc_get_surface_from_pool (GstMsdkEnc * thiz, GstBufferPool * pool,
return msdk_surface; return msdk_surface;
} }
#ifndef _WIN32
static gboolean static gboolean
import_dmabuf_to_msdk_surface (GstMsdkEnc * thiz, GstBuffer * buf, import_dmabuf_to_msdk_surface (GstMsdkEnc * thiz, GstBuffer * buf,
MsdkSurface * msdk_surface) MsdkSurface * msdk_surface)
...@@ -1156,6 +1157,7 @@ import_dmabuf_to_msdk_surface (GstMsdkEnc * thiz, GstBuffer * buf, ...@@ -1156,6 +1157,7 @@ import_dmabuf_to_msdk_surface (GstMsdkEnc * thiz, GstBuffer * buf,
return TRUE; return TRUE;
} }
#endif
static MsdkSurface * static MsdkSurface *
gst_msdkenc_get_surface_from_frame (GstMsdkEnc * thiz, gst_msdkenc_get_surface_from_frame (GstMsdkEnc * thiz,
......
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _WIN32
#include <unistd.h> #include <unistd.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include "gstmsdksystemmemory.h" #include "gstmsdksystemmemory.h"
......
...@@ -30,9 +30,11 @@ ...@@ -30,9 +30,11 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _WIN32
#include <unistd.h> #include <unistd.h>
#include <stdlib.h>
#include <va/va.h> #include <va/va.h>
#endif
#include <stdlib.h>
#include "gstmsdkvideomemory.h" #include "gstmsdkvideomemory.h"
#include "gstmsdkallocator.h" #include "gstmsdkallocator.h"
......
...@@ -513,6 +513,7 @@ get_surface_from_pool (GstMsdkVPP * thiz, GstBufferPool * pool, ...@@ -513,6 +513,7 @@ get_surface_from_pool (GstMsdkVPP * thiz, GstBufferPool * pool,
return msdk_surface; return msdk_surface;
} }
#ifndef _WIN32
static gboolean static gboolean
import_dmabuf_to_msdk_surface (GstMsdkVPP * thiz, GstBuffer * buf, import_dmabuf_to_msdk_surface (GstMsdkVPP * thiz, GstBuffer * buf,
MsdkSurface * msdk_surface) MsdkSurface * msdk_surface)
...@@ -576,6 +577,7 @@ import_dmabuf_to_msdk_surface (GstMsdkVPP * thiz, GstBuffer * buf, ...@@ -576,6 +577,7 @@ import_dmabuf_to_msdk_surface (GstMsdkVPP * thiz, GstBuffer * buf,
return TRUE; return TRUE;
} }
#endif
static MsdkSurface * static MsdkSurface *
get_msdk_surface_from_input_buffer (GstMsdkVPP * thiz, GstBuffer * inbuf) get_msdk_surface_from_input_buffer (GstMsdkVPP * thiz, GstBuffer * inbuf)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment