Commit 8d0dc4fd authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Mathieu Duponchelle

plugins: Update for documentation of Windows plugins

* Add Since marks
* Make use of GST_PARAM_CONDITIONALLY_AVAILABLE flag
parent 76793ffa
......@@ -71,6 +71,13 @@ gst_d3d11_base_filter_class_init (GstD3D11BaseFilterClass * klass)
gobject_class->get_property = gst_d3d11_base_filter_get_property;
gobject_class->dispose = gst_d3d11_base_filter_dispose;
/**
* GstD3D11BaseFilter:adapter:
*
* Adapter index for creating device (-1 for default)
*
* Since: 1.18
*/
g_object_class_install_property (gobject_class, PROP_ADAPTER,
g_param_spec_int ("adapter", "Adapter",
"Adapter index for creating device (-1 for default)",
......@@ -89,6 +96,8 @@ gst_d3d11_base_filter_class_init (GstD3D11BaseFilterClass * klass)
trans_class->get_unit_size =
GST_DEBUG_FUNCPTR (gst_d3d11_base_filter_get_unit_size);
trans_class->query = GST_DEBUG_FUNCPTR (gst_d3d11_base_filter_query);
gst_type_mark_as_plugin_api (GST_TYPE_D3D11_BASE_FILTER, 0);
}
static void
......
......@@ -173,6 +173,8 @@ gst_d3d11_video_sink_class_init (GstD3D11VideoSinkClass * klass)
videosink_class->show_frame =
GST_DEBUG_FUNCPTR (gst_d3d11_video_sink_show_frame);
gst_type_mark_as_plugin_api (GST_D3D11_WINDOW_TOGGLE_MODE_GET_TYPE, 0);
}
static void
......
......@@ -67,6 +67,12 @@ plugin_init (GstPlugin * plugin)
GstD3D11Device *device = NULL;
GstRank video_sink_rank = GST_RANK_NONE;
/**
* plugin-gstd3d11:
*
* 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");
......
......@@ -58,6 +58,8 @@ gst_mf_audio_enc_class_init (GstMFAudioEncClass * klass)
GST_DEBUG_FUNCPTR (gst_mf_audio_enc_handle_frame);
audioenc_class->flush =
GST_DEBUG_FUNCPTR (gst_mf_audio_enc_flush);
gst_type_mark_as_plugin_api (GST_TYPE_MF_AUDIO_ENC, (GstPluginAPIFlags) 0);
}
static void
......
This diff is collapsed.
This diff is collapsed.
......@@ -58,6 +58,8 @@ gst_mf_video_enc_class_init (GstMFVideoEncClass * klass)
GST_DEBUG_FUNCPTR (gst_mf_video_enc_handle_frame);
videoenc_class->finish = GST_DEBUG_FUNCPTR (gst_mf_video_enc_finish);
videoenc_class->flush = GST_DEBUG_FUNCPTR (gst_mf_video_enc_flush);
gst_type_mark_as_plugin_api (GST_TYPE_MF_VIDEO_ENC, (GstPluginAPIFlags) 0);
}
static void
......
......@@ -163,6 +163,7 @@ typedef struct
guint32 enum_flags;
guint device_index;
GstMFVP9EncDeviceCaps device_caps;
gboolean is_default;
} GstMFVP9EncClassData;
static GstElementClass *parent_class = NULL;
......@@ -201,68 +202,80 @@ gst_mf_vp9_enc_class_init (GstMFVP9EncClass * klass, gpointer data)
if (device_caps->rc_mode) {
g_object_class_install_property (gobject_class, PROP_RC_MODE,
g_param_spec_enum ("rc-mode", "Rate Control Mode",
"Rate Control Mode "
"(Exposed only if supported by device)",
"Rate Control Mode",
GST_TYPE_MF_VP9_ENC_RC_MODE, DEFAULT_RC_MODE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
/* NOTE: documentation will be done by only for default device */
if (cdata->is_default) {
gst_type_mark_as_plugin_api (GST_TYPE_MF_VP9_ENC_RC_MODE,
(GstPluginAPIFlags) 0);
}
}
if (device_caps->max_bitrate) {
g_object_class_install_property (gobject_class, PROP_MAX_BITRATE,
g_param_spec_uint ("max-bitrate", "Max Bitrate",
"The maximum bitrate applied when rc-mode is \"pcvbr\" in kbit/sec "
"(0 = MFT default) (Exposed only if supported by device)", 0,
(G_MAXUINT >> 10),
"(0 = MFT default)", 0, (G_MAXUINT >> 10),
DEFAULT_MAX_BITRATE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->quality_vs_speed) {
g_object_class_install_property (gobject_class, PROP_QUALITY_VS_SPEED,
g_param_spec_uint ("quality-vs-speed", "Quality Vs Speed",
"Quality and speed tradeoff, [0, 33]: Low complexity, "
"[34, 66]: Medium complexity, [67, 100]: High complexity "
"(Exposed only if supported by device)", 0, 100,
"[34, 66]: Medium complexity, [67, 100]: High complexity", 0, 100,
DEFAULT_QUALITY_VS_SPEED,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->gop_size) {
g_object_class_install_property (gobject_class, PROP_GOP_SIZE,
g_param_spec_uint ("gop-size", "GOP size",
"The number of pictures from one GOP header to the next, "
"(0 = MFT default) "
"(Exposed only if supported by device)", 0, G_MAXUINT - 1,
"(0 = MFT default)", 0, G_MAXUINT - 1,
DEFAULT_GOP_SIZE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->threads) {
g_object_class_install_property (gobject_class, PROP_THREADS,
g_param_spec_uint ("threads", "Threads",
"The number of worker threads used by a encoder, "
"(0 = MFT default) "
"(Exposed only if supported by device)", 0, 16,
"(0 = MFT default)", 0, 16,
DEFAULT_THREADS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->content_type) {
g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE,
g_param_spec_enum ("content-type", "Content Type",
"Indicates the type of video content "
"(Exposed only if supported by device)",
"Indicates the type of video content",
GST_TYPE_MF_VP9_ENC_CONTENT_TYPE, DEFAULT_CONTENT_TYPE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
/* NOTE: documentation will be done by only for default device */
if (cdata->is_default) {
gst_type_mark_as_plugin_api (GST_TYPE_MF_VP9_ENC_CONTENT_TYPE,
(GstPluginAPIFlags) 0);
}
}
if (device_caps->low_latency) {
g_object_class_install_property (gobject_class, PROP_LOW_LATENCY,
g_param_spec_boolean ("low-latency", "Low Latency",
"Enable low latency encoding "
"(Exposed only if supported by device)",
"Enable low latency encoding",
DEFAULT_LOW_LATENCY,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
long_name = g_strdup_printf ("Media Foundation %s", cdata->device_name);
......@@ -572,6 +585,8 @@ gst_mf_vp9_enc_register (GstPlugin * plugin, guint rank,
i++;
}
cdata->is_default = is_default;
type =
g_type_register_static (GST_TYPE_MF_VIDEO_ENC, type_name, &type_info,
(GTypeFlags) 0);
......
......@@ -49,6 +49,12 @@ plugin_init (GstPlugin * plugin)
HRESULT hr;
GstRank rank = GST_RANK_SECONDARY;
/**
* plugin-gstmediafoundation:
*
* Since: 1.18
*/
GST_DEBUG_CATEGORY_INIT (gst_mf_debug, "mf", 0, "media foundation");
GST_DEBUG_CATEGORY_INIT (gst_mf_utils_debug,
"mfutils", 0, "media foundation utility functions");
......
......@@ -164,6 +164,8 @@ gst_wasapi_sink_class_init (GstWasapiSinkClass * klass)
GST_DEBUG_CATEGORY_INIT (gst_wasapi_sink_debug, "wasapisink",
0, "Windows audio session API sink");
gst_type_mark_as_plugin_api (GST_WASAPI_DEVICE_TYPE_ROLE, 0);
}
static void
......
......@@ -168,6 +168,8 @@ gst_wasapi_src_class_init (GstWasapiSrcClass * klass)
GST_DEBUG_CATEGORY_INIT (gst_wasapi_src_debug, "wasapisrc",
0, "Windows audio session API source");
gst_type_mark_as_plugin_api (GST_WASAPI_DEVICE_TYPE_ROLE, 0);
}
static void
......
......@@ -35,6 +35,12 @@ plugin_init (GstPlugin * plugin)
{
GstRank rank = GST_RANK_SECONDARY;
/**
* plugin-gstwasapi2:
*
* Since: 1.18
*/
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* If we are building for UWP, wasapi2 plugin should have the highest rank */
rank = GST_RANK_PRIMARY + 1;
......
......@@ -576,6 +576,11 @@ gst_dxgi_screen_cap_src_register (GstPlugin * plugin, GstRank rank)
return;
}
/**
* element-dxgiscreencapsrc:
*
* Since: 1.18
*/
gst_element_register (plugin, "dxgiscreencapsrc",
rank, GST_TYPE_DXGI_SCREEN_CAP_SRC);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment