summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-02-21 17:38:38 +0900
committerSeungha Yang <seungha@centricular.com>2021-02-23 03:34:11 +0900
commit8794f4b713d950eba64bda2309cf78cacb20b2a0 (patch)
tree2fa060a52c4a24ad0d9ff37e203235013d7beba4 /sys
parent6c6237fe508d932e6a2d09763d69ef394c88ada7 (diff)
downloadgstreamer-plugins-bad-8794f4b713d950eba64bda2309cf78cacb20b2a0.tar.gz
d3d11: Documentation update
* Update class metadata * for wrapper bin elements to be distinguishable from internal element. * D3D11 -> Direct3D11 for consistency * Add missing Since mark everywhere * Update plugin cache Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
Diffstat (limited to 'sys')
-rw-r--r--sys/d3d11/gstd3d11compositor.c35
-rw-r--r--sys/d3d11/gstd3d11compositorbin.c35
-rw-r--r--sys/d3d11/gstd3d11deinterlace.cpp42
-rw-r--r--sys/d3d11/gstd3d11desktopdupsrc.c13
-rw-r--r--sys/d3d11/gstd3d11download.c24
-rw-r--r--sys/d3d11/gstd3d11h264dec.c19
-rw-r--r--sys/d3d11/gstd3d11h265dec.c19
-rw-r--r--sys/d3d11/gstd3d11mpeg2dec.c21
-rw-r--r--sys/d3d11/gstd3d11upload.c19
-rw-r--r--sys/d3d11/gstd3d11videosink.c44
-rw-r--r--sys/d3d11/gstd3d11videosinkbin.c63
-rw-r--r--sys/d3d11/gstd3d11vp8dec.c21
-rw-r--r--sys/d3d11/gstd3d11vp9dec.c21
-rw-r--r--sys/d3d11/plugin.c6
14 files changed, 337 insertions, 45 deletions
diff --git a/sys/d3d11/gstd3d11compositor.c b/sys/d3d11/gstd3d11compositor.c
index f8bad2894..4a41cc93e 100644
--- a/sys/d3d11/gstd3d11compositor.c
+++ b/sys/d3d11/gstd3d11compositor.c
@@ -22,6 +22,16 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11compositorelement
+ * @title: d3d11compositorelement
+ *
+ * A Direct3D11 based video compositing element.
+ *
+ * Since: 1.20
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -47,6 +57,8 @@ GST_DEBUG_CATEGORY_EXTERN (gst_d3d11_compositor_debug);
* Find the minimum of source 1 and source 2
* @GST_D3D11_COMPOSITOR_BLEND_OP_MAX:
* Find the maximum of source 1 and source 2
+ *
+ * Since: 1.20
*/
GType
gst_d3d11_compositor_blend_operation_get_type (void)
@@ -167,6 +179,8 @@ gst_d3d11_compositor_blend_operation_to_native (GstD3D11CompositorBlendOperation
* ID3D11DeviceContext::OMSetBlendState.
* The pre-blend operation inverts the blend factor,
* generating 1 - blend_factor.
+ *
+ * Since: 1.20
*/
GType
gst_d3d11_compositor_blend_get_type (void)
@@ -290,6 +304,13 @@ gst_d3d11_compositor_blend_to_native (GstD3D11CompositorBlend blend)
return D3D11_BLEND_ZERO;
}
+/**
+ * GstD3D11CompositorBackground:
+ *
+ * Background mode
+ *
+ * Since: 1.20
+ */
GType
gst_d3d11_compositor_background_get_type (void)
{
@@ -359,6 +380,11 @@ static const gchar checker_ps_src[] =
"}\n";
/* *INDENT-ON* */
+/**
+ * GstD3D11CompositorPad:
+ *
+ * Since: 1.20
+ */
struct _GstD3D11CompositorPad
{
GstVideoAggregatorConvertPad parent;
@@ -566,6 +592,9 @@ gst_d3d11_compositor_pad_class_init (GstD3D11CompositorPadClass * klass)
GST_DEBUG_FUNCPTR (gst_d3d11_compositor_pad_prepare_frame);
vaggpadclass->clean_frame =
GST_DEBUG_FUNCPTR (gst_d3d11_compositor_pad_clean_frame);
+
+ gst_type_mark_as_plugin_api (GST_TYPE_D3D11_COMPOSITOR_BLEND, 0);
+ gst_type_mark_as_plugin_api (GST_TYPE_D3D11_COMPOSITOR_BLEND_OPERATION, 0);
}
static void
@@ -1329,8 +1358,10 @@ gst_d3d11_compositor_class_init (GstD3D11CompositorClass * klass)
gst_element_class_set_static_metadata (element_class, "Direct3D11 Compositor",
"Filter/Editor/Video/Compositor",
- "Composite multiple video streams via D3D11 API",
- "Seungha Yang <seungha@centricular.com>");
+ "A Direct3D11 compositor", "Seungha Yang <seungha@centricular.com>");
+
+ gst_type_mark_as_plugin_api (GST_TYPE_COMPOSITOR_BACKGROUND, 0);
+ gst_type_mark_as_plugin_api (GST_TYPE_D3D11_COMPOSITOR_PAD, 0);
}
static void
diff --git a/sys/d3d11/gstd3d11compositorbin.c b/sys/d3d11/gstd3d11compositorbin.c
index 25fb07cf8..e50c1a299 100644
--- a/sys/d3d11/gstd3d11compositorbin.c
+++ b/sys/d3d11/gstd3d11compositorbin.c
@@ -19,6 +19,25 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11compositor
+ * @title: d3d11compositor
+ *
+ * A convenient bin which wraps #d3d11compositorelement for video composition
+ * with other helper elements to handle color conversion and memory transfer
+ * between Direct3D11 and system memory space.
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 d3d11compositor name=c ! d3d11videosink \
+ * videotestsrc ! video/x-raw,width=320,height=240 ! c. \
+ * videotestsrc pattern=ball ! video/x-raw,width=100,height=100 ! c.
+ * ```
+ *
+ * Since: 1.20
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -54,6 +73,11 @@ enum
static guint gst_d3d11_compositor_bin_pad_signals[SIGNAL_PAD_LAST] = { 0 };
+/**
+ * GstD3D11CompositorBinPad:
+ *
+ * Since: 1.20
+ */
struct _GstD3D11CompositorBinPad
{
GstGhostPad parent;
@@ -225,6 +249,11 @@ enum
#define DEFAULT_INPUT_BLEND_DEST_RGB GST_D3D11_COMPOSITOR_BLEND_INV_SRC_ALPHA
#define DEFAULT_INPUT_BLEND_DEST_ALPHA GST_D3D11_COMPOSITOR_BLEND_INV_SRC_ALPHA
+/**
+ * GstD3D11CompositorBinInput:
+ *
+ * Since: 1.20
+ */
struct _GstD3D11CompositorBinInput
{
GstD3D11CompositorBinPad parent;
@@ -544,8 +573,7 @@ gst_d3d11_compositor_bin_class_init (GstD3D11CompositorBinClass * klass)
gst_element_class_set_static_metadata (element_class,
"Direct3D11 Compositor Bin",
"Filter/Editor/Video/Compositor",
- "Composite multiple video streams via D3D11 API",
- "Seungha Yang <seungha@centricular.com>");
+ "A Direct3D11 compositor bin", "Seungha Yang <seungha@centricular.com>");
caps = gst_d3d11_get_updated_template_caps (&sink_template_caps);
gst_element_class_add_pad_template (element_class,
@@ -612,6 +640,9 @@ gst_d3d11_compositor_bin_class_init (GstD3D11CompositorBinClass * klass)
g_param_spec_enum ("background", "Background", "Background type",
GST_TYPE_COMPOSITOR_BACKGROUND,
DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ gst_type_mark_as_plugin_api (GST_TYPE_D3D11_COMPOSITOR_BIN_PAD, 0);
+ gst_type_mark_as_plugin_api (GST_TYPE_D3D11_COMPOSITOR_BIN_INPUT, 0);
}
static void
diff --git a/sys/d3d11/gstd3d11deinterlace.cpp b/sys/d3d11/gstd3d11deinterlace.cpp
index 170d88a65..8188b8e09 100644
--- a/sys/d3d11/gstd3d11deinterlace.cpp
+++ b/sys/d3d11/gstd3d11deinterlace.cpp
@@ -17,6 +17,19 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11deinterlaceelement
+ * @title: d3d11deinterlaceelement
+ *
+ * Deinterlacing interlaced video frames to progressive video frames by using
+ * ID3D11VideoProcessor API. Depending on the hardware it runs on,
+ * this element will only support a very limited set of video formats.
+ * Use #d3d11deinterlace instead, which will take care of conversion.
+ *
+ * Since: 1.20
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -101,6 +114,13 @@ typedef enum
/* TODO: INVERSE_TELECINE */
} GstD3D11DeinterlaceMethod;
+/**
+ * GstD3D11DeinterlaceMethod:
+ *
+ * Deinterlacing method
+ *
+ * Since: 1.20
+ */
#define GST_TYPE_D3D11_DEINTERLACE_METHOD (gst_d3d11_deinterlace_method_type())
static GType
@@ -400,6 +420,9 @@ gst_d3d11_deinterlace_class_init (GstD3D11DeinterlaceClass * klass,
klass->device_caps = cdata->device_caps;
gst_d3d11_deinterlace_class_data_unref (cdata);
+
+ gst_type_mark_as_plugin_api (GST_TYPE_D3D11_DEINTERLACE_METHOD,
+ (GstPluginAPIFlags) 0);
}
static void
@@ -1853,6 +1876,23 @@ done:
return ret;
}
+/**
+ * SECTION:element-d3d11deinterlace
+ * @title: d3d11deinterlace
+ * @short_description: A Direct3D11 based deinterlace element
+ *
+ * Deinterlacing interlaced video frames to progressive video frames by using
+ * ID3D11VideoProcessor API.
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/h264/file ! parsebin ! d3d11h264dec ! d3d11deinterlace ! d3d11videosink
+ * ```
+ *
+ * Since: 1.20
+ *
+ */
+
/* GstD3D11DeinterlaceBin */
enum
{
@@ -1999,7 +2039,7 @@ gst_d3d11_deinterlace_bin_class_init (GstD3D11DeinterlaceBinClass * klass,
cdata->description);
gst_element_class_set_metadata (element_class, long_name,
"Filter/Effect/Video/Deinterlace/Hardware",
- "A Direct3D11 based deinterlacer",
+ "A Direct3D11 based deinterlacer bin",
"Seungha Yang <seungha@centricular.com>");
g_free (long_name);
diff --git a/sys/d3d11/gstd3d11desktopdupsrc.c b/sys/d3d11/gstd3d11desktopdupsrc.c
index 191ef6e1b..5d8bbb3ea 100644
--- a/sys/d3d11/gstd3d11desktopdupsrc.c
+++ b/sys/d3d11/gstd3d11desktopdupsrc.c
@@ -22,15 +22,14 @@
* SECTION:element-d3d11desktopdupsrc
* @title: d3d11desktopdupsrc
*
- * This element uses DXGI Desktop Duplication API.
- * The default is capturing the whole desktop, but #GstD3D11DesktopDupSrc:x,
- * #GstD3D11DesktopDupSrc:y, #GstD3D11DesktopDupSrc:width and
- * #GstD3D11DesktopDupSrc:height can be used to select a particular region.
+ * A DXGI Desktop Duplication API based screen capture element
*
- * ## Example pipelines
- * |[
+ * ## Example launch line
+ * ```
* gst-launch-1.0 d3d11desktopdupsrc ! queue ! d3d11videosink
- * ]| Capture the desktop and display it.
+ * ```
+ *
+ * Since: 1.20
*/
#ifdef HAVE_CONFIG_H
diff --git a/sys/d3d11/gstd3d11download.c b/sys/d3d11/gstd3d11download.c
index d2ce88319..8191bd5aa 100644
--- a/sys/d3d11/gstd3d11download.c
+++ b/sys/d3d11/gstd3d11download.c
@@ -17,6 +17,28 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11download
+ * @title: d3d11download
+ * @short_description: Downloads Direct3D11 texture memory into system memory
+ *
+ * Downloads Direct3D11 texture memory into system memory
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=test_h264.mp4 ! parsebin ! d3d11h264dec ! \
+ * d3d11convert ! d3d11download ! video/x-raw,width=640,height=480 ! mfh264enc ! \
+ * h264parse ! mp4mux ! filesink location=output.mp4
+ * ```
+ * This pipeline will resize decoded (by #d3d11h264dec) frames to 640x480
+ * resolution by using #d3d11convert. Then it will be copied into system memory
+ * by d3d11download. Finally downloaded frames will be encoded as a new
+ * H.264 stream via #mfh264enc and muxed via mp4mux
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -102,7 +124,7 @@ gst_d3d11_download_class_init (GstD3D11DownloadClass * klass)
gst_element_class_set_static_metadata (element_class,
"Direct3D11 downloader", "Filter/Video",
- "Downloads D3D11 texture memory into system memory",
+ "Downloads Direct3D11 texture memory into system memory",
"Seungha Yang <seungha.yang@navercorp.com>");
trans_class->passthrough_on_same_caps = TRUE;
diff --git a/sys/d3d11/gstd3d11h264dec.c b/sys/d3d11/gstd3d11h264dec.c
index f26553588..104a5f13d 100644
--- a/sys/d3d11/gstd3d11h264dec.c
+++ b/sys/d3d11/gstd3d11h264dec.c
@@ -47,6 +47,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * SECTION:element-d3d11h264dec
+ * @title: d3d11h264dec
+ *
+ * A Direct3D11/DXVA based H.264 video decoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/h264/file ! parsebin ! d3d11h264dec ! d3d11videosink
+ * ```
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -202,11 +217,11 @@ gst_d3d11_h264_dec_class_init (GstD3D11H264DecClass * klass, gpointer data)
element_class->set_context =
GST_DEBUG_FUNCPTR (gst_d3d11_h264_dec_set_context);
- long_name = g_strdup_printf ("Direct3D11 H.264 %s Decoder",
+ long_name = g_strdup_printf ("Direct3D11/DXVA H.264 %s Decoder",
cdata->description);
gst_element_class_set_metadata (element_class, long_name,
"Codec/Decoder/Video/Hardware",
- "A Direct3D11 based H.264 video decoder",
+ "A Direct3D11/DXVA H.264 video decoder",
"Seungha Yang <seungha.yang@navercorp.com>");
g_free (long_name);
diff --git a/sys/d3d11/gstd3d11h265dec.c b/sys/d3d11/gstd3d11h265dec.c
index 7f5b0e5f6..9bd8cc112 100644
--- a/sys/d3d11/gstd3d11h265dec.c
+++ b/sys/d3d11/gstd3d11h265dec.c
@@ -17,6 +17,21 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11h265dec
+ * @title: d3d11h265dec
+ *
+ * A Direct3D11/DXVA based H.265 video decoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/hevc/file ! parsebin ! d3d11h265dec ! d3d11videosink
+ * ```
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -174,11 +189,11 @@ gst_d3d11_h265_dec_class_init (GstD3D11H265DecClass * klass, gpointer data)
element_class->set_context =
GST_DEBUG_FUNCPTR (gst_d3d11_h265_dec_set_context);
- long_name = g_strdup_printf ("Direct3D11 H.265 %s Decoder",
+ long_name = g_strdup_printf ("Direct3D11/DXVA H.265 %s Decoder",
cdata->description);
gst_element_class_set_metadata (element_class, long_name,
"Codec/Decoder/Video/Hardware",
- "A Direct3D11 based H.265 video decoder",
+ "A Direct3D11/DXVA H.265 video decoder",
"Seungha Yang <seungha.yang@navercorp.com>");
g_free (long_name);
diff --git a/sys/d3d11/gstd3d11mpeg2dec.c b/sys/d3d11/gstd3d11mpeg2dec.c
index f9b6da9b0..b9682d83e 100644
--- a/sys/d3d11/gstd3d11mpeg2dec.c
+++ b/sys/d3d11/gstd3d11mpeg2dec.c
@@ -17,6 +17,21 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11mpeg2dec
+ * @title: d3d11mpeg2dec
+ *
+ * A Direct3D11/DXVA based MPEG-2 video decoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/mpeg2/file ! parsebin ! d3d11mpeg2dec ! d3d11videosink
+ * ```
+ *
+ * Since: 1.20
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -167,9 +182,9 @@ gst_d3d11_mpeg2_dec_class_init (GstD3D11Mpeg2DecClass * klass, gpointer data)
GST_DEBUG_FUNCPTR (gst_d3d11_mpeg2_dec_set_context);
long_name =
- g_strdup_printf ("Direct3D11 MPEG2 %s Decoder", cdata->description);
+ g_strdup_printf ("Direct3D11/DXVA MPEG2 %s Decoder", cdata->description);
gst_element_class_set_metadata (element_class, long_name,
- "Codec/Decoder/Video/Hardware", "A Direct3D11 based MPEG2 video decoder",
+ "Codec/Decoder/Video/Hardware", "A Direct3D11/DXVA MPEG2 video decoder",
"Seungha Yang <seungha@centricular.com>");
g_free (long_name);
@@ -606,6 +621,7 @@ gst_d3d11_mpeg2_dec_start_picture (GstMpeg2Decoder * decoder,
break;
}
+ /* *INDENT-OFF* */
pic_params.wPicWidthInMBminus1 = self->width_in_mb - 1;
pic_params.wPicHeightInMBminus1 = (self->height_in_mb >> is_field) - 1;
pic_params.bMacroblockWidthMinus1 = 15;
@@ -624,6 +640,7 @@ gst_d3d11_mpeg2_dec_start_picture (GstMpeg2Decoder * decoder,
pic_params.bPicScanMethod = slice->pic_ext->alternate_scan;
pic_params.wBitstreamFcodes = _pack_f_codes (slice->pic_ext->f_code);
pic_params.wBitstreamPCEelements = _pack_pce_elements (slice);
+ /* *INDENT-ON* */
GST_TRACE_OBJECT (self, "Getting picture param decoder buffer");
if (!gst_d3d11_decoder_get_decoder_buffer (self->d3d11_decoder,
diff --git a/sys/d3d11/gstd3d11upload.c b/sys/d3d11/gstd3d11upload.c
index 73ea368a8..39794ccd3 100644
--- a/sys/d3d11/gstd3d11upload.c
+++ b/sys/d3d11/gstd3d11upload.c
@@ -17,6 +17,23 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11upload
+ * @title: d3d11upload
+ *
+ * Upload video frame to Direct3D11 texture memory
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! d3d11upload ! d3d11videosinkelement
+ * ```
+ * This pipeline will upload video test frame (system memory) into Direct3D11
+ * textures and d3d11videosinkelement will display frames on screen.
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -102,7 +119,7 @@ gst_d3d11_upload_class_init (GstD3D11UploadClass * klass)
gst_element_class_set_static_metadata (element_class,
"Direct3D11 uploader", "Filter/Video",
- "Uploads data into D3D11 texture memory",
+ "Uploads data into Direct3D11 texture memory",
"Seungha Yang <seungha.yang@navercorp.com>");
trans_class->passthrough_on_same_caps = TRUE;
diff --git a/sys/d3d11/gstd3d11videosink.c b/sys/d3d11/gstd3d11videosink.c
index c9c3fc7a4..98d43d3ff 100644
--- a/sys/d3d11/gstd3d11videosink.c
+++ b/sys/d3d11/gstd3d11videosink.c
@@ -18,6 +18,24 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11videosinkelement
+ * @title: d3d11videosinkelement
+ *
+ * Direct3D11 based video render element. This element allows only Direct3D11
+ * textures as a input. Use #d3d11videosink instead which is a convenient
+ * wrapper of #d3d11videosinkelement with #d3d11upload.
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! d3d11upload ! d3d11videosinkelement
+ * ```
+ * This pipeline will display test video stream on screen via d3d11videosinkelement
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -221,9 +239,10 @@ gst_d3d11_video_sink_class_init (GstD3D11VideoSinkClass * klass)
/**
* GstD3D11VideoSink:draw-on-shared-texture:
*
- * Instrcut the sink to draw on a shared texture provided by user.
- * User must watch "begin-draw" signal and should call "draw" method
- * on the "begin-draw" signal handler.
+ * Instruct the sink to draw on a shared texture provided by user.
+ * User must watch #d3d11videosinkelement::begin-draw signal and should call
+ * #d3d11videosinkelement::draw method on the #d3d11videosinkelement::begin-draw
+ * signal handler.
*
* Currently supported formats for user texture are:
* - DXGI_FORMAT_R8G8B8A8_UNORM
@@ -247,11 +266,12 @@ gst_d3d11_video_sink_class_init (GstD3D11VideoSinkClass * klass)
G_PARAM_STATIC_STRINGS));
/**
- * GstD3D11VideoSink:begin-draw:
- * @videosink: the d3d11videosink
+ * GstD3D11VideoSink::begin-draw:
+ * @videosink: the #d3d11videosinkelement
*
- * Signal that sink has a texture to draw. Application needs to invoke "draw"
- * action signal before returning from "begin-draw" signal handler.
+ * Emitted when sink has a texture to draw. Application needs to invoke
+ * #d3d11videosinkelement::draw action signal before returning from
+ * #d3d11videosinkelement::begin-draw signal handler.
*
* Since: 1.20
*/
@@ -261,18 +281,18 @@ gst_d3d11_video_sink_class_init (GstD3D11VideoSinkClass * klass)
NULL, NULL, NULL, G_TYPE_NONE, 0, G_TYPE_NONE);
/**
- * GstD3D11VideoSink:draw:
- * @videosink: the d3d11videosink
+ * GstD3D11VideoSink::draw:
+ * @videosink: the #d3d11videosinkelement
* @shard_handle: a pointer to HANDLE
* @texture_misc_flags: a D3D11_RESOURCE_MISC_FLAG value
* @acquire_key: a key value used for IDXGIKeyedMutex::AcquireSync
* @release_key: a key value used for IDXGIKeyedMutex::ReleaseSync
*
- * Draws on shared texture. @shard_handle must be a valid pointer to HANDLE
- * which was obtained via IDXGIResource::GetSharedHandle or
+ * Draws on a shared texture. @shard_handle must be a valid pointer to
+ * a HANDLE which was obtained via IDXGIResource::GetSharedHandle or
* IDXGIResource1::CreateSharedHandle.
*
- * If texture was created with D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag,
+ * If the texture was created with D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag,
* caller must specify valid @acquire_key and @release_key.
* Otherwise (i.e., created with D3D11_RESOURCE_MISC_SHARED flag),
* @acquire_key and @release_key will be ignored.
diff --git a/sys/d3d11/gstd3d11videosinkbin.c b/sys/d3d11/gstd3d11videosinkbin.c
index c73d7fe4e..5107ce895 100644
--- a/sys/d3d11/gstd3d11videosinkbin.c
+++ b/sys/d3d11/gstd3d11videosinkbin.c
@@ -18,6 +18,22 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11videosink
+ * @title: d3d11videosink
+ *
+ * Direct3D11 based video render element
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! d3d11videosink
+ * ```
+ * This pipeline will display test video stream on screen via #d3d11videosink
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -264,6 +280,22 @@ gst_d3d11_video_sink_bin_class_init (GstD3D11VideoSinkBinClass * klass)
GST_PARAM_CONDITIONALLY_AVAILABLE | GST_PARAM_MUTABLE_READY |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
#endif
+
+ /**
+ * GstD3D11VideoSinkBin:draw-on-shared-texture:
+ *
+ * Instruct the sink to draw on a shared texture provided by user.
+ * User must watch #d3d11videosink::begin-draw signal and should call
+ * #d3d11videosink::draw method on the #d3d11videosink::begin-draw
+ * signal handler.
+ *
+ * Currently supported formats for user texture are:
+ * - DXGI_FORMAT_R8G8B8A8_UNORM
+ * - DXGI_FORMAT_B8G8R8A8_UNORM
+ * - DXGI_FORMAT_R10G10B10A2_UNORM
+ *
+ * Since: 1.20
+ */
g_object_class_install_property (gobject_class, PROP_DRAW_ON_SHARED_TEXTURE,
g_param_spec_boolean ("draw-on-shared-texture",
"Draw on shared texture",
@@ -278,11 +310,40 @@ gst_d3d11_video_sink_bin_class_init (GstD3D11VideoSinkBinClass * klass)
G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
G_PARAM_STATIC_STRINGS));
+ /**
+ * GstD3D11VideoSinkBin::begin-draw:
+ * @videosink: the #d3d11videosink
+ *
+ * Emitted when sink has a texture to draw. Application needs to invoke
+ * #d3d11videosink::draw action signal before returning from
+ * #d3d11videosink::begin-draw signal handler.
+ *
+ * Since: 1.20
+ */
gst_d3d11_video_sink_bin_signals[SIGNAL_BEGIN_DRAW] =
g_signal_new ("begin-draw", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstD3D11VideoSinkBinClass, begin_draw),
NULL, NULL, NULL, G_TYPE_NONE, 0, G_TYPE_NONE);
+ /**
+ * GstD3D11VideoSinkBin::draw:
+ * @videosink: the #d3d11videosink
+ * @shard_handle: a pointer to HANDLE
+ * @texture_misc_flags: a D3D11_RESOURCE_MISC_FLAG value
+ * @acquire_key: a key value used for IDXGIKeyedMutex::AcquireSync
+ * @release_key: a key value used for IDXGIKeyedMutex::ReleaseSync
+ *
+ * Draws on a shared texture. @shard_handle must be a valid pointer to
+ * a HANDLE which was obtained via IDXGIResource::GetSharedHandle or
+ * IDXGIResource1::CreateSharedHandle.
+ *
+ * If the texture was created with D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag,
+ * caller must specify valid @acquire_key and @release_key.
+ * Otherwise (i.e., created with D3D11_RESOURCE_MISC_SHARED flag),
+ * @acquire_key and @release_key will be ignored.
+ *
+ * Since: 1.20
+ */
gst_d3d11_video_sink_bin_signals[SIGNAL_DRAW] =
g_signal_new ("draw", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -294,7 +355,7 @@ gst_d3d11_video_sink_bin_class_init (GstD3D11VideoSinkBinClass * klass)
gst_element_class_set_static_metadata (element_class,
"Direct3D11 video sink bin", "Sink/Video",
- "A Direct3D11 based videosink",
+ "A Direct3D11 based videosink bin",
"Seungha Yang <seungha.yang@navercorp.com>");
caps = gst_d3d11_get_updated_template_caps (&pad_template_caps);
diff --git a/sys/d3d11/gstd3d11vp8dec.c b/sys/d3d11/gstd3d11vp8dec.c
index 78394e27b..0990fc0b0 100644
--- a/sys/d3d11/gstd3d11vp8dec.c
+++ b/sys/d3d11/gstd3d11vp8dec.c
@@ -17,6 +17,21 @@
* Boston, MA 02110-1301, USA.
*/
+/**
+ * SECTION:element-d3d11vp8dec
+ * @title: d3d11vp8dec
+ *
+ * A Direct3D11/DXVA based VP8 video decoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/vp8/file ! parsebin ! d3d11vp8dec ! d3d11videosink
+ * ```
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -142,10 +157,10 @@ gst_d3d11_vp8_dec_class_init (GstD3D11Vp8DecClass * klass, gpointer data)
element_class->set_context =
GST_DEBUG_FUNCPTR (gst_d3d11_vp8_dec_set_context);
- long_name = g_strdup_printf ("Direct3D11 VP8 %s Decoder", cdata->description);
+ long_name =
+ g_strdup_printf ("Direct3D11/DXVA VP8 %s Decoder", cdata->description);
gst_element_class_set_metadata (element_class, long_name,
- "Codec/Decoder/Video/Hardware",
- "A Direct3D11 based VP8 video decoder",
+ "Codec/Decoder/Video/Hardware", "A Direct3D11/DXVA VP8 video decoder",
"Seungha Yang <seungha.yang@navercorp.com>");
g_free (long_name);
diff --git a/sys/d3d11/gstd3d11vp9dec.c b/sys/d3d11/gstd3d11vp9dec.c
index f98fb7c00..c74961b57 100644
--- a/sys/d3d11/gstd3d11vp9dec.c
+++ b/sys/d3d11/gstd3d11vp9dec.c
@@ -47,6 +47,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * SECTION:element-d3d11vp9dec
+ * @title: d3d11vp9dec
+ *
+ * A Direct3D11/DXVA based VP9 video decoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/vp9/file ! parsebin ! d3d11vp9dec ! d3d11videosink
+ * ```
+ *
+ * Since: 1.18
+ *
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -180,10 +195,10 @@ gst_d3d11_vp9_dec_class_init (GstD3D11Vp9DecClass * klass, gpointer data)
element_class->set_context =
GST_DEBUG_FUNCPTR (gst_d3d11_vp9_dec_set_context);
- long_name = g_strdup_printf ("Direct3D11 VP9 %s Decoder", cdata->description);
+ long_name =
+ g_strdup_printf ("Direct3D11/DXVA VP9 %s Decoder", cdata->description);
gst_element_class_set_metadata (element_class, long_name,
- "Codec/Decoder/Video/Hardware",
- "A Direct3D11 based VP9 video decoder",
+ "Codec/Decoder/Video/Hardware", "A Direct3D11/DXVA VP9 video decoder",
"Seungha Yang <seungha.yang@navercorp.com>");
g_free (long_name);
diff --git a/sys/d3d11/plugin.c b/sys/d3d11/plugin.c
index eaaaf6fe8..f3d20371d 100644
--- a/sys/d3d11/plugin.c
+++ b/sys/d3d11/plugin.c
@@ -81,12 +81,6 @@ plugin_init (GstPlugin * plugin)
D3D_FEATURE_LEVEL max_feature_level = D3D_FEATURE_LEVEL_9_3;
guint i;
- /**
- * plugin-d3d11:
- *
- * Since: 1.18
- */
-
GST_DEBUG_CATEGORY_INIT (gst_d3d11_debug, "d3d11", 0, "direct3d 11 plugin");
GST_DEBUG_CATEGORY_INIT (gst_d3d11_shader_debug,
"d3d11shader", 0, "d3d11shader");