d3d11: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related properties * Add doc caps * Increase deinterlace max resolution Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
This commit is contained in:
parent
31be056b6e
commit
6974b6f6ff
@ -8490,63 +8490,8 @@
|
|||||||
"GstD3D11CompositorBackground::checker",
|
"GstD3D11CompositorBackground::checker",
|
||||||
"GstD3D11CompositorBackground::transparent",
|
"GstD3D11CompositorBackground::transparent",
|
||||||
"GstD3D11CompositorBackground::white",
|
"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",
|
||||||
"GstD3D11CompositorPad:alpha",
|
"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:height",
|
||||||
"GstD3D11CompositorPad:sizing-policy",
|
"GstD3D11CompositorPad:sizing-policy",
|
||||||
"GstD3D11CompositorPad:width",
|
"GstD3D11CompositorPad:width",
|
||||||
|
@ -91,6 +91,11 @@ typedef enum
|
|||||||
GST_D3D11_COMPOSITOR_OPERATOR_OVER,
|
GST_D3D11_COMPOSITOR_OPERATOR_OVER,
|
||||||
} GstD3D11CompositorOperator;
|
} GstD3D11CompositorOperator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstD3D11CompositorOperator:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
#define GST_TYPE_D3D11_COMPOSITOR_OPERATOR (gst_d3d11_compositor_operator_get_type())
|
#define GST_TYPE_D3D11_COMPOSITOR_OPERATOR (gst_d3d11_compositor_operator_get_type())
|
||||||
static GType
|
static GType
|
||||||
gst_d3d11_compositor_operator_get_type (void)
|
gst_d3d11_compositor_operator_get_type (void)
|
||||||
@ -393,6 +398,14 @@ gst_d3d11_compositor_pad_class_init (GstD3D11CompositorPadClass * klass)
|
|||||||
g_object_class_install_property (object_class, PROP_PAD_ALPHA,
|
g_object_class_install_property (object_class, PROP_PAD_ALPHA,
|
||||||
g_param_spec_double ("alpha", "Alpha", "Alpha of the picture", 0.0, 1.0,
|
g_param_spec_double ("alpha", "Alpha", "Alpha of the picture", 0.0, 1.0,
|
||||||
DEFAULT_PAD_ALPHA, param_flags));
|
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_object_class_install_property (object_class, PROP_PAD_OPERATOR,
|
||||||
g_param_spec_enum ("operator", "Operator",
|
g_param_spec_enum ("operator", "Operator",
|
||||||
"Blending operator to use for blending this pad over the previous ones",
|
"Blending operator to use for blending this pad over the previous ones",
|
||||||
|
@ -2283,6 +2283,81 @@ gst_d3d11_decoder_class_data_free (GstD3D11DecoderClassData * data)
|
|||||||
g_free (data);
|
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
|
void
|
||||||
gst_d3d11_decoder_proxy_class_init (GstElementClass * klass,
|
gst_d3d11_decoder_proxy_class_init (GstElementClass * klass,
|
||||||
GstD3D11DecoderClassData * data, const gchar * author)
|
GstD3D11DecoderClassData * data, const gchar * author)
|
||||||
@ -2292,22 +2367,24 @@ gst_d3d11_decoder_proxy_class_init (GstElementClass * klass,
|
|||||||
std::string long_name;
|
std::string long_name;
|
||||||
std::string description;
|
std::string description;
|
||||||
const gchar *codec_name;
|
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_object_class_install_property (gobject_class, PROP_DECODER_ADAPTER_LUID,
|
||||||
g_param_spec_int64 ("adapter-luid", "Adapter LUID",
|
g_param_spec_int64 ("adapter-luid", "Adapter LUID",
|
||||||
"DXGI Adapter LUID (Locally Unique Identifier) of created device",
|
"DXGI Adapter LUID (Locally Unique Identifier) of created device",
|
||||||
G_MININT64, G_MAXINT64, cdata->adapter_luid,
|
G_MININT64, G_MAXINT64, 0, param_flags));
|
||||||
(GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_DECODER_DEVICE_ID,
|
g_object_class_install_property (gobject_class, PROP_DECODER_DEVICE_ID,
|
||||||
g_param_spec_uint ("device-id", "Device Id",
|
g_param_spec_uint ("device-id", "Device Id",
|
||||||
"DXGI Device ID", 0, G_MAXUINT32, 0,
|
"DXGI Device ID", 0, G_MAXUINT32, 0, param_flags));
|
||||||
(GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_DECODER_VENDOR_ID,
|
g_object_class_install_property (gobject_class, PROP_DECODER_VENDOR_ID,
|
||||||
g_param_spec_uint ("vendor-id", "Vendor Id",
|
g_param_spec_uint ("vendor-id", "Vendor Id",
|
||||||
"DXGI Vendor ID", 0, G_MAXUINT32, 0,
|
"DXGI Vendor ID", 0, G_MAXUINT32, 0, param_flags));
|
||||||
(GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
|
||||||
|
|
||||||
codec_name = gst_dxva_codec_to_string (cdata->codec);
|
codec_name = gst_dxva_codec_to_string (cdata->codec);
|
||||||
long_name = "Direct3D11/DXVA " + std::string (codec_name) + " " +
|
long_name = "Direct3D11/DXVA " + std::string (codec_name) + " " +
|
||||||
@ -2318,12 +2395,28 @@ gst_d3d11_decoder_proxy_class_init (GstElementClass * klass,
|
|||||||
gst_element_class_set_metadata (klass, long_name.c_str (),
|
gst_element_class_set_metadata (klass, long_name.c_str (),
|
||||||
"Codec/Decoder/Video/Hardware", description.c_str (), author);
|
"Codec/Decoder/Video/Hardware", description.c_str (), author);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (klass,
|
for (guint i = 0; i < G_N_ELEMENTS (doc_caps_list); i++) {
|
||||||
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
if (doc_caps_list[i].codec == cdata->codec) {
|
||||||
data->sink_caps));
|
d3d11_doc_caps = &doc_caps_list[i];
|
||||||
gst_element_class_add_pad_template (klass,
|
break;
|
||||||
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
}
|
||||||
data->src_caps));
|
}
|
||||||
|
|
||||||
|
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);
|
gst_d3d11_decoder_class_data_free (data);
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,14 @@ typedef enum
|
|||||||
/* TODO: INVERSE_TELECINE */
|
/* TODO: INVERSE_TELECINE */
|
||||||
} GstD3D11DeinterlaceMethod;
|
} 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:
|
* GstD3D11DeinterlaceMethod:
|
||||||
*
|
*
|
||||||
@ -204,6 +212,13 @@ enum
|
|||||||
/* hardcoded maximum queue size for each past/future frame queue */
|
/* hardcoded maximum queue size for each past/future frame queue */
|
||||||
#define MAX_NUM_REFERENCES 2
|
#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
|
typedef struct _GstD3D11Deinterlace
|
||||||
{
|
{
|
||||||
GstBaseTransform parent;
|
GstBaseTransform parent;
|
||||||
@ -316,6 +331,8 @@ gst_d3d11_deinterlace_class_init (GstD3D11DeinterlaceClass * klass,
|
|||||||
GstBaseTransformClass *trans_class = GST_BASE_TRANSFORM_CLASS (klass);
|
GstBaseTransformClass *trans_class = GST_BASE_TRANSFORM_CLASS (klass);
|
||||||
GstD3D11DeinterlaceClassData *cdata = (GstD3D11DeinterlaceClassData *) data;
|
GstD3D11DeinterlaceClassData *cdata = (GstD3D11DeinterlaceClassData *) data;
|
||||||
gchar *long_name;
|
gchar *long_name;
|
||||||
|
GstPadTemplate *pad_templ;
|
||||||
|
GstCaps *doc_caps;
|
||||||
|
|
||||||
parent_class = (GstElementClass *) g_type_class_peek_parent (klass);
|
parent_class = (GstElementClass *) g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
@ -326,31 +343,35 @@ gst_d3d11_deinterlace_class_init (GstD3D11DeinterlaceClass * klass,
|
|||||||
g_object_class_install_property (gobject_class, PROP_ADAPTER,
|
g_object_class_install_property (gobject_class, PROP_ADAPTER,
|
||||||
g_param_spec_uint ("adapter", "Adapter",
|
g_param_spec_uint ("adapter", "Adapter",
|
||||||
"DXGI Adapter index for creating device",
|
"DXGI Adapter index for creating device",
|
||||||
0, G_MAXUINT32, cdata->adapter,
|
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_DEVICE_ID,
|
g_object_class_install_property (gobject_class, PROP_DEVICE_ID,
|
||||||
g_param_spec_uint ("device-id", "Device Id",
|
g_param_spec_uint ("device-id", "Device Id",
|
||||||
"DXGI Device ID", 0, G_MAXUINT32, 0,
|
"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_object_class_install_property (gobject_class, PROP_VENDOR_ID,
|
||||||
g_param_spec_uint ("vendor-id", "Vendor Id",
|
g_param_spec_uint ("vendor-id", "Vendor Id",
|
||||||
"DXGI Vendor ID", 0, G_MAXUINT32, 0,
|
"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_object_class_install_property (gobject_class, PROP_METHOD,
|
||||||
g_param_spec_flags ("method", "Method",
|
g_param_spec_flags ("method", "Method",
|
||||||
"Deinterlace Method. Use can set multiple methods as a flagset "
|
"Deinterlace Method. Use can set multiple methods as a flagset "
|
||||||
"and element will select one of method automatically. "
|
"and element will select one of method automatically. "
|
||||||
"If deinterlacing device failed to deinterlace with given mode, "
|
"If deinterlacing device failed to deinterlace with given mode, "
|
||||||
"fallback might happen by the device",
|
"fallback might happen by the device",
|
||||||
GST_TYPE_D3D11_DEINTERLACE_METHOD, cdata->device_caps.default_method,
|
GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
(GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||||
GST_PARAM_MUTABLE_READY)));
|
GST_PARAM_MUTABLE_READY)));
|
||||||
g_object_class_install_property (gobject_class, PROP_SUPPORTED_METHODS,
|
g_object_class_install_property (gobject_class, PROP_SUPPORTED_METHODS,
|
||||||
g_param_spec_flags ("supported-methods", "Supported Methods",
|
g_param_spec_flags ("supported-methods", "Supported Methods",
|
||||||
"Set of supported deinterlace methods by device",
|
"Set of supported deinterlace methods by device",
|
||||||
GST_TYPE_D3D11_DEINTERLACE_METHOD,
|
GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
|
||||||
cdata->device_caps.supported_methods,
|
(GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
|
||||||
(GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
||||||
|
|
||||||
element_class->set_context =
|
element_class->set_context =
|
||||||
GST_DEBUG_FUNCPTR (gst_d3d11_deinterlace_set_context);
|
GST_DEBUG_FUNCPTR (gst_d3d11_deinterlace_set_context);
|
||||||
@ -363,12 +384,17 @@ gst_d3d11_deinterlace_class_init (GstD3D11DeinterlaceClass * klass,
|
|||||||
"Seungha Yang <seungha@centricular.com>");
|
"Seungha Yang <seungha@centricular.com>");
|
||||||
g_free (long_name);
|
g_free (long_name);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (element_class,
|
doc_caps = gst_caps_from_string (DOC_CAPS);
|
||||||
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
pad_templ = gst_pad_template_new ("sink",
|
||||||
cdata->sink_caps));
|
GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
|
||||||
gst_element_class_add_pad_template (element_class,
|
gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
|
||||||
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
gst_element_class_add_pad_template (element_class, pad_templ);
|
||||||
cdata->src_caps));
|
|
||||||
|
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;
|
trans_class->passthrough_on_same_caps = TRUE;
|
||||||
|
|
||||||
@ -1982,14 +2008,14 @@ static GstElementClass *bin_parent_class = NULL;
|
|||||||
#define GST_D3D11_DEINTERLACE_BIN_CAPS_MAKE(format) \
|
#define GST_D3D11_DEINTERLACE_BIN_CAPS_MAKE(format) \
|
||||||
"video/x-raw, " \
|
"video/x-raw, " \
|
||||||
"format = (string) " format ", " \
|
"format = (string) " format ", " \
|
||||||
"width = (int) [1, 8192], " \
|
"width = (int) [1, 16384], " \
|
||||||
"height = (int) [1, 8192] "
|
"height = (int) [1, 16384] "
|
||||||
|
|
||||||
#define GST_D3D11_DEINTERLACE_BIN_CAPS_MAKE_WITH_FEATURES(features,format) \
|
#define GST_D3D11_DEINTERLACE_BIN_CAPS_MAKE_WITH_FEATURES(features,format) \
|
||||||
"video/x-raw(" features "), " \
|
"video/x-raw(" features "), " \
|
||||||
"format = (string) " format ", " \
|
"format = (string) " format ", " \
|
||||||
"width = (int) [1, 8192], " \
|
"width = (int) [1, 16384], " \
|
||||||
"height = (int) [1, 8192] "
|
"height = (int) [1, 16384] "
|
||||||
|
|
||||||
static GstStaticPadTemplate bin_sink_template_caps =
|
static GstStaticPadTemplate bin_sink_template_caps =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
@ -2053,31 +2079,35 @@ gst_d3d11_deinterlace_bin_class_init (GstD3D11DeinterlaceBinClass * klass,
|
|||||||
g_object_class_install_property (gobject_class, PROP_BIN_ADAPTER,
|
g_object_class_install_property (gobject_class, PROP_BIN_ADAPTER,
|
||||||
g_param_spec_uint ("adapter", "Adapter",
|
g_param_spec_uint ("adapter", "Adapter",
|
||||||
"DXGI Adapter index for creating device",
|
"DXGI Adapter index for creating device",
|
||||||
0, G_MAXUINT32, cdata->adapter,
|
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_DEVICE_ID,
|
g_object_class_install_property (gobject_class, PROP_BIN_DEVICE_ID,
|
||||||
g_param_spec_uint ("device-id", "Device Id",
|
g_param_spec_uint ("device-id", "Device Id",
|
||||||
"DXGI Device ID", 0, G_MAXUINT32, 0,
|
"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_object_class_install_property (gobject_class, PROP_BIN_VENDOR_ID,
|
||||||
g_param_spec_uint ("vendor-id", "Vendor Id",
|
g_param_spec_uint ("vendor-id", "Vendor Id",
|
||||||
"DXGI Vendor ID", 0, G_MAXUINT32, 0,
|
"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_object_class_install_property (gobject_class, PROP_BIN_METHOD,
|
||||||
g_param_spec_flags ("method", "Method",
|
g_param_spec_flags ("method", "Method",
|
||||||
"Deinterlace Method. Use can set multiple methods as a flagset "
|
"Deinterlace Method. Use can set multiple methods as a flagset "
|
||||||
"and element will select one of method automatically. "
|
"and element will select one of method automatically. "
|
||||||
"If deinterlacing device failed to deinterlace with given mode, "
|
"If deinterlacing device failed to deinterlace with given mode, "
|
||||||
"fallback might happen by the device",
|
"fallback might happen by the device",
|
||||||
GST_TYPE_D3D11_DEINTERLACE_METHOD, cdata->device_caps.default_method,
|
GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
(GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||||
GST_PARAM_MUTABLE_READY)));
|
GST_PARAM_MUTABLE_READY)));
|
||||||
g_object_class_install_property (gobject_class, PROP_BIN_SUPPORTED_METHODS,
|
g_object_class_install_property (gobject_class, PROP_BIN_SUPPORTED_METHODS,
|
||||||
g_param_spec_flags ("supported-methods", "Supported Methods",
|
g_param_spec_flags ("supported-methods", "Supported Methods",
|
||||||
"Set of supported deinterlace methods by device",
|
"Set of supported deinterlace methods by device",
|
||||||
GST_TYPE_D3D11_DEINTERLACE_METHOD,
|
GST_TYPE_D3D11_DEINTERLACE_METHOD, DEINTERLACE_METHOD_ALL,
|
||||||
cdata->device_caps.supported_methods,
|
(GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
|
||||||
(GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
||||||
|
|
||||||
long_name = g_strdup_printf ("Direct3D11 %s Deinterlacer Bin",
|
long_name = g_strdup_printf ("Direct3D11 %s Deinterlacer Bin",
|
||||||
cdata->description);
|
cdata->description);
|
||||||
@ -2371,8 +2401,8 @@ gst_d3d11_deinterlace_register (GstPlugin * plugin, GstD3D11Device * device,
|
|||||||
/* FIXME: Check supported resolution, it would be different from
|
/* FIXME: Check supported resolution, it would be different from
|
||||||
* supported max texture dimension */
|
* supported max texture dimension */
|
||||||
gst_caps_set_simple (caps,
|
gst_caps_set_simple (caps,
|
||||||
"width", GST_TYPE_INT_RANGE, 1, 8192,
|
"width", GST_TYPE_INT_RANGE, 1, 16384,
|
||||||
"height", GST_TYPE_INT_RANGE, 1, 8192, NULL);
|
"height", GST_TYPE_INT_RANGE, 1, 16384, NULL);
|
||||||
gst_caps_set_value (caps, "format", supported_formats);
|
gst_caps_set_value (caps, "format", supported_formats);
|
||||||
g_value_unset (supported_formats);
|
g_value_unset (supported_formats);
|
||||||
g_free (supported_formats);
|
g_free (supported_formats);
|
||||||
|
@ -75,6 +75,11 @@ typedef enum
|
|||||||
} GstD3D11ScreenCaptureAPI;
|
} GstD3D11ScreenCaptureAPI;
|
||||||
|
|
||||||
#ifdef HAVE_WINRT_CAPTURE
|
#ifdef HAVE_WINRT_CAPTURE
|
||||||
|
/**
|
||||||
|
* GstD3D11ScreenCaptureAPI:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
#define GST_TYPE_D3D11_SCREEN_CAPTURE_API (gst_d3d11_screen_capture_api_get_type())
|
#define GST_TYPE_D3D11_SCREEN_CAPTURE_API (gst_d3d11_screen_capture_api_get_type())
|
||||||
static GType
|
static GType
|
||||||
gst_d3d11_screen_capture_api_get_type (void)
|
gst_d3d11_screen_capture_api_get_type (void)
|
||||||
@ -83,7 +88,18 @@ gst_d3d11_screen_capture_api_get_type (void)
|
|||||||
|
|
||||||
GST_D3D11_CALL_ONCE_BEGIN {
|
GST_D3D11_CALL_ONCE_BEGIN {
|
||||||
static const GEnumValue api_types[] = {
|
static const GEnumValue api_types[] = {
|
||||||
|
/**
|
||||||
|
* GstD3D11ScreenCaptureAPI::dxgi:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
{GST_D3D11_SCREEN_CAPTURE_API_DXGI, "DXGI Desktop Duplication", "dxgi"},
|
{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"},
|
{GST_D3D11_SCREEN_CAPTURE_API_WGC, "Windows Graphics Capture", "wgc"},
|
||||||
{0, nullptr, nullptr},
|
{0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
@ -214,24 +230,52 @@ gst_d3d11_screen_capture_src_class_init (GstD3D11ScreenCaptureSrcClass * klass)
|
|||||||
DEFAULT_SHOW_CURSOR,
|
DEFAULT_SHOW_CURSOR,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
(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_object_class_install_property (gobject_class, PROP_CROP_X,
|
||||||
g_param_spec_uint ("crop-x", "Crop X",
|
g_param_spec_uint ("crop-x", "Crop X",
|
||||||
"Horizontal coordinate of top left corner for the screen capture area",
|
"Horizontal coordinate of top left corner for the screen capture area",
|
||||||
0, G_MAXUINT, 0,
|
0, G_MAXUINT, 0,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
(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_object_class_install_property (gobject_class, PROP_CROP_Y,
|
||||||
g_param_spec_uint ("crop-y", "Crop Y",
|
g_param_spec_uint ("crop-y", "Crop Y",
|
||||||
"Vertical coordinate of top left corner for the screen capture area",
|
"Vertical coordinate of top left corner for the screen capture area",
|
||||||
0, G_MAXUINT, 0,
|
0, G_MAXUINT, 0,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
(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_object_class_install_property (gobject_class, PROP_CROP_WIDTH,
|
||||||
g_param_spec_uint ("crop-width", "Crop Width",
|
g_param_spec_uint ("crop-width", "Crop Width",
|
||||||
"Width of screen capture area (0 = maximum)",
|
"Width of screen capture area (0 = maximum)",
|
||||||
0, G_MAXUINT, 0,
|
0, G_MAXUINT, 0,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
(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_object_class_install_property (gobject_class, PROP_CROP_HEIGHT,
|
||||||
g_param_spec_uint ("crop-height", "Crop Height",
|
g_param_spec_uint ("crop-height", "Crop Height",
|
||||||
"Height of screen capture area (0 = maximum)",
|
"Height of screen capture area (0 = maximum)",
|
||||||
@ -240,6 +284,13 @@ gst_d3d11_screen_capture_src_class_init (GstD3D11ScreenCaptureSrcClass * klass)
|
|||||||
|
|
||||||
#ifdef HAVE_WINRT_CAPTURE
|
#ifdef HAVE_WINRT_CAPTURE
|
||||||
if (gst_d3d11_winrt_capture_load_library ()) {
|
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_object_class_install_property (gobject_class, PROP_WINDOW_HANDLE,
|
||||||
g_param_spec_uint64 ("window-handle", "Window Handle",
|
g_param_spec_uint64 ("window-handle", "Window Handle",
|
||||||
"A HWND handle of window to capture",
|
"A HWND handle of window to capture",
|
||||||
@ -247,6 +298,14 @@ gst_d3d11_screen_capture_src_class_init (GstD3D11ScreenCaptureSrcClass * klass)
|
|||||||
(GParamFlags) (G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
|
(GParamFlags) (G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
|
||||||
GST_PARAM_CONDITIONALLY_AVAILABLE | G_PARAM_STATIC_STRINGS)));
|
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_object_class_install_property (gobject_class, PROP_SHOW_BORDER,
|
||||||
g_param_spec_boolean ("show-border", "Show Border",
|
g_param_spec_boolean ("show-border", "Show Border",
|
||||||
"Show border lines to capture area when WGC mode is selected",
|
"Show border lines to capture area when WGC mode is selected",
|
||||||
@ -254,13 +313,29 @@ gst_d3d11_screen_capture_src_class_init (GstD3D11ScreenCaptureSrcClass * klass)
|
|||||||
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE | G_PARAM_READWRITE
|
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE | G_PARAM_READWRITE
|
||||||
| G_PARAM_STATIC_STRINGS)));
|
| 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_object_class_install_property (gobject_class, PROP_CAPTURE_API,
|
||||||
g_param_spec_enum ("capture-api", "Capture API", "Capture API to use",
|
g_param_spec_enum ("capture-api", "Capture API", "Capture API to use",
|
||||||
GST_TYPE_D3D11_SCREEN_CAPTURE_API,
|
GST_TYPE_D3D11_SCREEN_CAPTURE_API,
|
||||||
DEFAULT_CAPTURE_API,
|
DEFAULT_CAPTURE_API,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
|
(GParamFlags) (G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
|
||||||
GST_PARAM_CONDITIONALLY_AVAILABLE | G_PARAM_STATIC_STRINGS)));
|
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_object_class_install_property (gobject_class, PROP_ADAPTER,
|
||||||
g_param_spec_int ("adapter", "Adapter",
|
g_param_spec_int ("adapter", "Adapter",
|
||||||
"DXGI Adapter index for creating device when WGC mode is selected "
|
"DXGI Adapter index for creating device when WGC mode is selected "
|
||||||
|
@ -68,6 +68,11 @@ typedef enum
|
|||||||
GST_D3D11_TEST_SRC_CHECKERS8,
|
GST_D3D11_TEST_SRC_CHECKERS8,
|
||||||
} GstD3D11TestSrcPattern;
|
} GstD3D11TestSrcPattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstD3D11TestSrcPattern:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
#define GST_TYPE_D3D11_TEST_SRC_PATTERN (gst_d3d11_test_src_pattern_get_type ())
|
#define GST_TYPE_D3D11_TEST_SRC_PATTERN (gst_d3d11_test_src_pattern_get_type ())
|
||||||
static GType
|
static GType
|
||||||
gst_d3d11_test_src_pattern_get_type (void)
|
gst_d3d11_test_src_pattern_get_type (void)
|
||||||
|
@ -78,6 +78,13 @@ enum
|
|||||||
#define DEFAULT_DISPLAY_FORMAT DXGI_FORMAT_UNKNOWN
|
#define DEFAULT_DISPLAY_FORMAT DXGI_FORMAT_UNKNOWN
|
||||||
#define DEFAULT_EMIT_PRESENT FALSE
|
#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())
|
#define GST_TYPE_D3D11_VIDEO_SINK_DISPLAY_FORMAT (gst_d3d11_video_sink_display_format_type())
|
||||||
static GType
|
static GType
|
||||||
gst_d3d11_video_sink_display_format_type (void)
|
gst_d3d11_video_sink_display_format_type (void)
|
||||||
@ -86,11 +93,34 @@ gst_d3d11_video_sink_display_format_type (void)
|
|||||||
|
|
||||||
GST_D3D11_CALL_ONCE_BEGIN {
|
GST_D3D11_CALL_ONCE_BEGIN {
|
||||||
static const GEnumValue format_types[] = {
|
static const GEnumValue format_types[] = {
|
||||||
|
/**
|
||||||
|
* GstD3D11VideoSinkDisplayFormat::unknown:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
{DXGI_FORMAT_UNKNOWN, "DXGI_FORMAT_UNKNOWN", "unknown"},
|
{DXGI_FORMAT_UNKNOWN, "DXGI_FORMAT_UNKNOWN", "unknown"},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstD3D11VideoSinkDisplayFormat::r10g10b10a2-unorm:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
{DXGI_FORMAT_R10G10B10A2_UNORM,
|
{DXGI_FORMAT_R10G10B10A2_UNORM,
|
||||||
"DXGI_FORMAT_R10G10B10A2_UNORM", "r10g10b10a2-unorm"},
|
"DXGI_FORMAT_R10G10B10A2_UNORM", "r10g10b10a2-unorm"},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstD3D11VideoSinkDisplayFormat::r8g8b8a8-unorm:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
{DXGI_FORMAT_R8G8B8A8_UNORM,
|
{DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||||
"DXGI_FORMAT_R8G8B8A8_UNORM", "r8g8b8a8-unorm"},
|
"DXGI_FORMAT_R8G8B8A8_UNORM", "r8g8b8a8-unorm"},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstD3D11VideoSinkDisplayFormat::b8g8r8a8-unorm:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
{DXGI_FORMAT_B8G8R8A8_UNORM,
|
{DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||||
"DXGI_FORMAT_B8G8R8A8_UNORM", "b8g8r8a8-unorm"},
|
"DXGI_FORMAT_B8G8R8A8_UNORM", "b8g8r8a8-unorm"},
|
||||||
{0, nullptr, nullptr},
|
{0, nullptr, nullptr},
|
||||||
@ -412,14 +442,14 @@ gst_d3d11_video_sink_class_init (GstD3D11VideoSinkClass * klass)
|
|||||||
/**
|
/**
|
||||||
* GstD3D11VideoSink::present
|
* GstD3D11VideoSink::present
|
||||||
* @videosink: the #GstD3D11VideoSink
|
* @videosink: the #GstD3D11VideoSink
|
||||||
* @device: a #GstD3D11Device handle
|
* @device: a GstD3D11Device object
|
||||||
* @render_target: a ID3D11RenderTargetView handle of swapchain's backbuffer
|
* @render_target: a ID3D11RenderTargetView handle of swapchain's backbuffer
|
||||||
*
|
*
|
||||||
* Emitted just before presenting a texture via the IDXGISwapChain::Present.
|
* Emitted just before presenting a texture via the IDXGISwapChain::Present.
|
||||||
* The client can perform additional rendering on the given @render_target,
|
* The client can perform additional rendering on the given @render_target,
|
||||||
* or can read the content already rendered on the swapchain's backbuffer.
|
* 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
|
* client should perform GPU operation from the thread where this signal
|
||||||
* emitted.
|
* emitted.
|
||||||
*
|
*
|
||||||
@ -428,7 +458,7 @@ gst_d3d11_video_sink_class_init (GstD3D11VideoSinkClass * klass)
|
|||||||
gst_d3d11_video_sink_signals[SIGNAL_PRESENT] =
|
gst_d3d11_video_sink_signals[SIGNAL_PRESENT] =
|
||||||
g_signal_new ("present", G_TYPE_FROM_CLASS (klass),
|
g_signal_new ("present", G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST, 0, nullptr, nullptr, nullptr,
|
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 =
|
element_class->set_context =
|
||||||
GST_DEBUG_FUNCPTR (gst_d3d11_video_sink_set_context);
|
GST_DEBUG_FUNCPTR (gst_d3d11_video_sink_set_context);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user