[Bug 678402] Device discovery/listing replacement for GstPropertyProbe

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jan 8 19:24:17 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=678402
  GStreamer | gst-plugins-base | 0.11.x

--- Comment #9 from Olivier Crete (Tester) <olivier.crete at ocrete.ca> 2013-01-09 03:24:15 UTC ---
I've done a little prototype of some API that I think makes sense, I've also
done an implementation for V4L2.

Missing features are:
- Being able to change the target of a running source/sink (pulseaudio can do
that), also an API to know where it's possible and where it's not
- Some way to know if a GstDeviceMonitor supports enumeration or not

API suggestions are welcome!



GstDeviceMonitor: (+GstDeviceMonitorFactory)
- It's a basic type like a GstElement that is in plugins

methods:
GPtrArray * gst_device_monitor_probe (GstDeviceMonitor * monitor);
- List devices
gboolean    gst_device_monitor_start (GstDeviceMonitor * monitor);
void        gst_device_monitor_stop (GstDeviceMonitor * monitor);
- Starts and stop emitting the added and removed signals

signals:
"added" and "removed with argument (GstDevice *)

Created with gst_device_monitor_factory_make() /
gst_device_monitor_factory_create() just like elements.

GstDevice:

methods:
GstElement * gst_device_create_element (GstDevice * device, const gchar *
name);
- creates an element configured to use this device

GstCaps *    gst_device_get_caps (GstDevice * device);
- The caps for the device.. should be a superset (or equal) to whatever
gst_pad_query_caps() will return once the device is opened.

gchar *      gst_device_get_device_name (GstDevice * device);
- Returns a user-friendly name (not sure if we can offer translations, I think
not)

signals:
"removed"

properties:
"caps" and "device-name" .. same as the functions

GstGlobalDeviceMonitor:
- List devices from all possible monitors that match the listed types

methods:

GPtrArray * gst_global_device_monitor_probe (GstGlobalDeviceMonitor * monitor);
gboolean    gst_global_device_monitor_start (GstGlobalDeviceMonitor * monitor);
void        gst_global_device_monitor_stop  (GstGlobalDeviceMonitor * monitor);
- Same as GstDeviceMonitor, but does it all monitors

void        gst_global_device_monitor_set_type_filter (
  GstGlobalDeviceMonitor * monitor,
  GstDeviceMonitorFactoryListType type);
GstDeviceMonitorFactoryListType gst_global_device_monitor_get_type_filter (
  GstGlobalDeviceMonitor * monitor);
- Set/Get a filter to not get all monitors (so the type could be
GST_DEVICE_MONITOR_FACTORY_TYPE_SRC |
GST_DEVICE_MONITOR_FACTORY_TYPE_MEDIA_VIDEO)

void        gst_global_device_monitor_set_caps_filter (
  GstGlobalDeviceMonitor * monitor,
  GstCaps *                caps);
GstCaps *   gst_global_device_monitor_get_caps_filter (
  GstGlobalDeviceMonitor * monitor);
- Set/Get caps that are used to filter possible devices, devices that don't
match these caps are ignored (so we can request only devices that can produce
video/x-h264 or video/x-raw, etc..)

Created with gst_global_device_monitor_new()

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list