mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
msdkvpp: delete the macros to make video memory work on Windows
Since gst_msdk_import_to_msdk_surface has been implemented for d3d11, we delete the macros to make it work on Windows. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>
This commit is contained in:
parent
7becf35221
commit
ef4fc11193
1 changed files with 11 additions and 13 deletions
|
@ -934,13 +934,12 @@ gst_msdkvpp_transform (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
out_surface = g_slice_new0 (GstMsdkSurface);
|
out_surface = g_slice_new0 (GstMsdkSurface);
|
||||||
out_surface->surface = gst_msdk_get_surface_from_buffer (outbuf);
|
out_surface->surface = gst_msdk_get_surface_from_buffer (outbuf);
|
||||||
} else {
|
} else {
|
||||||
#ifndef _WIN32
|
|
||||||
out_surface = gst_msdk_import_to_msdk_surface (outbuf, thiz->context,
|
out_surface = gst_msdk_import_to_msdk_surface (outbuf, thiz->context,
|
||||||
&thiz->srcpad_info, 0);
|
&thiz->srcpad_info, GST_MAP_WRITE);
|
||||||
#else
|
if (!thiz->use_video_memory) {
|
||||||
out_surface =
|
out_surface =
|
||||||
gst_msdk_import_sys_mem_to_msdk_surface (outbuf, thiz->srcpad_info);
|
gst_msdk_import_sys_mem_to_msdk_surface (outbuf, thiz->srcpad_info);
|
||||||
#endif
|
}
|
||||||
if (out_surface)
|
if (out_surface)
|
||||||
out_surface->buf = gst_buffer_ref (outbuf);
|
out_surface->buf = gst_buffer_ref (outbuf);
|
||||||
else {
|
else {
|
||||||
|
@ -1027,15 +1026,14 @@ gst_msdkvpp_transform (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
create_new_surface = TRUE;
|
create_new_surface = TRUE;
|
||||||
} else {
|
} else {
|
||||||
release_out_surface (thiz, out_surface);
|
release_out_surface (thiz, out_surface);
|
||||||
#ifndef _WIN32
|
|
||||||
out_surface =
|
out_surface =
|
||||||
gst_msdk_import_to_msdk_surface (outbuf_new, thiz->context,
|
gst_msdk_import_to_msdk_surface (outbuf_new, thiz->context,
|
||||||
&thiz->srcpad_buffer_pool_info, 0);
|
&thiz->srcpad_buffer_pool_info, GST_MAP_WRITE);
|
||||||
#else
|
if (!thiz->use_video_memory) {
|
||||||
out_surface =
|
out_surface =
|
||||||
gst_msdk_import_sys_mem_to_msdk_surface (outbuf_new,
|
gst_msdk_import_sys_mem_to_msdk_surface (outbuf_new,
|
||||||
thiz->srcpad_buffer_pool_info);
|
thiz->srcpad_buffer_pool_info);
|
||||||
#endif
|
}
|
||||||
if (out_surface) {
|
if (out_surface) {
|
||||||
out_surface->buf = gst_buffer_ref (outbuf_new);
|
out_surface->buf = gst_buffer_ref (outbuf_new);
|
||||||
create_new_surface = TRUE;
|
create_new_surface = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue