plugins: Update for documentation of Windows plugins

* Add Since marks
* Make use of GST_PARAM_CONDITIONALLY_AVAILABLE flag
This commit is contained in:
Seungha Yang 2020-06-09 00:20:08 +09:00 committed by Mathieu Duponchelle
parent 76793ffabc
commit 8d0dc4fdd2
13 changed files with 235 additions and 149 deletions

View file

@ -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

View file

@ -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

View file

@ -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");

View file

@ -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

View file

@ -258,6 +258,7 @@ typedef struct
guint32 enum_flags;
guint device_index;
GstMFH264EncDeviceCaps device_caps;
gboolean is_default;
} GstMFH264EncClassData;
static GstElementClass *parent_class = NULL;
@ -296,10 +297,16 @@ gst_mf_h264_enc_class_init (GstMFH264EncClass * 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_H264_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_H264_ENC_RC_MODE,
(GstPluginAPIFlags) 0);
}
}
/* quality and qp has the identical meaning but scale is different
@ -307,181 +314,191 @@ gst_mf_h264_enc_class_init (GstMFH264EncClass * klass, gpointer data)
if (device_caps->quality && !device_caps->qp) {
g_object_class_install_property (gobject_class, PROP_QUALITY,
g_param_spec_uint ("quality", "Quality",
"Quality applied when rc-mode is qvbr "
"(Exposed only if supported by device)",
"Quality applied when rc-mode is qvbr",
1, 100, DEFAULT_QUALITY_LEVEL,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->adaptive_mode) {
g_object_class_install_property (gobject_class, PROP_ADAPTIVE_MODE,
g_param_spec_enum ("adaptive-mode", "Adaptive Mode",
"Adaptive Mode (Exposed only if supported by device)",
GST_TYPE_MF_H264_ENC_ADAPTIVE_MODE, DEFAULT_ADAPTIVE_MODE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"Adaptive Mode", GST_TYPE_MF_H264_ENC_ADAPTIVE_MODE,
DEFAULT_ADAPTIVE_MODE,
(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_H264_ENC_ADAPTIVE_MODE,
(GstPluginAPIFlags) 0);
}
}
if (device_caps->buffer_size) {
g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE,
g_param_spec_uint ("vbv-buffer-size", "VBV Buffer Size",
"VBV(HRD) Buffer Size in bytes (0 = MFT default) "
"(Exposed only if supported by device)", 0, G_MAXUINT - 1,
DEFAULT_BUFFER_SIZE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"VBV(HRD) Buffer Size in bytes (0 = MFT default)",
0, G_MAXUINT - 1, DEFAULT_BUFFER_SIZE,
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
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),
DEFAULT_MAX_BITRATE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"The maximum bitrate applied when rc-mode is \"pcvbr\" in kbit/sec",
0, (G_MAXUINT >> 10), DEFAULT_MAX_BITRATE,
(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->cabac) {
g_object_class_install_property (gobject_class, PROP_CABAC,
g_param_spec_boolean ("cabac", "Use CABAC",
"Enable CABAC entropy coding "
"(Exposed only if supported by device)",
"Enable CABAC entropy coding",
DEFAULT_CABAC,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->sps_id) {
g_object_class_install_property (gobject_class, PROP_SPS_ID,
g_param_spec_uint ("sps-id", "SPS Id",
"The SPS id to use "
"(Exposed only if supported by device)", 0, 31,
"The SPS id to use", 0, 31,
DEFAULT_SPS_ID,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->pps_id) {
g_object_class_install_property (gobject_class, PROP_PPS_ID,
g_param_spec_uint ("pps-id", "PPS Id",
"The PPS id to use "
"(Exposed only if supported by device)", 0, 255,
"The PPS id to use", 0, 255,
DEFAULT_PPS_ID,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->bframes) {
g_object_class_install_property (gobject_class, PROP_BFRAMES,
g_param_spec_uint ("bframes", "bframes",
"The maximum number of consecutive B frames, "
"(Exposed only if supported by device)", 0, 2,
"The maximum number of consecutive B frames", 0, 2,
DEFAULT_BFRAMES,
(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,
DEFAULT_GOP_SIZE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"(0 = MFT default)", 0, G_MAXUINT - 1, DEFAULT_GOP_SIZE,
(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,
DEFAULT_THREADS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"The number of worker threads used by a encoder, (0 = MFT default)",
0, 16, DEFAULT_THREADS,
(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_H264_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_H264_ENC_CONTENT_TYPE,
(GstPluginAPIFlags) 0);
}
}
if (device_caps->qp) {
g_object_class_install_property (gobject_class, PROP_QP,
g_param_spec_uint ("qp", "qp",
"QP applied when rc-mode is \"qvbr\" "
"(Exposed only if supported by device)", 16, 51,
"QP applied when rc-mode is \"qvbr\"", 16, 51,
DEFAULT_QP,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
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)));
}
if (device_caps->min_qp) {
g_object_class_install_property (gobject_class, PROP_MIN_QP,
g_param_spec_uint ("min-qp", "Min QP",
"The minimum allowed QP applied to all rc-mode "
"(Exposed only if supported by device)", 0, 51,
"The minimum allowed QP applied to all rc-mode", 0, 51,
DEFAULT_MIN_QP,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->max_qp) {
g_object_class_install_property (gobject_class, PROP_MAX_QP,
g_param_spec_uint ("max-qp", "Max QP",
"The maximum allowed QP applied to all rc-mode "
"(Exposed only if supported by device)", 0, 51,
"The maximum allowed QP applied to all rc-mode", 0, 51,
DEFAULT_MAX_QP,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->frame_type_qp) {
g_object_class_install_property (gobject_class, PROP_QP_I,
g_param_spec_uint ("qp-i", "QP I",
"QP applied to I frames "
"(Exposed only if supported by device)", 0, 51,
"QP applied to I frames", 0, 51,
DEFAULT_QP_I,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_QP_P,
g_param_spec_uint ("qp-p", "QP P",
"QP applied to P frames "
"(Exposed only if supported by device)", 0, 51,
"QP applied to P frames", 0, 51,
DEFAULT_QP_P,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_QP_B,
g_param_spec_uint ("qp-b", "QP B",
"QP applied to B frames "
"(Exposed only if supported by device)", 0, 51,
"QP applied to B frames", 0, 51,
DEFAULT_QP_B,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->max_num_ref) {
g_object_class_install_property (gobject_class, PROP_REF,
g_param_spec_uint ("ref", "Reference Frames",
"The number of reference frames "
"(Exposed only if supported by device)",
"The number of reference frames",
device_caps->max_num_ref_low, device_caps->max_num_ref_high,
DEFAULT_REF,
(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);
@ -1039,6 +1056,8 @@ gst_mf_h264_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);

View file

@ -201,6 +201,7 @@ typedef struct
guint32 enum_flags;
guint device_index;
GstMFH265EncDeviceCaps device_caps;
gboolean is_default;
} GstMFH265EncClassData;
static GstElementClass *parent_class = NULL;
@ -239,146 +240,153 @@ gst_mf_h265_enc_class_init (GstMFH265EncClass * 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_H265_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_H265_ENC_RC_MODE,
(GstPluginAPIFlags) 0);
}
}
if (device_caps->buffer_size) {
g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE,
g_param_spec_uint ("vbv-buffer-size", "VBV Buffer Size",
"VBV(HRD) Buffer Size in bytes (0 = MFT default) "
"(Exposed only if supported by device)", 0, G_MAXUINT - 1,
DEFAULT_BUFFER_SIZE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"VBV(HRD) Buffer Size in bytes (0 = MFT default)",
0, G_MAXUINT - 1, DEFAULT_BUFFER_SIZE,
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
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),
DEFAULT_MAX_BITRATE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"(0 = MFT default)", 0, (G_MAXUINT >> 10), DEFAULT_MAX_BITRATE,
(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,
DEFAULT_QUALITY_VS_SPEED,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"[34, 66]: Medium complexity, [67, 100]: High complexity",
0, 100, DEFAULT_QUALITY_VS_SPEED,
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->bframes) {
g_object_class_install_property (gobject_class, PROP_BFRAMES,
g_param_spec_uint ("bframes", "bframes",
"The maximum number of consecutive B frames, "
"(Exposed only if supported by device)", 0, 2,
DEFAULT_BFRAMES,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"The maximum number of consecutive B frames",
0, 2, DEFAULT_BFRAMES,
(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,
DEFAULT_GOP_SIZE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"(0 = MFT default)", 0, G_MAXUINT - 1, DEFAULT_GOP_SIZE,
(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,
DEFAULT_THREADS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"The number of worker threads used by a encoder, (0 = MFT default)",
0, 16, DEFAULT_THREADS,
(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_H265_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_H265_ENC_CONTENT_TYPE,
(GstPluginAPIFlags) 0);
}
}
if (device_caps->qp) {
g_object_class_install_property (gobject_class, PROP_QP,
g_param_spec_uint ("qp", "qp",
"QP applied when rc-mode is \"qvbr\" "
"(Exposed only if supported by device)", 16, 51,
DEFAULT_QP,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"QP applied when rc-mode is \"qvbr\"", 16, 51, DEFAULT_QP,
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
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)",
DEFAULT_LOW_LATENCY,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"Enable low latency encoding", DEFAULT_LOW_LATENCY,
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->min_qp) {
g_object_class_install_property (gobject_class, PROP_MIN_QP,
g_param_spec_uint ("min-qp", "Min QP",
"The minimum allowed QP applied to all rc-mode "
"(Exposed only if supported by device)", 0, 51,
DEFAULT_MIN_QP,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"The minimum allowed QP applied to all rc-mode",
0, 51, DEFAULT_MIN_QP,
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->max_qp) {
g_object_class_install_property (gobject_class, PROP_MAX_QP,
g_param_spec_uint ("max-qp", "Max QP",
"The maximum allowed QP applied to all rc-mode "
"(Exposed only if supported by device)", 0, 51,
DEFAULT_MAX_QP,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
"The maximum allowed QP applied to all rc-mode",
0, 51, DEFAULT_MAX_QP,
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->frame_type_qp) {
g_object_class_install_property (gobject_class, PROP_QP_I,
g_param_spec_uint ("qp-i", "QP I",
"QP applied to I frames "
"(Exposed only if supported by device)", 0, 51,
"QP applied to I frames", 0, 51,
DEFAULT_QP_I,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_QP_P,
g_param_spec_uint ("qp-p", "QP P",
"QP applied to P frames "
"(Exposed only if supported by device)", 0, 51,
"QP applied to P frames", 0, 51,
DEFAULT_QP_P,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_QP_B,
g_param_spec_uint ("qp-b", "QP B",
"QP applied to B frames "
"(Exposed only if supported by device)", 0, 51,
"QP applied to B frames", 0, 51,
DEFAULT_QP_B,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
}
if (device_caps->max_num_ref) {
g_object_class_install_property (gobject_class, PROP_REF,
g_param_spec_uint ("ref", "Reference Frames",
"The number of reference frames "
"(Exposed only if supported by device)",
"The number of reference frames",
device_caps->max_num_ref_low, device_caps->max_num_ref_high,
DEFAULT_REF,
(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);
@ -809,6 +817,8 @@ gst_mf_h265_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);

View file

@ -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

View file

@ -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);

View file

@ -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");

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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);
}