summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2020-06-08 12:30:59 -0400
committerThibault Saunier <tsaunier@igalia.com>2020-06-09 12:28:13 -0400
commit60fba5f380fac0c77d86bfc95a747d78f99a33b5 (patch)
treec3f427b3db53208ec999c94a2a00273b0ea6a84e
parent3a98a3737532604ddcf465612f4e8d9cb88ea15d (diff)
downloadgstreamer-plugins-bad-60fba5f380fac0c77d86bfc95a747d78f99a33b5.tar.gz
docs: Add some more plugin API types
And allow creating vulkan device object without specifying an instance so it can be introspected.
-rw-r--r--docs/plugins/gst_plugins_cache.json135
-rw-r--r--ext/faac/gstfaac.c3
-rw-r--r--ext/vulkan/vksink.c4
-rw-r--r--gst-libs/gst/vulkan/gstvkphysicaldevice.c8
4 files changed, 148 insertions, 2 deletions
diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json
index 218c47951..58300a816 100644
--- a/docs/plugins/gst_plugins_cache.json
+++ b/docs/plugins/gst_plugins_cache.json
@@ -13287,7 +13287,43 @@
},
"filename": "gstfaac",
"license": "LGPL",
- "other-types": {},
+ "other-types": {
+ "GstFaacBrtype": {
+ "kind": "enum",
+ "values": [
+ {
+ "desc": "VBR",
+ "name": "VBR encoding",
+ "value": "1"
+ },
+ {
+ "desc": "ABR",
+ "name": "ABR encoding",
+ "value": "2"
+ }
+ ]
+ },
+ "GstFaacShortCtl": {
+ "kind": "enum",
+ "values": [
+ {
+ "desc": "SHORTCTL_NORMAL",
+ "name": "Normal block type",
+ "value": "0"
+ },
+ {
+ "desc": "SHORTCTL_NOSHORT",
+ "name": "No short blocks",
+ "value": "1"
+ },
+ {
+ "desc": "SHORTCTL_NOLONG",
+ "name": "No long blocks",
+ "value": "2"
+ }
+ ]
+ }
+ },
"package": "GStreamer Bad Plug-ins git",
"source": "gst-plugins-bad",
"tracers": {},
@@ -178527,6 +178563,103 @@
"filename": "gstvulkan",
"license": "LGPL",
"other-types": {
+ "GstVulkanDevice": {
+ "hierarchy": [
+ "GstVulkanDevice",
+ "GstObject",
+ "GInitiallyUnowned",
+ "GObject"
+ ],
+ "kind": "object",
+ "properties": {
+ "instance": {
+ "blurb": "Associated Vulkan Instance",
+ "conditionally-available": false,
+ "construct": false,
+ "construct-only": false,
+ "controllable": false,
+ "mutable": "playing",
+ "readable": true,
+ "type": "GstVulkanInstance",
+ "writable": false
+ },
+ "physical-device": {
+ "blurb": "Associated Vulkan Physical Device",
+ "conditionally-available": false,
+ "construct": false,
+ "construct-only": true,
+ "controllable": false,
+ "mutable": "playing",
+ "readable": true,
+ "type": "GstVulkanPhysicalDevice",
+ "writable": true
+ }
+ }
+ },
+ "GstVulkanInstance": {
+ "hierarchy": [
+ "GstVulkanInstance",
+ "GstObject",
+ "GInitiallyUnowned",
+ "GObject"
+ ],
+ "kind": "object",
+ "signals": {
+ "create-device": {
+ "args": [],
+ "return-type": "GstVulkanDevice",
+ "when": "last"
+ }
+ }
+ },
+ "GstVulkanPhysicalDevice": {
+ "hierarchy": [
+ "GstVulkanPhysicalDevice",
+ "GstObject",
+ "GInitiallyUnowned",
+ "GObject"
+ ],
+ "kind": "object",
+ "properties": {
+ "device-index": {
+ "blurb": "Device Index",
+ "conditionally-available": false,
+ "construct": false,
+ "construct-only": true,
+ "controllable": false,
+ "default": "0",
+ "max": "-1",
+ "min": "0",
+ "mutable": "playing",
+ "readable": true,
+ "type": "guint",
+ "writable": true
+ },
+ "instance": {
+ "blurb": "Associated Vulkan Instance",
+ "conditionally-available": false,
+ "construct": false,
+ "construct-only": true,
+ "controllable": false,
+ "mutable": "playing",
+ "readable": true,
+ "type": "GstVulkanInstance",
+ "writable": true
+ },
+ "name": {
+ "blurb": "Device Name",
+ "conditionally-available": false,
+ "construct": false,
+ "construct-only": false,
+ "controllable": false,
+ "default": "",
+ "mutable": "playing",
+ "readable": true,
+ "type": "gchararray",
+ "writable": false
+ }
+ }
+ },
"GstVulkanStereoDownmix": {
"kind": "enum",
"values": [
diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c
index 8b861edce..edae8e2ec 100644
--- a/ext/faac/gstfaac.c
+++ b/ext/faac/gstfaac.c
@@ -204,6 +204,9 @@ gst_faac_class_init (GstFaacClass * klass)
"Free MPEG-2/4 AAC encoder",
"Ronald Bultje <rbultje@ronald.bitfreak.net>");
+ gst_type_mark_as_plugin_api (GST_TYPE_FAAC_RATE_CONTROL, 0);
+ gst_type_mark_as_plugin_api (GST_TYPE_FAAC_SHORTCTL, 0);
+
base_class->stop = GST_DEBUG_FUNCPTR (gst_faac_stop);
base_class->set_format = GST_DEBUG_FUNCPTR (gst_faac_set_format);
base_class->handle_frame = GST_DEBUG_FUNCPTR (gst_faac_handle_frame);
diff --git a/ext/vulkan/vksink.c b/ext/vulkan/vksink.c
index 9177b98fc..ef6bde274 100644
--- a/ext/vulkan/vksink.c
+++ b/ext/vulkan/vksink.c
@@ -149,6 +149,10 @@ gst_vulkan_sink_class_init (GstVulkanSinkClass * klass)
gst_element_class_add_static_pad_template (element_class,
&gst_vulkan_sink_template);
+ gst_type_mark_as_plugin_api (GST_TYPE_VULKAN_DEVICE, 0);
+ gst_type_mark_as_plugin_api (GST_TYPE_VULKAN_PHYSICAL_DEVICE, 0);
+ gst_type_mark_as_plugin_api (GST_TYPE_VULKAN_INSTANCE, 0);
+
gobject_class->finalize = gst_vulkan_sink_finalize;
gstelement_class->change_state = gst_vulkan_sink_change_state;
diff --git a/gst-libs/gst/vulkan/gstvkphysicaldevice.c b/gst-libs/gst/vulkan/gstvkphysicaldevice.c
index 9091cb2f6..87de53c6c 100644
--- a/gst-libs/gst/vulkan/gstvkphysicaldevice.c
+++ b/gst-libs/gst/vulkan/gstvkphysicaldevice.c
@@ -112,7 +112,8 @@ gst_vulkan_physical_device_set_property (GObject * object, guint prop_id,
break;
case PROP_DEVICE_ID:{
guint device_id = g_value_get_uint (value);
- if (device_id >= device->instance->n_physical_devices) {
+ if (device->instance == VK_NULL_HANDLE
+ || device_id >= device->instance->n_physical_devices) {
g_critical ("%s: Cannot set device-index larger than the "
"number of physical devices", GST_OBJECT_NAME (device));
} else {
@@ -159,6 +160,11 @@ gst_vulkan_physical_device_constructed (GObject * object)
GstVulkanPhysicalDevice *device = GST_VULKAN_PHYSICAL_DEVICE (object);
GError *error = NULL;
+ if (device->instance == VK_NULL_HANDLE) {
+ GST_ERROR_OBJECT (object, "Constructed without any instance set");
+ return;
+ }
+
device->device = device->instance->physical_devices[device->device_index];
if (!gst_vulkan_physical_device_fill_info (device, &error)) {