Class: Gst::DeviceProvider
- Defined in:
- (unknown)
Overview
The structure of the base Gst::DeviceProviderClass
Class Method Summary collapse
-
.register(plugin, name, rank, type) ⇒ Boolean
Create a new device providerfactory capable of instantiating objects of the type and add the factory to plugin.
Instance Method Summary collapse
-
#add_metadata(key, value) ⇒ nil
Set key with value as metadata in klass.
-
#add_static_metadata(key, value) ⇒ nil
Set key with value as metadata in klass.
-
#bus ⇒ Gst::Bus
Gets the Gst::Bus of this #GstDeviceProvider.
- #can_monitor ⇒ Boolean
-
#device_add(device) ⇒ nil
Posts a message on the provider's Gst::Bus to inform applications that a new device has been added.
-
#device_changed(device, changed_device) ⇒ nil
This function is used when changed_device was modified into its new form device.
-
#device_remove(device) ⇒ nil
Posts a message on the provider's Gst::Bus to inform applications that a device has been removed.
-
#devices ⇒ GLib::List<Gst::Device>
Gets a list of devices that this provider understands.
-
#factory ⇒ Gst::DeviceProviderFactory
Retrieves the factory that was used to create this device provider.
-
#get_metadata(key) ⇒ String
Get metadata with key in klass.
-
#hidden_providers ⇒ Array<String>
Get the provider factory names of the Gst::DeviceProvider instances that are hidden by provider.
-
#hide_provider(name) ⇒ nil
Make provider hide the devices from the factory with name.
-
#is_started ⇒ Boolean
This function can be used to know if the provider was successfully started.
-
#set_metadata(longname, classification, description, author) ⇒ nil
Sets the detailed information for a Gst::DeviceProviderClass.
-
#set_static_metadata(longname, classification, description, author) ⇒ nil
Sets the detailed information for a Gst::DeviceProviderClass.
-
#start ⇒ Boolean
Starts providering the devices.
-
#stop ⇒ nil
Decreases the use-count by one.
-
#unhide_provider(name) ⇒ nil
Make provider unhide the devices from factory name.
Methods inherited from Object
#add_control_binding, check_uniqueness, #control_bindings_disabled=, #control_rate, #control_rate=, default_deep_notify, #default_error, #get_control_binding, #get_g_value_array, #get_value, #get_value_array, #has_active_control_bindings, #has_ancestor, #has_as_ancestor, #has_as_parent, #name, #name=, #parent, #parent=, #path_string, #ref, ref_sink, #remove_control_binding, replace, #set_control_binding_disabled, #suggest_next_sync, #sync_values, #unparent, #unref
Class Method Details
.register(plugin, name, rank, type) ⇒ Boolean
Create a new device providerfactory capable of instantiating objects of the type and add the factory to plugin.
Instance Method Details
#add_metadata(key, value) ⇒ nil
Set key with value as metadata in klass.
#add_static_metadata(key, value) ⇒ nil
Set key with value as metadata in klass.
Same as gst_device_provider_class_add_metadata(), but value must be a static string or an inlined string, as it will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.)
#bus ⇒ Gst::Bus
Gets the Gst::Bus of this #GstDeviceProvider
#can_monitor ⇒ Boolean
#device_add(device) ⇒ nil
Posts a message on the provider's Gst::Bus to inform applications that a new device has been added.
This is for use by subclasses.
device's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()).
#device_changed(device, changed_device) ⇒ nil
This function is used when changed_device was modified into its new form
device. This will post a DEVICE_CHANGED message on the bus to let
the application know that the device was modified. Gst::Device is immutable
for MT. safety purposes so this is an "atomic" way of letting the application
know when a device was modified.
#device_remove(device) ⇒ nil
Posts a message on the provider's Gst::Bus to inform applications that a device has been removed.
This is for use by subclasses.
#devices ⇒ GLib::List<Gst::Device>
Gets a list of devices that this provider understands. This may actually probe the hardware if the provider is not currently started.
If the provider has been started, this will returned the same Gst::Device objedcts that have been returned by the #GST_MESSAGE_DEVICE_ADDED messages.
#factory ⇒ Gst::DeviceProviderFactory
Retrieves the factory that was used to create this device provider.
#get_metadata(key) ⇒ String
Get metadata with key in klass.
#hidden_providers ⇒ Array<String>
Get the provider factory names of the Gst::DeviceProvider instances that are hidden by provider.
#hide_provider(name) ⇒ nil
Make provider hide the devices from the factory with name.
This function is used when provider will also provide the devices reported by provider factory name. A monitor should stop monitoring the device provider with name to avoid duplicate devices.
#is_started ⇒ Boolean
This function can be used to know if the provider was successfully started.
#set_metadata(longname, classification, description, author) ⇒ nil
Sets the detailed information for a Gst::DeviceProviderClass.
This function is for use in _class_init functions only. for more details and common types. E.g: "Sink/File" E.g: "Write stream to a file" multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"
#set_static_metadata(longname, classification, description, author) ⇒ nil
Sets the detailed information for a Gst::DeviceProviderClass.
This function is for use in _class_init functions only.
Same as gst_device_provider_class_set_metadata(), but longname, classification, description, and author must be static strings or inlined strings, as they will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.) an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" element. E.g: "Write stream to a file" to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"
#start ⇒ Boolean
Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus when devices are added or removed from the system.
Since the Gst::DeviceProvider is a singleton, gst_device_provider_start() may already have been called by another user of the object, gst_device_provider_stop() needs to be called the same number of times.
After this function has been called, gst_device_provider_get_devices() will return the same objects that have been received from the #GST_MESSAGE_DEVICE_ADDED messages and will no longer probe.
#stop ⇒ nil
Decreases the use-count by one. If the use count reaches zero, this Gst::DeviceProvider will stop providering the devices. This needs to be called the same number of times that gst_device_provider_start() was called.
#unhide_provider(name) ⇒ nil
Make provider unhide the devices from factory name.
This function is used when provider will no longer provide the devices reported by provider factory name. A monitor should start monitoring the devices from provider factory name in order to see all devices again.