GNOME Bugzilla – Bug 732007
Rename GstGlobalDeviceMonitor
Last modified: 2014-06-28 16:51:35 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?
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.
Other ideas for the global monitor: GstAggregatedDeviceMonitor, GstDeviceAggregator Other ideas for the specific one: GstSpecificDeviceMonitor, GstSingleDeviceMonitor, GstSpecializedDeviceMonitor,
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
After discussion on IRC we've agreed on these names now (I think?): GstDeviceMonitor + GstDeviceProvider/GstDeviceProviderFactory
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
I like that, nice work.