d3d12, dwrite, va: Fix various msys2 build error/warning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5454>
This commit is contained in:
Seungha Yang 2023-10-12 18:56:57 +09:00 committed by GStreamer Marge Bot
parent 79ffe4f464
commit ed29c23e86
8 changed files with 16 additions and 11 deletions

View file

@ -308,7 +308,7 @@ gst_va_display_win32_new (const gchar * adapter_luid)
goto error;
entry_points.resize (max_entry_points);
for (guint i = 0; i < num_profiles; i++) {
for (gint i = 0; i < num_profiles; i++) {
gint num_entry_poinits;
status = vaQueryConfigEntrypoints (dpy, profiles[i], &entry_points[0],
&num_entry_poinits);

View file

@ -45,8 +45,6 @@ static gboolean gst_d3d12_base_filter_start (GstBaseTransform * trans);
static gboolean gst_d3d12_base_filter_stop (GstBaseTransform * trans);
static gboolean gst_d3d12_base_filter_set_caps (GstBaseTransform * trans,
GstCaps * incaps, GstCaps * outcaps);
static gboolean gst_d3d12_base_filter_get_unit_size (GstBaseTransform * trans,
GstCaps * caps, gsize * size);
static gboolean
gst_d3d12_base_filter_query (GstBaseTransform * trans,
GstPadDirection direction, GstQuery * query);

View file

@ -180,8 +180,9 @@ gst_d3d12_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
gint width, height;
GstVideoAlignment video_align;
GST_WARNING_OBJECT (self, "Resolution %dx%d is not mutiple of %d, fixing",
desc[0].Width, desc[0].Height, align);
GST_WARNING_OBJECT (self, "Resolution %" G_GUINT64_FORMAT
"x%d is not mutiple of %d, fixing", desc[0].Width, desc[0].Height,
align);
width = GST_ROUND_UP_N ((guint) desc[0].Width, align);
height = GST_ROUND_UP_N ((guint) desc[0].Height, align);

View file

@ -155,8 +155,8 @@ struct GstD3D12DecoderPicture : public GstMiniObject
GstD3D12DecoderPicture (GstBuffer * dpb_buf, GstBuffer * out_buf,
std::shared_ptr<GstD3D12Dpb> d3d12_dpb,
ID3D12VideoDecoderHeap * decoder_heap, guint8 dxva_id)
: buffer(dpb_buf), output_buffer(out_buf), dpb(d3d12_dpb)
, heap(decoder_heap), view_id(dxva_id)
: buffer(dpb_buf), output_buffer(out_buf)
, heap(decoder_heap), dpb(d3d12_dpb), view_id(dxva_id)
{
}
@ -180,6 +180,7 @@ struct GstD3D12DecoderPicture : public GstMiniObject
guint8 view_id;
};
static GType gst_d3d12_decoder_picture_get_type (void);
#define GST_TYPE_D3D12_DECODER_PICTURE (gst_d3d12_decoder_picture_get_type ())
GST_DEFINE_MINI_OBJECT_TYPE (GstD3D12DecoderPicture, gst_d3d12_decoder_picture);
@ -1346,7 +1347,7 @@ gst_d3d12_decoder_output_picture (GstD3D12Decoder * decoder,
gint width = GST_VIDEO_FRAME_COMP_WIDTH (&vframe, i) *
GST_VIDEO_FRAME_COMP_PSTRIDE (&vframe, i);
for (guint j = 0; j < GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i); j++) {
for (gint j = 0; j < GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i); j++) {
memcpy (dst, src, width);
dst += GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, i);
src += priv->layout[i].Footprint.RowPitch;

View file

@ -211,6 +211,7 @@ gst_d3d12_device_enable_debug (void)
GST_INFO ("D3D12 debug layer is enabled");
#ifdef HAVE_D3D12DEBUG5
ComPtr < ID3D12Debug5 > d3d12_debug5;
hr = d3d12_debug.As (&d3d12_debug5);
if (SUCCEEDED (hr))
@ -231,6 +232,7 @@ gst_d3d12_device_enable_debug (void)
d3d12_debug1->SetEnableGPUBasedValidation (TRUE);
GST_INFO ("Enabled GPU based validation");
#endif
}
GST_D3D12_CALL_ONCE_END;

View file

@ -83,7 +83,7 @@ gst_d3d12_fence_new (GstD3D12Device * device)
hr = device_handle->CreateFence (0,
D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS (&fence));
if (!gst_d3d12_result (hr, device)) {
GST_ERROR_OBJECT (device, "Failed to create fence, hr: 0x%x", hr);
GST_ERROR_OBJECT (device, "Failed to create fence, hr: 0x%x", (guint) hr);
return nullptr;
}

View file

@ -56,6 +56,9 @@ endif
if cc.has_header('d3d12sdklayers.h')
extra_args += ['-DHAVE_D3D12_SDKLAYERS_H']
if cc.has_header_symbol('d3d12sdklayers.h', 'ID3D12Debug5')
extra_args += ['-DHAVE_D3D12DEBUG5']
endif
endif
# MinGW 32bits compiler seems to be complaining about redundant-decls

View file

@ -350,14 +350,14 @@ STDMETHODIMP
#ifdef HAVE_DWRITE_COLOR_FONT
if (enable_color_font) {
const DWRITE_GLYPH_IMAGE_FORMATS supported_formats =
DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE |
(DWRITE_GLYPH_IMAGE_FORMATS) (DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE |
DWRITE_GLYPH_IMAGE_FORMATS_CFF |
DWRITE_GLYPH_IMAGE_FORMATS_COLR |
DWRITE_GLYPH_IMAGE_FORMATS_SVG |
DWRITE_GLYPH_IMAGE_FORMATS_PNG |
DWRITE_GLYPH_IMAGE_FORMATS_JPEG |
DWRITE_GLYPH_IMAGE_FORMATS_TIFF |
DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8;
DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8);
ComPtr < IDWriteColorGlyphRunEnumerator1 > glyph_run_enum;
ComPtr < IDWriteFactory4 > factory4;