"GstD3D11CompositorBackground::checker",
"GstD3D11CompositorBackground::transparent",
"GstD3D11CompositorBackground::white",
- "GstD3D11CompositorBin!sink_%u",
- "GstD3D11CompositorBin!src",
- "GstD3D11CompositorBinInput",
- "GstD3D11CompositorBinInput:alpha",
- "GstD3D11CompositorBinInput:blend-dest-alpha",
- "GstD3D11CompositorBinInput:blend-dest-rgb",
- "GstD3D11CompositorBinInput:blend-factor-alpha",
- "GstD3D11CompositorBinInput:blend-factor-blue",
- "GstD3D11CompositorBinInput:blend-factor-green",
- "GstD3D11CompositorBinInput:blend-factor-red",
- "GstD3D11CompositorBinInput:blend-op-alpha",
- "GstD3D11CompositorBinInput:blend-op-rgb",
- "GstD3D11CompositorBinInput:blend-src-alpha",
- "GstD3D11CompositorBinInput:blend-src-rgb",
- "GstD3D11CompositorBinInput:height",
- "GstD3D11CompositorBinInput:max-last-buffer-repeat",
- "GstD3D11CompositorBinInput:repeat-after-eos",
- "GstD3D11CompositorBinInput:sizing-policy",
- "GstD3D11CompositorBinInput:width",
- "GstD3D11CompositorBinInput:xpos",
- "GstD3D11CompositorBinInput:ypos",
- "GstD3D11CompositorBinInput:zorder",
- "GstD3D11CompositorBinPad",
- "GstD3D11CompositorBinPad::buffer-consumed",
- "GstD3D11CompositorBinPad:emit-signals",
- "GstD3D11CompositorBlend",
- "GstD3D11CompositorBlend::blend-factor",
- "GstD3D11CompositorBlend::dest-alpha",
- "GstD3D11CompositorBlend::dest-color",
- "GstD3D11CompositorBlend::inv-blend-factor",
- "GstD3D11CompositorBlend::inv-dest-alpha",
- "GstD3D11CompositorBlend::inv-dest-color",
- "GstD3D11CompositorBlend::inv-src-alpha",
- "GstD3D11CompositorBlend::inv-src-color",
- "GstD3D11CompositorBlend::one",
- "GstD3D11CompositorBlend::src-alpha",
- "GstD3D11CompositorBlend::src-alpha-sat",
- "GstD3D11CompositorBlend::src-color",
- "GstD3D11CompositorBlend::zero",
- "GstD3D11CompositorBlendOperation",
- "GstD3D11CompositorBlendOperation::add",
- "GstD3D11CompositorBlendOperation::max",
- "GstD3D11CompositorBlendOperation::min",
- "GstD3D11CompositorBlendOperation::rev-subtract",
- "GstD3D11CompositorBlendOperation::subtract",
"GstD3D11CompositorPad",
"GstD3D11CompositorPad:alpha",
- "GstD3D11CompositorPad:blend-dest-alpha",
- "GstD3D11CompositorPad:blend-dest-rgb",
- "GstD3D11CompositorPad:blend-factor-alpha",
- "GstD3D11CompositorPad:blend-factor-blue",
- "GstD3D11CompositorPad:blend-factor-green",
- "GstD3D11CompositorPad:blend-factor-red",
- "GstD3D11CompositorPad:blend-op-alpha",
- "GstD3D11CompositorPad:blend-op-rgb",
- "GstD3D11CompositorPad:blend-src-alpha",
- "GstD3D11CompositorPad:blend-src-rgb",
"GstD3D11CompositorPad:height",
"GstD3D11CompositorPad:sizing-policy",
"GstD3D11CompositorPad:width",
GST_D3D11_COMPOSITOR_OPERATOR_OVER,
} GstD3D11CompositorOperator;
+/**
+ * GstD3D11CompositorOperator:
+ *
+ * Since: 1.22
+ */
#define GST_TYPE_D3D11_COMPOSITOR_OPERATOR (gst_d3d11_compositor_operator_get_type())
static GType
gst_d3d11_compositor_operator_get_type (void)
g_object_class_install_property (object_class, PROP_PAD_ALPHA,
g_param_spec_double ("alpha", "Alpha", "Alpha of the picture", 0.0, 1.0,
DEFAULT_PAD_ALPHA, param_flags));
+
+ /**
+ * GstD3D11CompositorPad:operator:
+ *
+ * Blending operator to use for blending this pad over the previous ones
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (object_class, PROP_PAD_OPERATOR,
g_param_spec_enum ("operator", "Operator",
"Blending operator to use for blending this pad over the previous ones",
g_free (data);
}
+typedef struct _GstD3D11DecoderDocCaps
+{
+ GstDXVACodec codec;
+ const gchar *sink_caps;
+ const gchar *src_caps;
+} GstD3D11DecoderDocCaps;
+
+/* *INDENT-OFF* */
+static const GstD3D11DecoderDocCaps doc_caps_list[] = {
+ {
+ GST_DXVA_CODEC_MPEG2,
+ "video/mpeg, width = (int) [ 1, 1920 ], height = (int) [ 1, 1920 ], "
+ "mpegversion = (int) 2, systemstream = (boolean) false, "
+ "profile = (string) { main, simple }",
+
+ "video/x-raw(memory:D3D11Memory), format = (string) NV12, "
+ "width = (int) [ 1, 1920 ], height = (int) [ 1, 1920 ]; "
+ "video/x-raw, format = (string) NV12, "
+ "width = (int) [ 1, 1920 ], height = (int) [ 1, 1920 ]"},
+ {
+ GST_DXVA_CODEC_H264,
+ "video/x-h264, width = (int) [ 1, 4096 ], height = (int) [ 1, 4096 ], "
+ "stream-format = (string) { avc, avc3, byte-stream }, "
+ "alignment = (string) au, "
+ "profile = (string) { high, progressive-high, constrained-high, main, "
+ "constrained-baseline, baseline }",
+
+ "video/x-raw(memory:D3D11Memory), format = (string) NV12, "
+ "width = (int) [ 1, 4096 ], height = (int) [ 1, 4096 ]; "
+ "video/x-raw, format = (string) NV12, "
+ "width = (int) [ 1, 4096 ], height = (int) [ 1, 4096 ]"
+ },
+ {
+ GST_DXVA_CODEC_H265,
+ "video/x-h265, width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ], "
+ "stream-format = (string) { hev1, hvc1, byte-stream }, "
+ "alignment = (string) au, profile = (string) { main, main-10 }",
+
+ "video/x-raw(memory:D3D11Memory), format = (string) { NV12, P010_10LE }, "
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]; "
+ "video/x-raw, format = (string) { NV12, P010_10LE }, "
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]"
+ },
+ {
+ GST_DXVA_CODEC_VP8,
+ "video/x-vp8, width = (int) [ 1, 4096 ], height = (int) [ 1, 4096 ]",
+
+ "video/x-raw(memory:D3D11Memory), format = (string) NV12, "
+ "width = (int) [ 1, 4096 ], height = (int) [ 1, 4096 ]; "
+ "video/x-raw, format = (string) NV12, "
+ "width = (int) [ 1, 4096 ], height = (int) [ 1, 4096 ]"
+ },
+ {
+ GST_DXVA_CODEC_VP9,
+ "video/x-vp9, width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ], "
+ "alignment = (string) frame, profile = (string) { 0, 2 }",
+
+ "video/x-raw(memory:D3D11Memory), format = (string) { NV12, P010_10LE }, "
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]; "
+ "video/x-raw, format = (string) { NV12, P010_10LE }, "
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]"
+ },
+ {
+ GST_DXVA_CODEC_AV1,
+ "video/x-av1, width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ], "
+ "alignment = (string) frame, profile = (string) main",
+
+ "video/x-raw(memory:D3D11Memory), format = (string) { NV12, P010_10LE }, "
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]; "
+ "video/x-raw, format = (string) { NV12, P010_10LE }, "
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]"
+ },
+};
+/* *INDENT-ON* */
+
void
gst_d3d11_decoder_proxy_class_init (GstElementClass * klass,
GstD3D11DecoderClassData * data, const gchar * author)
std::string long_name;
std::string description;
const gchar *codec_name;
+ GParamFlags param_flags = (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ GstPadTemplate *pad_templ;
+ GstCaps *doc_caps;
+ const GstD3D11DecoderDocCaps *d3d11_doc_caps = nullptr;
g_object_class_install_property (gobject_class, PROP_DECODER_ADAPTER_LUID,
g_param_spec_int64 ("adapter-luid", "Adapter LUID",
"DXGI Adapter LUID (Locally Unique Identifier) of created device",
- G_MININT64, G_MAXINT64, cdata->adapter_luid,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ G_MININT64, G_MAXINT64, 0, param_flags));
g_object_class_install_property (gobject_class, PROP_DECODER_DEVICE_ID,
g_param_spec_uint ("device-id", "Device Id",
- "DXGI Device ID", 0, G_MAXUINT32, 0,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ "DXGI Device ID", 0, G_MAXUINT32, 0, param_flags));
g_object_class_install_property (gobject_class, PROP_DECODER_VENDOR_ID,
g_param_spec_uint ("vendor-id", "Vendor Id",
- "DXGI Vendor ID", 0, G_MAXUINT32, 0,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ "DXGI Vendor ID", 0, G_MAXUINT32, 0, param_flags));
codec_name = gst_dxva_codec_to_string (cdata->codec);
long_name = "Direct3D11/DXVA " + std::string (codec_name) + " " +
gst_element_class_set_metadata (klass, long_name.c_str (),
"Codec/Decoder/Video/Hardware", description.c_str (), author);
- gst_element_class_add_pad_template (klass,
- gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
- data->sink_caps));
- gst_element_class_add_pad_template (klass,
- gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
- data->src_caps));
+ for (guint i = 0; i < G_N_ELEMENTS (doc_caps_list); i++) {
+ if (doc_caps_list[i].codec == cdata->codec) {
+ d3d11_doc_caps = &doc_caps_list[i];
+ break;
+ }
+ }
+
+ g_assert (d3d11_doc_caps);
+
+ pad_templ = gst_pad_template_new ("sink",
+ GST_PAD_SINK, GST_PAD_ALWAYS, data->sink_caps);
+ doc_caps = gst_caps_from_string (d3d11_doc_caps->sink_caps);
+ gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+ gst_caps_unref (doc_caps);
+ gst_element_class_add_pad_template (klass, pad_templ);
+
+ pad_templ = gst_pad_template_new ("src",
+ GST_PAD_SRC, GST_PAD_ALWAYS, data->src_caps);
+ doc_caps = gst_caps_from_string (d3d11_doc_caps->src_caps);
+ gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+ gst_caps_unref (doc_caps);
+ gst_element_class_add_pad_template (klass, pad_templ);
gst_d3d11_decoder_class_data_free (data);
}
/* TODO: INVERSE_TELECINE */
} GstD3D11DeinterlaceMethod;
+DEFINE_ENUM_FLAG_OPERATORS (GstD3D11DeinterlaceMethod);
+
+#define DEINTERLACE_METHOD_ALL \
+ ((GstD3D11DeinterlaceMethod) (GST_D3D11_DEINTERLACE_METHOD_BLEND | \
+ GST_D3D11_DEINTERLACE_METHOD_BOB | \
+ GST_D3D11_DEINTERLACE_METHOD_ADAPTVIE | \
+ GST_D3D11_DEINTERLACE_METHOD_MOTION_COMPENSATION))
+
/**
* GstD3D11DeinterlaceMethod:
*
/* hardcoded maximum queue size for each past/future frame queue */
#define MAX_NUM_REFERENCES 2
+#define DOC_CAPS \
+ "video/x-raw(memory:D3D11Memory), format = (string) { NV12, P010_10LE}, " \
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]; " \
+ "video/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition), " \
+ "format = (string) { NV12, P010_10LE}, " \
+ "width = (int) [ 1, 16384 ], height = (int) [ 1, 16384 ]"
+
typedef struct _GstD3D11Deinterlace
{
GstBaseTransform parent;
GstBaseTransformClass *trans_class = GST_BASE_TRANSFORM_CLASS (klass);
GstD3D11DeinterlaceClassData *cdata = (GstD3D11DeinterlaceClassData *) data;
gchar *long_name;
+ GstPadTemplate *pad_templ;
+ GstCaps *doc_caps;
parent_class = (GstElementClass *) g_type_class_peek_parent (klass);
g_object_class_install_property (gobject_class, PROP_ADAPTER,
g_param_spec_uint ("adapter", "Adapter",
"DXGI Adapter index for creating device",
- 0, G_MAXUINT32, cdata->adapter,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ 0, G_MAXUINT32, 0,
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_DEVICE_ID,
g_param_spec_uint ("device-id", "Device Id",
"DXGI Device ID", 0, G_MAXUINT32, 0,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_VENDOR_ID,
g_param_spec_uint ("vendor-id", "Vendor Id",
"DXGI Vendor ID", 0, G_MAXUINT32, 0,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_METHOD,
g_param_spec_flags ("method", "Method",
"Deinterlace Method. Use can set multiple methods as a flagset "
"and element will select one of method automatically. "
"If deinterlacing device failed to deinterlace with given mode, "
"fallback might happen by the device",
- GST_TYPE_D3D11_DEINTERLACE_METHOD, cdata->device_caps.default_method,
- (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_READY)));
g_object_class_install_property (gobject_class, PROP_SUPPORTED_METHODS,
g_param_spec_flags ("supported-methods", "Supported Methods",
"Set of supported deinterlace methods by device",
- GST_TYPE_D3D11_DEINTERLACE_METHOD,
- cdata->device_caps.supported_methods,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
element_class->set_context =
GST_DEBUG_FUNCPTR (gst_d3d11_deinterlace_set_context);
"Seungha Yang <seungha@centricular.com>");
g_free (long_name);
- gst_element_class_add_pad_template (element_class,
- gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
- cdata->sink_caps));
- gst_element_class_add_pad_template (element_class,
- gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
- cdata->src_caps));
+ doc_caps = gst_caps_from_string (DOC_CAPS);
+ pad_templ = gst_pad_template_new ("sink",
+ GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+ gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+ gst_element_class_add_pad_template (element_class, pad_templ);
+
+ pad_templ = gst_pad_template_new ("src",
+ GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+ gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+ gst_element_class_add_pad_template (element_class, pad_templ);
+ gst_caps_unref (doc_caps);
trans_class->passthrough_on_same_caps = TRUE;
#define GST_D3D11_DEINTERLACE_BIN_CAPS_MAKE(format) \
"video/x-raw, " \
"format = (string) " format ", " \
- "width = (int) [1, 8192], " \
- "height = (int) [1, 8192] "
+ "width = (int) [1, 16384], " \
+ "height = (int) [1, 16384] "
#define GST_D3D11_DEINTERLACE_BIN_CAPS_MAKE_WITH_FEATURES(features,format) \
"video/x-raw(" features "), " \
"format = (string) " format ", " \
- "width = (int) [1, 8192], " \
- "height = (int) [1, 8192] "
+ "width = (int) [1, 16384], " \
+ "height = (int) [1, 16384] "
static GstStaticPadTemplate bin_sink_template_caps =
GST_STATIC_PAD_TEMPLATE ("sink",
g_object_class_install_property (gobject_class, PROP_BIN_ADAPTER,
g_param_spec_uint ("adapter", "Adapter",
"DXGI Adapter index for creating device",
- 0, G_MAXUINT32, cdata->adapter,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ 0, G_MAXUINT32, 0,
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_BIN_DEVICE_ID,
g_param_spec_uint ("device-id", "Device Id",
"DXGI Device ID", 0, G_MAXUINT32, 0,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_BIN_VENDOR_ID,
g_param_spec_uint ("vendor-id", "Vendor Id",
"DXGI Vendor ID", 0, G_MAXUINT32, 0,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_BIN_METHOD,
g_param_spec_flags ("method", "Method",
"Deinterlace Method. Use can set multiple methods as a flagset "
"and element will select one of method automatically. "
"If deinterlacing device failed to deinterlace with given mode, "
"fallback might happen by the device",
- GST_TYPE_D3D11_DEINTERLACE_METHOD, cdata->device_caps.default_method,
- (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_READY)));
g_object_class_install_property (gobject_class, PROP_BIN_SUPPORTED_METHODS,
g_param_spec_flags ("supported-methods", "Supported Methods",
"Set of supported deinterlace methods by device",
- GST_TYPE_D3D11_DEINTERLACE_METHOD,
- cdata->device_caps.supported_methods,
- (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+ GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
+ (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
long_name = g_strdup_printf ("Direct3D11 %s Deinterlacer Bin",
cdata->description);
/* FIXME: Check supported resolution, it would be different from
* supported max texture dimension */
gst_caps_set_simple (caps,
- "width", GST_TYPE_INT_RANGE, 1, 8192,
- "height", GST_TYPE_INT_RANGE, 1, 8192, NULL);
+ "width", GST_TYPE_INT_RANGE, 1, 16384,
+ "height", GST_TYPE_INT_RANGE, 1, 16384, NULL);
gst_caps_set_value (caps, "format", supported_formats);
g_value_unset (supported_formats);
g_free (supported_formats);
} GstD3D11ScreenCaptureAPI;
#ifdef HAVE_WINRT_CAPTURE
+/**
+ * GstD3D11ScreenCaptureAPI:
+ *
+ * Since: 1.22
+ */
#define GST_TYPE_D3D11_SCREEN_CAPTURE_API (gst_d3d11_screen_capture_api_get_type())
static GType
gst_d3d11_screen_capture_api_get_type (void)
GST_D3D11_CALL_ONCE_BEGIN {
static const GEnumValue api_types[] = {
+ /**
+ * GstD3D11ScreenCaptureAPI::dxgi:
+ *
+ * Since: 1.22
+ */
{GST_D3D11_SCREEN_CAPTURE_API_DXGI, "DXGI Desktop Duplication", "dxgi"},
+
+ /**
+ * GstD3D11ScreenCaptureAPI::wgc:
+ *
+ * Since: 1.22
+ */
{GST_D3D11_SCREEN_CAPTURE_API_WGC, "Windows Graphics Capture", "wgc"},
{0, nullptr, nullptr},
};
DEFAULT_SHOW_CURSOR,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+ /**
+ * GstD3D11ScreenCaptureSrc:crop-x:
+ *
+ * Horizontal coordinate of top left corner for the screen capture area
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_CROP_X,
g_param_spec_uint ("crop-x", "Crop X",
"Horizontal coordinate of top left corner for the screen capture area",
0, G_MAXUINT, 0,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+ /**
+ * GstD3D11ScreenCaptureSrc:crop-y:
+ *
+ * Vertical coordinate of top left corner for the screen capture area
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_CROP_Y,
g_param_spec_uint ("crop-y", "Crop Y",
"Vertical coordinate of top left corner for the screen capture area",
0, G_MAXUINT, 0,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+ /**
+ * GstD3D11ScreenCaptureSrc:crop-width:
+ *
+ * Width of screen capture area (0 = maximum)
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_CROP_WIDTH,
g_param_spec_uint ("crop-width", "Crop Width",
"Width of screen capture area (0 = maximum)",
0, G_MAXUINT, 0,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+ /**
+ * GstD3D11ScreenCaptureSrc:crop-height:
+ *
+ * Height of screen capture area (0 = maximum)
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_CROP_HEIGHT,
g_param_spec_uint ("crop-height", "Crop Height",
"Height of screen capture area (0 = maximum)",
#ifdef HAVE_WINRT_CAPTURE
if (gst_d3d11_winrt_capture_load_library ()) {
+ /**
+ * GstD3D11ScreenCaptureSrc:window-handle:
+ *
+ * HWND window handle to capture
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_WINDOW_HANDLE,
g_param_spec_uint64 ("window-handle", "Window Handle",
"A HWND handle of window to capture",
(GParamFlags) (G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
GST_PARAM_CONDITIONALLY_AVAILABLE | G_PARAM_STATIC_STRINGS)));
+ /**
+ * GstD3D11ScreenCaptureSrc:show-border:
+ *
+ * Show border lines to capture area when WGC mode is selected.
+ * This feature requires Windows11 or newer
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_SHOW_BORDER,
g_param_spec_boolean ("show-border", "Show Border",
"Show border lines to capture area when WGC mode is selected",
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE | G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS)));
+ /**
+ * GstD3D11ScreenCaptureSrc:capture-api:
+ *
+ * Capture API to use
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_CAPTURE_API,
g_param_spec_enum ("capture-api", "Capture API", "Capture API to use",
GST_TYPE_D3D11_SCREEN_CAPTURE_API,
DEFAULT_CAPTURE_API,
(GParamFlags) (G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
GST_PARAM_CONDITIONALLY_AVAILABLE | G_PARAM_STATIC_STRINGS)));
-
+ gst_type_mark_as_plugin_api (GST_TYPE_D3D11_SCREEN_CAPTURE_API,
+ (GstPluginAPIFlags) 0);
+
+ /**
+ * GstD3D11ScreenCaptureSrc:adapter:
+ *
+ * DXGI Adapter index for creating device when WGC mode is selected
+ *
+ * Since: 1.22
+ */
g_object_class_install_property (gobject_class, PROP_ADAPTER,
g_param_spec_int ("adapter", "Adapter",
"DXGI Adapter index for creating device when WGC mode is selected "
GST_D3D11_TEST_SRC_CHECKERS8,
} GstD3D11TestSrcPattern;
+/**
+ * GstD3D11TestSrcPattern:
+ *
+ * Since: 1.22
+ */
#define GST_TYPE_D3D11_TEST_SRC_PATTERN (gst_d3d11_test_src_pattern_get_type ())
static GType
gst_d3d11_test_src_pattern_get_type (void)
#define DEFAULT_DISPLAY_FORMAT DXGI_FORMAT_UNKNOWN
#define DEFAULT_EMIT_PRESENT FALSE
+/**
+ * GstD3D11VideoSinkDisplayFormat:
+ *
+ * Swapchain's DXGI format
+ *
+ * Since: 1.22
+ */
#define GST_TYPE_D3D11_VIDEO_SINK_DISPLAY_FORMAT (gst_d3d11_video_sink_display_format_type())
static GType
gst_d3d11_video_sink_display_format_type (void)
GST_D3D11_CALL_ONCE_BEGIN {
static const GEnumValue format_types[] = {
+ /**
+ * GstD3D11VideoSinkDisplayFormat::unknown:
+ *
+ * Since: 1.22
+ */
{DXGI_FORMAT_UNKNOWN, "DXGI_FORMAT_UNKNOWN", "unknown"},
+
+ /**
+ * GstD3D11VideoSinkDisplayFormat::r10g10b10a2-unorm:
+ *
+ * Since: 1.22
+ */
{DXGI_FORMAT_R10G10B10A2_UNORM,
"DXGI_FORMAT_R10G10B10A2_UNORM", "r10g10b10a2-unorm"},
+
+ /**
+ * GstD3D11VideoSinkDisplayFormat::r8g8b8a8-unorm:
+ *
+ * Since: 1.22
+ */
{DXGI_FORMAT_R8G8B8A8_UNORM,
"DXGI_FORMAT_R8G8B8A8_UNORM", "r8g8b8a8-unorm"},
+
+ /**
+ * GstD3D11VideoSinkDisplayFormat::b8g8r8a8-unorm:
+ *
+ * Since: 1.22
+ */
{DXGI_FORMAT_B8G8R8A8_UNORM,
"DXGI_FORMAT_B8G8R8A8_UNORM", "b8g8r8a8-unorm"},
{0, nullptr, nullptr},
/**
* GstD3D11VideoSink::present
* @videosink: the #GstD3D11VideoSink
- * @device: a #GstD3D11Device handle
+ * @device: a GstD3D11Device object
* @render_target: a ID3D11RenderTargetView handle of swapchain's backbuffer
*
* Emitted just before presenting a texture via the IDXGISwapChain::Present.
* The client can perform additional rendering on the given @render_target,
* or can read the content already rendered on the swapchain's backbuffer.
*
- * This signal will be emitted with gst_d3d11_device_lock() taken and
+ * This signal will be emitted with gst_d3d11_device_lock taken and
* client should perform GPU operation from the thread where this signal
* emitted.
*
gst_d3d11_video_sink_signals[SIGNAL_PRESENT] =
g_signal_new ("present", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, nullptr, nullptr, nullptr,
- G_TYPE_NONE, 2, GST_TYPE_D3D11_DEVICE, G_TYPE_POINTER);
+ G_TYPE_NONE, 2, GST_TYPE_OBJECT, G_TYPE_POINTER);
element_class->set_context =
GST_DEBUG_FUNCPTR (gst_d3d11_video_sink_set_context);