mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
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>
This commit is contained in:
parent
6c6237fe50
commit
8794f4b713
15 changed files with 1703 additions and 77 deletions
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue