2023-12-25 07:14:39 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2023 Seungha Yang <seungha@centricular.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/video/video.h>
|
2024-03-31 12:55:51 +00:00
|
|
|
#include <gst/d3d12/gstd3d12_fwd.h>
|
2023-12-25 07:14:39 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
#define GST_TYPE_D3D12_COMMAND_QUEUE (gst_d3d12_command_queue_get_type ())
|
|
|
|
#define GST_D3D12_COMMAND_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_D3D12_COMMAND_QUEUE, GstD3D12CommandQueue))
|
|
|
|
#define GST_D3D12_COMMAND_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_D3D12_COMMAND_QUEUE, GstD3D12CommandQueueClass))
|
|
|
|
#define GST_IS_D3D12_COMMAND_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_D3D12_COMMAND_QUEUE))
|
|
|
|
#define GST_IS_D3D12_COMMAND_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_D3D12_COMMAND_QUEUE))
|
|
|
|
#define GST_D3D12_COMMAND_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_D3D12_COMMAND_QUEUE, GstD3D12CommandQueueClass))
|
|
|
|
#define GST_D3D12_COMMAND_QUEUE_CAST(obj) ((GstD3D12CommandQueue*)(obj))
|
2023-12-25 07:14:39 +00:00
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
/**
|
|
|
|
* GstD3D12CommandQueue:
|
|
|
|
*
|
|
|
|
* Opaque GstD3D12CommandQueue struct
|
|
|
|
*
|
|
|
|
* Since: 1.26
|
|
|
|
*/
|
|
|
|
struct _GstD3D12CommandQueue
|
|
|
|
{
|
|
|
|
GstObject parent;
|
|
|
|
|
|
|
|
/*< private >*/
|
|
|
|
GstD3D12CommandQueuePrivate *priv;
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstD3D12CommandQueueClass:
|
|
|
|
*
|
|
|
|
* Opaque GstD3D12CommandQueueClass struct
|
|
|
|
*
|
|
|
|
* Since: 1.26
|
|
|
|
*/
|
|
|
|
struct _GstD3D12CommandQueueClass
|
|
|
|
{
|
|
|
|
GstObjectClass parent_class;
|
|
|
|
|
|
|
|
/*< private >*/
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
|
|
|
};
|
|
|
|
|
|
|
|
GST_D3D12_API
|
|
|
|
GType gst_d3d12_command_queue_get_type (void);
|
|
|
|
|
|
|
|
GST_D3D12_API
|
2024-03-16 11:04:43 +00:00
|
|
|
GstD3D12CommandQueue * gst_d3d12_command_queue_new (ID3D12Device * device,
|
2023-12-25 07:14:39 +00:00
|
|
|
const D3D12_COMMAND_QUEUE_DESC * desc,
|
2024-03-22 09:57:26 +00:00
|
|
|
D3D12_FENCE_FLAGS fence_flags,
|
2023-12-25 07:14:39 +00:00
|
|
|
guint queue_size);
|
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2024-03-31 11:13:20 +00:00
|
|
|
ID3D12CommandQueue * gst_d3d12_command_queue_get_handle (GstD3D12CommandQueue * queue);
|
2023-12-25 07:14:39 +00:00
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2024-03-31 11:13:20 +00:00
|
|
|
ID3D12Fence * gst_d3d12_command_queue_get_fence_handle (GstD3D12CommandQueue * queue);
|
2023-12-25 07:14:39 +00:00
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2023-12-25 07:14:39 +00:00
|
|
|
HRESULT gst_d3d12_command_queue_execute_command_lists (GstD3D12CommandQueue * queue,
|
|
|
|
guint num_command_lists,
|
|
|
|
ID3D12CommandList ** command_lists,
|
|
|
|
guint64 * fence_value);
|
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2023-12-25 07:14:39 +00:00
|
|
|
HRESULT gst_d3d12_command_queue_execute_wait (GstD3D12CommandQueue * queue,
|
|
|
|
ID3D12Fence * fence,
|
|
|
|
guint64 fence_value);
|
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2023-12-25 07:14:39 +00:00
|
|
|
guint64 gst_d3d12_command_queue_get_completed_value (GstD3D12CommandQueue * queue);
|
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2023-12-25 07:14:39 +00:00
|
|
|
HRESULT gst_d3d12_command_queue_fence_wait (GstD3D12CommandQueue * queue,
|
|
|
|
guint64 fence_value,
|
|
|
|
HANDLE event_handle);
|
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2023-12-25 07:14:39 +00:00
|
|
|
void gst_d3d12_command_queue_set_notify (GstD3D12CommandQueue * queue,
|
|
|
|
guint64 fence_value,
|
|
|
|
gpointer fence_data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
|
2024-03-31 12:55:51 +00:00
|
|
|
GST_D3D12_API
|
2024-03-16 12:00:30 +00:00
|
|
|
HRESULT gst_d3d12_command_queue_drain (GstD3D12CommandQueue * queue);
|
|
|
|
|
2023-12-25 07:14:39 +00:00
|
|
|
G_END_DECLS
|