Commit graph

31 commits

Author SHA1 Message Date
Thibault Saunier
d6c14e70a1 device-monitor: list hidden providers before listing devices
The way it was implemented could make the list updated after the
list of device was filled with supposdely hidden devices
2019-08-07 15:20:39 -04:00
Mathieu Duponchelle
c34fe82b5b devicemonitor: add debug category 2019-06-21 13:38:58 +00:00
Thibault Saunier
97aa82387f device-provider: Allow notifying application of device changes
Thi introduces new APIs to post a `DEVICE_CHANGED` message on the
bus so the application is notifies when a device is modified. For
example, if the "defaultness" of a device was changed or any property
that can be changed at any time. Atomically changing the device
object notifying that way allow us to abtract away the internal threads.

New APIS:
  - gst_message_new_device_changed
  - gst_message_parse_device_changed
  - gst_device_provider_device_changed
2019-02-08 13:44:02 -03:00
Tim-Philipp Müller
2db8e3705f Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-06-24 12:49:14 +02:00
Arun Raghavan
b5028383ab gst: Fix up a bunch of GIR annotations
This is mostly on nullable return values, and some other minor ones that
I ran across.

https://bugzilla.gnome.org/show_bug.cgi?id=789319
2018-01-27 10:41:24 +00:00
Arun Raghavan
41a59cddb6 devicemonitor: Return NULL instead of FALSE
Same effect, meaning is clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=789319
2018-01-27 10:29:18 +00:00
Jan Alexander Steffens (heftig)
d9b20492f3 devicemonitor: Avoid maybe-uninitialized compiler warning
On Arch Linux x86_64, gcc 7.2.0-3, -Og -g3:

gstdevicemonitor.c: In function ‘bus_sync_message’:
gstdevicemonitor.c:276:8: error: ‘matches’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This commit also simplifies the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=789983
2017-12-04 10:56:44 +00:00
Sebastian Dröge
f119e93b47 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
I.e. most of them unfortunately.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:37 +03:00
Sebastian Dröge
30f871d274 gst: Correctly annotate functions taking floating reference parameters and returning floating references
https://bugzilla.gnome.org/show_bug.cgi?id=702960
2017-05-17 10:40:37 +03:00
Thibault Saunier
a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Guillaume Desmottes
514beb7d60 message: fix annotation of parse_device_{added,removed}
gst_structure_id_get() returns a new reference so the returned device is
actually (transfer full).

The code using this API was already correct but the code example in
comments was not.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
2016-07-15 12:56:52 +01:00
Nirbheek Chauhan
20c89fa8bc GstDeviceMonitor: Clarify the behaviour of gst_device_monitor_add_filter 2016-01-14 22:07:51 +00:00
Nirbheek Chauhan
4d6c7ccd08 GstDeviceMonitor: Don't remove unmatched class filters
If no providers for a particular class could be found, then removing unmatched
filters would cause all devices to be returned instead which is not at all what
the user intended. We still return 0 for unmatched filters.
2016-01-14 22:07:51 +00:00
Wim Taymans
ffa90b2e72 devicemonitor: fix provider leak 2015-08-08 17:59:51 +02:00
Wim Taymans
5a7b7e66bd deviceprovider: Add method to hide devices from a provider
Add methods to add/remove the providers that should be hidden by this
provider. Also make a method to get a list of hidden providers.

This makes it possible to have multiple systems monitor the same devices
and remove duplicates.

Add a property to see all devices, even duplicate ones from hidden
providers.
2015-08-08 15:21:50 +02:00
Wim Taymans
62f6207e04 devicemonitor: get a list of currently monitored providers
Get a list of the currently monitored providers.
2015-08-04 13:24:10 +02:00
Wim Taymans
eedd9cb7b7 devicemonitor: do start and stop outside of the lock
Release the monitor lock when calling the provider start/stop methods.
Because we release the lock now, We need to make sure we check the
cookie again and keep track of started and removed providers.
2015-07-16 18:54:50 +02:00
Wim Taymans
8caf9b7a87 devicemonitor: keep order of providers and devices
The deviceproviders are added to the array sorted by their rank. Make
sure we keep this ordering when removing a provider.

We use _prepend to collect the devices, use g_list_reverse to get the
devices in the right order; sorted by rank and in the same order as
returned by the provider.
2015-07-16 18:54:50 +02:00
Nicolas Dufresne
48700c7791 doc: More doc warning fixes
So from this point, the remaining warning for libgstreamer are about
protected member not showing in the doc. This may need some discussion
with upstream gtk-doc people.

* Remove % in from of none macro
* Fixed GST_TYPE_FAGS -> GST_TYPE_FAG_SET
* Minor wording fix
* Can't link to GstUri.port, so split the .port part
2015-06-14 10:29:04 -04:00
Sebastian Dröge
154eefecc9 Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.

Also normalize booleans in a few places.
2014-12-01 09:51:37 +01:00
Tim-Philipp Müller
c06d9f7b98 devicemonitor: fix typo in sample code in docs
https://bugzilla.gnome.org/show_bug.cgi?id=735975
2014-09-03 19:55:07 +01:00
Evan Nemerson
5abc82e9f3 introspection: Assorted minor introspection and documentation fixes
https://bugzilla.gnome.org/show_bug.cgi?id=732534
2014-07-01 09:03:41 +02:00
Guillaume Desmottes
688108431a devicemonitor: Stop using g_clear_pointer()
We dont't want to depend on GLib 2.34 for now.
2014-06-30 11:17:44 +02:00
Tim-Philipp Müller
0e0e78e8af devicemonitor: don't fail when started without any filters
Just show all devices then.
2014-06-27 10:47:50 +01:00
Olivier Crête
67440ce084 devicemonitor: Improve documentation 2014-06-26 21:01:38 -04:00
Olivier Crête
6d12b33945 devicemonitor: Make it possible to add multiple filters
Each filter will include a GstCaps and a set of classes to match
2014-06-26 21:01:38 -04:00
Olivier Crête
c2583cae90 GstDeviceMonitor: Rename from GstGlobalDeviceMonitor 2014-06-26 15:08:46 -04:00
Olivier Crête
7992174a1a DeviceProvider: Rename from DeviceMonitor 2014-06-26 14:45:30 -04:00
Olivier Crête
77db6bf3d6 GstDevice: Document GstDevice and related classes 2014-06-20 16:55:06 -04:00
Edward Hervey
fb9ca6f7b4 devicemonitor: Use local includes and use gst_private before anything
Should fix build issues on BSD
2014-03-17 10:00:00 +01:00
Olivier Crête
e4e85fc88a devicemonitor: Add GstDeviceMonitor and related
Also add GstDevice and GstDeviceMonitorFactory
And add code to the registry to save them

https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 14:38:07 +00:00