gstdevicemonitor.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* GStreamer
  2. * Copyright (C) 2013 Olivier Crete <olivier.crete@collabora.com>
  3. *
  4. * gstdevicemonitor.c: Device monitor
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. */
  21. #ifndef __GST_DEVICE_MONITOR_H__
  22. #define __GST_DEVICE_MONITOR_H__
  23. #include <gst/gstobject.h>
  24. #include <gst/gstdevice.h>
  25. #include <gst/gstdeviceprovider.h>
  26. #include <gst/gstdeviceproviderfactory.h>
  27. G_BEGIN_DECLS
  28. typedef struct _GstDeviceMonitor GstDeviceMonitor;
  29. typedef struct _GstDeviceMonitorPrivate GstDeviceMonitorPrivate;
  30. typedef struct _GstDeviceMonitorClass GstDeviceMonitorClass;
  31. #define GST_TYPE_DEVICE_MONITOR (gst_device_monitor_get_type())
  32. #define GST_IS_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEVICE_MONITOR))
  33. #define GST_IS_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEVICE_MONITOR))
  34. #define GST_DEVICE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEVICE_MONITOR, GstDeviceMonitorClass))
  35. #define GST_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEVICE_MONITOR, GstDeviceMonitor))
  36. #define GST_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_MONITOR, GstDeviceMonitorClass))
  37. #define GST_DEVICE_MONITOR_CAST(obj) ((GstDeviceMonitor *)(obj))
  38. /**
  39. * GstDeviceMonitor:
  40. * @parent: the parent #GstObject structure
  41. *
  42. * Opaque device monitor object structure.
  43. *
  44. * Since: 1.4
  45. */
  46. struct _GstDeviceMonitor {
  47. GstObject parent;
  48. /*< private >*/
  49. GstDeviceMonitorPrivate *priv;
  50. gpointer _gst_reserved[GST_PADDING];
  51. };
  52. /**
  53. * GstDeviceMonitorClass:
  54. * @parent_class: the parent #GstObjectClass structure
  55. *
  56. * Opaque device monitor class structure.
  57. *
  58. * Since: 1.4
  59. */
  60. struct _GstDeviceMonitorClass {
  61. GstObjectClass parent_class;
  62. /*< private >*/
  63. gpointer _gst_reserved[GST_PADDING];
  64. };
  65. GType gst_device_monitor_get_type (void);
  66. GstDeviceMonitor * gst_device_monitor_new (void);
  67. GstBus * gst_device_monitor_get_bus (GstDeviceMonitor * monitor);
  68. GList * gst_device_monitor_get_devices (GstDeviceMonitor * monitor);
  69. gboolean gst_device_monitor_start (GstDeviceMonitor * monitor);
  70. void gst_device_monitor_stop (GstDeviceMonitor * monitor);
  71. guint gst_device_monitor_add_filter (GstDeviceMonitor * monitor,
  72. const gchar * classes,
  73. GstCaps * caps);
  74. gboolean gst_device_monitor_remove_filter (GstDeviceMonitor * monitor,
  75. guint filter_id);
  76. gchar ** gst_device_monitor_get_providers (GstDeviceMonitor * monitor);
  77. void gst_device_monitor_set_show_all_devices (GstDeviceMonitor * monitor, gboolean show_all);
  78. gboolean gst_device_monitor_get_show_all_devices (GstDeviceMonitor * monitor);
  79. #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
  80. G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDeviceMonitor, gst_object_unref)
  81. #endif
  82. G_END_DECLS
  83. #endif /* __GST_DEVICE_MONITOR_H__ */