#include "gstd3d11memory.h"
#include "gstd3d11device.h"
#include "gstd3d11utils.h"
-#include "gstd3d11_private.h"
+#include "gstd3d11-private.h"
#include <string.h>
/**
* SECTION:gstd3d11bufferpool
* @title: GstD3D11BufferPool
- * @short_description: buffer pool for #GstD3D11Memory objects
- * @see_also: #GstBufferPool, #GstGLMemory
+ * @short_description: buffer pool for GstD3D11Memory object
+ * @see_also: #GstBufferPool, #GstD3D11Memory
*
- * a #GstD3D11BufferPool is an object that allocates buffers with #GstD3D11Memory
+ * This GstD3D11BufferPool is an object that allocates buffers
+ * with #GstD3D11Memory
*
- * A #GstGLBufferPool is created with gst_d3d11_buffer_pool_new()
+ * Since: 1.22
*/
GST_DEBUG_CATEGORY_STATIC (gst_d3d11_buffer_pool_debug);
#define GST_IS_D3D11_BUFFER_POOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_D3D11_BUFFER_POOL))
#define GST_D3D11_BUFFER_POOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_D3D11_BUFFER_POOL, GstD3D11BufferPoolClass))
+/**
+ * GstD3D11BufferPool:
+ *
+ * Opaque GstD3D11BufferPool struct
+ *
+ * Since: 1.22
+ */
struct _GstD3D11BufferPool
{
GstBufferPool parent;
/*< private >*/
GstD3D11BufferPoolPrivate *priv;
-
gpointer _gst_reserved[GST_PADDING];
};
+/**
+ * GstD3D11BufferPoolClass:
+ *
+ * Opaque GstD3D11BufferPoolClass struct
+ *
+ * Since: 1.22
+ */
struct _GstD3D11BufferPoolClass
{
- GstBufferPoolClass bufferpool_class;
+ GstBufferPoolClass parent_class;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
#include "gstd3d11compile.h"
#include "gstd3d11device.h"
#include "gstd3d11utils.h"
-#include "gstd3d11_private.h"
+#include "gstd3d11-private.h"
#include <gmodule.h>
#include <wrl.h>
#include <string.h>
+/**
+ * SECTION:gstd3d11compile
+ * @title: GstD3D11Compile
+ * @short_description: HLSL compiler and utility
+ *
+ * A set of HLSL compile helper methods
+ *
+ * Since: 1.22
+ */
+
/* *INDENT-OFF* */
using namespace Microsoft::WRL;
/* *INDENT-ON* */
* Loads HLSL compiler library
*
* Returns: %TRUE if HLSL compiler library is available
+ *
+ * Since: 1.22
*/
gboolean
gst_d3d11_compile_init (void)
* Compiles HLSL code or an effect file into bytecode for a given target
*
* Returns: HRESULT return code
+ *
+ * Since: 1.22
*/
HRESULT
gst_d3d11_compile (LPCVOID src_data, SIZE_T src_data_size, LPCSTR source_name,
* Compiles pixel shader code and creates ID3D11PixelShader
*
* Returns: HRESULT return code
+ *
+ * Since: 1.22
*/
HRESULT
gst_d3d11_create_pixel_shader_simple (GstD3D11Device * device,
* ID3D11InputLayout
*
* Returns: HRESULT return code
+ *
+ * Since: 1.22
*/
HRESULT
gst_d3d11_create_vertex_shader_simple (GstD3D11Device * device,
# include <config.h>
#endif
-#include "gstd3d11_private.h"
+#include "gstd3d11-private.h"
#include "gstd3d11converter.h"
#include "gstd3d11device.h"
#include "gstd3d11utils.h"
#include <string.h>
#include <math.h>
+/**
+ * SECTION:gstd3d11converter
+ * @title: GstD3D11Converter
+ * @short_description: Direct3D11 video converter object
+ *
+ * This object performs various video conversion operation
+ * via Direct3D11 API
+ *
+ * Since: 1.22
+ */
+
GST_DEBUG_CATEGORY_STATIC (gst_d3d11_converter_debug);
#define GST_CAT_DEFAULT gst_d3d11_converter_debug
#define GST_D3D11_CONVERTER_CAST(obj) ((GstD3D11Converter*)(obj))
/**
- * GstD3D11ConverterMethod:
- * @GST_D3D11_CONVERTER_METHOD_SHADER: Performs conversion using pixel shader
- * @GST_D3D11_CONVERTER_METHOD_VIDEO_PROCESSOR: Performs conversion using video processor
+ * GstD3D11ConverterBackend:
+ * @GST_D3D11_CONVERTER_BACKEND_SHADER: Performs conversion using pixel shader
+ * @GST_D3D11_CONVERTER_BACKEND_VIDEO_PROCESSOR: Performs conversion using video processor
*
* Since: 1.22
*/
*/
#define GST_D3D11_CONVERTER_OPT_PRIMARIES_MODE "GstD3D11Converter.primaries-mode"
+/**
+ * GstD3D11Converter:
+ *
+ * Opaque GstD3D11Converter struct
+ *
+ * Since: 1.22
+ */
struct _GstD3D11Converter
{
GstObject parent;
gpointer _gst_reserved[GST_PADDING];
};
+/**
+ * GstD3D11ConverterClass:
+ *
+ * Opaque GstD3D11ConverterClass struct
+ *
+ * Since: 1.22
+ */
struct _GstD3D11ConverterClass
{
GstObjectClass parent_class;
#include "gstd3d11device.h"
#include "gstd3d11utils.h"
#include "gstd3d11format.h"
-#include "gstd3d11_private.h"
+#include "gstd3d11-private.h"
#include "gstd3d11memory.h"
#include <gmodule.h>
#include <wrl.h>
/**
* SECTION:gstd3d11device
- * @short_description: Direct3D11 device abstraction
* @title: GstD3D11Device
+ * @short_description: Direct3D11 device abstraction
*
* #GstD3D11Device wraps ID3D11Device and ID3D11DeviceContext for GPU resources
* to be able to be shared among various elements. Caller can get native
#define GST_D3D11_FENCE(obj) ((GstD3D11Fence *)obj)
#define GST_D3D11_FENCE_CAST(obj) (GST_D3D11_FENCE(obj))
+/**
+ * GST_D3D11_DEVICE_HANDLE_CONTEXT_TYPE:
+ *
+ * The name used in #GstContext queries for requesting a #GstD3D11Device
+ *
+ * Since: 1.22
+ */
#define GST_D3D11_DEVICE_HANDLE_CONTEXT_TYPE "gst.d3d11.device.handle"
+/**
+ * GstD3D11Device:
+ *
+ * Opaque GstD3D11Device struct
+ *
+ * Since: 1.22
+ */
struct _GstD3D11Device
{
GstObject parent;
gpointer _gst_reserved[GST_PADDING];
};
+/**
+ * GstD3D11DeviceClass:
+ *
+ * Opaque GstD3D11DeviceClass struct
+ *
+ * Since: 1.22
+ */
struct _GstD3D11DeviceClass
{
GstObjectClass parent_class;
GstVideoFormat format,
GstD3D11Format * device_format);
+/**
+ * GstD3D11Fence:
+ *
+ * An abstraction of the ID3D11Fence interface
+ *
+ * Since: 1.22
+ */
struct _GstD3D11Fence
{
GstMiniObject parent;
#include "gstd3d11utils.h"
#include "gstd3d11device.h"
#include "gstd3d11memory.h"
-#include "gstd3d11_private.h"
+#include "gstd3d11-private.h"
#include <string.h>
+/**
+ * SECTION:gstd3d11format
+ * @title: GstD3D11Format
+ * @short_description: Bridge of Direct3D11 and GStreamer video format representation
+ *
+ * Since: 1.22
+ */
+
#ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT ensure_debug_category()
static GstDebugCategory *
#define GST_D3D11_ALL_FORMATS \
"{ " GST_D3D11_COMMON_FORMATS " ," GST_D3D11_EXTRA_IN_FORMATS " }"
+/**
+ * GstD3D11Format:
+ *
+ * Represent video format information in Direct3D11 term.
+ *
+ * Since: 1.22
+ */
struct _GstD3D11Format
{
GstVideoFormat format;
#include "gstd3d11memory.h"
#include "gstd3d11device.h"
#include "gstd3d11utils.h"
-#include "gstd3d11_private.h"
+#include "gstd3d11-private.h"
+
+/**
+ * SECTION:gstd3d11memory
+ * @title: GstD3D11Memory
+ * @short_description: Direct3D11 memory abstraction layer
+ *
+ * Since: 1.22
+ */
GST_DEBUG_CATEGORY_STATIC (gst_d3d11_allocator_debug);
#define GST_CAT_DEFAULT gst_d3d11_allocator_debug
* gst_d3d11_allocation_params_copy:
* @src: a #GstD3D11AllocationParams
*
- * Returns: a copy of @src
+ * Returns: (transfer full): a copy of @src
*
* Since: 1.22
*/
GType gst_d3d11_memory_native_type_get_type (void);
#define GST_TYPE_D3D11_MEMORY_NATIVE_TYPE (gst_d3d11_memory_native_type_get_type())
+/**
+ * GstD3D11AllocationParams:
+ *
+ * Contains set of parameters for #GstD3D11Memory allocation
+ *
+ * Since: 1.22
+ */
struct _GstD3D11AllocationParams
{
/* Texture description per plane */
D3D11_TEXTURE2D_DESC desc[GST_VIDEO_MAX_PLANES];
-
GstVideoInfo info;
GstVideoInfo aligned_info;
GstD3D11Format d3d11_format;
-
GstD3D11AllocationFlags flags;
/*< private >*/
gboolean gst_d3d11_allocation_params_alignment (GstD3D11AllocationParams * parms,
const GstVideoAlignment * align);
+/**
+ * GstD3D11Memory:
+ *
+ * Represents information about a Direct3D11 memory object
+ *
+ * Since: 1.22
+ */
struct _GstD3D11Memory
{
GstMemory mem;
ID3D11VideoDevice * video_device,
ID3D11VideoProcessorEnumerator * enumerator);
+/**
+ * GstD3D11Allocator:
+ *
+ * A Direct3D11 memory allocator
+ *
+ * Since: 1.22
+ */
struct _GstD3D11Allocator
{
- GstAllocator allocator;
+ GstAllocator parent;
/*< private >*/
GstD3D11AllocatorPrivate *priv;
-
gpointer _gst_reserved[GST_PADDING];
};
+/**
+ * GstD3D11AllocatorClass:
+ *
+ * Since: 1.22
+ */
struct _GstD3D11AllocatorClass
{
- GstAllocatorClass allocator_class;
+ GstAllocatorClass parent_class;
gboolean (*set_actvie) (GstD3D11Allocator * allocator,
gboolean active);
gboolean gst_d3d11_allocator_set_active (GstD3D11Allocator * allocator,
gboolean active);
+/**
+ * GstD3D11PoolAllocator:
+ *
+ * Allocates #GstD3D11Memory objects and pooling allocated memory
+ *
+ * Since: 1.22
+ */
struct _GstD3D11PoolAllocator
{
- GstD3D11Allocator allocator;
+ GstD3D11Allocator parent;
/*< public >*/
GstD3D11Device *device;
/*< private >*/
GstD3D11PoolAllocatorPrivate *priv;
-
gpointer _gst_reserved[GST_PADDING];
};
+/**
+ * GstD3D11PoolAllocatorClass:
+ *
+ * Opaque GstD3D11PoolAllocatorClass struct
+ *
+ * Since: 1.22
+ */
struct _GstD3D11PoolAllocatorClass
{
- GstD3D11AllocatorClass allocator_class;
+ GstD3D11AllocatorClass parent_class;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
#include "gstd3d11utils.h"
#include "gstd3d11device.h"
-#include "gstd3d11_private.h"
+#include "gstd3d11-private.h"
#include <windows.h>
#include <versionhelpers.h>
#include <mutex>
+/**
+ * SECTION:gstd3d11utils
+ * @title: GstD3D11Utils
+ * @short_description: Direct3D11 specific utility methods
+ *
+ * Since: 1.22
+ */
+
/* *INDENT-OFF* */
static std::recursive_mutex _context_lock;
/* *INDENT-ON* */
*
* Since: 1.22
*/
-
GstContext *
gst_d3d11_context_new (GstD3D11Device * device)
{
* gst_d3d11_luid_to_int64:
* @luid: A pointer to LUID struct
*
- * Converts from a LUID to a 64-bit signed integer.
+ * Converts @luid to a 64-bit signed integer.
* See also Int64FromLuid method defined in
* windows.devices.display.core.interop.h Windows SDK header
*
return val.QuadPart;
}
+/**
+ * _gst_d3d11_result:
+ * @result: HRESULT D3D11 API return code
+ * @device: (nullable): Associated #GstD3D11Device
+ * @cat: a #GstDebugCategory
+ * @file: the file that checking the result code
+ * @function: the function that checking the result code
+ * @line: the line that checking the result code
+ *
+ * Prints debug message if @result code indicates the operation was failed.
+ *
+ * Returns: %TRUE if D3D11 API call result is SUCCESS
+ *
+ * Since: 1.22
+ */
gboolean
_gst_d3d11_result (HRESULT hr, GstD3D11Device * device, GstDebugCategory * cat,
const gchar * file, const gchar * function, gint line)
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/d3d11/gstd3d11.h>
-#include <gst/d3d11/gstd3d11_private.h>
+#include <gst/d3d11/gstd3d11-private.h>
G_BEGIN_DECLS