After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732007 - Rename GstGlobalDeviceMonitor
Rename GstGlobalDeviceMonitor
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal blocker
: 1.3.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-21 14:00 UTC by Tim-Philipp Müller
Modified: 2014-06-28 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2014-06-21 14:00:06 UTC
What we have now:

GstDevice - ok
GstDeviceMonitor - plugin/device/API-specific monitor singleton for certain types of devices
GstDeviceMonitorFactory - plugin feature for device monitor
GstGlobalDeviceMonitor - creates one or more DeviceMonitors based on filter criterion, for use by applications

The naming of GstGlobalDeviceMonitor is unfortunate in two ways:

 -  it sounds like a single one-to-rule-them-all object,
     but it's not; to monitor different device classes,
     one might have to create multiple GlobalDeviceMonitors
     in an application.

 - (app) people intuitively just use GstDeviceMonitor for
    their needs, and then find things awfully complicated
    (because they are supposed to use the Global one for
    the filtering)

We haven't had much success in finding a better name for GlobalDeviceMonitor.

The other option is then to rename the plugin implementations GstDeviceMonitor/GstDeviceMonitorFactory to something else, and rename GstGlobalDeviceMonitor to GstDeviceMonitor.

For the monitoring backends we could use e.g. GstDeviceProbe/GstDeviceProbeFactory or GstDeviceDiscoverer/GstDeviceDiscovererFactory. Both seemed ok to Olivier.

I think I'd lean towards Discoverer, because Probe sounds more like a single-shot thing.

Any preferences/opinions/additional suggestions?
Comment 1 Tim-Philipp Müller 2014-06-21 14:01:19 UTC
We can of course leave it as it is, but if in doubt I'd opt for giving the nicer name to application-facing functionality.
Comment 2 Olivier Crête 2014-06-23 19:47:42 UTC
Other ideas for the global monitor: GstAggregatedDeviceMonitor, GstDeviceAggregator

Other ideas for the specific one: GstSpecificDeviceMonitor, GstSingleDeviceMonitor, GstSpecializedDeviceMonitor,
Comment 3 Tim-Philipp Müller 2014-06-26 14:35:23 UTC
I still think that GstDeviceMonitor is best for the application-facing global one. It's also consistent with all the monitors in the GLib API (GVolumeMonitor, GNetworkMonitor, GFileMonitor).

Where that leaves the specific ones, I don't know. Not sure your suggestions really hit it, because these monitors might watch more than one single/specific device, Rob Swain's suggestion on IRC the other day seemed more accurate (I think it was APIMonitor and MonitorImplementation or similar), but it's not pretty
Comment 4 Tim-Philipp Müller 2014-06-26 15:53:40 UTC
After discussion on IRC we've agreed on these names now (I think?):

 GstDeviceMonitor + GstDeviceProvider/GstDeviceProviderFactory
Comment 5 Olivier Crête 2014-06-26 19:09:59 UTC
Renamed:

commit c2583cae90f85c313b0ac645857cc463c504600b
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Thu Jun 26 15:08:46 2014 -0400

    GstDeviceMonitor: Rename from GstGlobalDeviceMonitor

commit 7992174a1a367c2f3cf3bc53fc1bd76fd8a365d0
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Thu Jun 26 14:28:09 2014 -0400

    DeviceProvider: Rename from DeviceMonitor
Comment 6 Nicolas Dufresne (ndufresne) 2014-06-28 16:51:35 UTC
I like that, nice work.