Commit a9c38568 authored by Olivier Crête's avatar Olivier Crête

Rename GstDeviceMonitor to GstDeviceProvider

parent e4f0133c
...@@ -4,7 +4,7 @@ libgstpulse_la_SOURCES = \ ...@@ -4,7 +4,7 @@ libgstpulse_la_SOURCES = \
plugin.c \ plugin.c \
pulsesink.c \ pulsesink.c \
pulsesrc.c \ pulsesrc.c \
pulsedevicemonitor.c \ pulsedeviceprovider.c \
pulseutil.c pulseutil.c
libgstpulse_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(PULSE_CFLAGS) libgstpulse_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(PULSE_CFLAGS)
...@@ -17,6 +17,6 @@ libgstpulse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) ...@@ -17,6 +17,6 @@ libgstpulse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
noinst_HEADERS = \ noinst_HEADERS = \
pulsesink.h \ pulsesink.h \
pulsesrc.h \ pulsesrc.h \
pulsedevicemonitor.h \ pulsedeviceprovider.h \
pulseutil.h pulseutil.h
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "pulsesink.h" #include "pulsesink.h"
#include "pulsesrc.h" #include "pulsesrc.h"
#include "pulsedevicemonitor.h" #include "pulsedeviceprovider.h"
GST_DEBUG_CATEGORY (pulse_debug); GST_DEBUG_CATEGORY (pulse_debug);
...@@ -49,8 +49,8 @@ plugin_init (GstPlugin * plugin) ...@@ -49,8 +49,8 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_PULSESRC)) GST_TYPE_PULSESRC))
return FALSE; return FALSE;
if (!gst_device_monitor_register (plugin, "pulsemonitor", if (!gst_device_provider_register (plugin, "pulsedeviceprovider",
GST_RANK_PRIMARY, GST_TYPE_PULSE_DEVICE_MONITOR)) GST_RANK_PRIMARY, GST_TYPE_PULSE_DEVICE_PROVIDER))
return FALSE; return FALSE;
GST_DEBUG_CATEGORY_INIT (pulse_debug, "pulse", 0, "PulseAudio elements"); GST_DEBUG_CATEGORY_INIT (pulse_debug, "pulse", 0, "PulseAudio elements");
......
/* GStreamer /* GStreamer
* Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com> * Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com>
* *
* gstv4l2devicemonitor.c: V4l2 device probing and monitoring * gstv4l2deviceprovider.c: V4l2 device probing and monitoring
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "config.h" #include "config.h"
#endif #endif
#include "pulsedevicemonitor.h" #include "pulsedeviceprovider.h"
#include <string.h> #include <string.h>
...@@ -42,19 +42,19 @@ static GstDevice *gst_pulse_device_new (guint id, ...@@ -42,19 +42,19 @@ static GstDevice *gst_pulse_device_new (guint id,
const gchar * device_name, GstCaps * caps, const gchar * internal_name, const gchar * device_name, GstCaps * caps, const gchar * internal_name,
GstPulseDeviceType type); GstPulseDeviceType type);
G_DEFINE_TYPE (GstPulseDeviceMonitor, gst_pulse_device_monitor, G_DEFINE_TYPE (GstPulseDeviceProvider, gst_pulse_device_provider,
GST_TYPE_DEVICE_MONITOR); GST_TYPE_DEVICE_PROVIDER);
static void gst_pulse_device_monitor_finalize (GObject * object); static void gst_pulse_device_provider_finalize (GObject * object);
static void gst_pulse_device_monitor_set_property (GObject * object, static void gst_pulse_device_provider_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec); guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_pulse_device_monitor_get_property (GObject * object, static void gst_pulse_device_provider_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec); guint prop_id, GValue * value, GParamSpec * pspec);
static GList *gst_pulse_device_monitor_probe (GstDeviceMonitor * monitor); static GList *gst_pulse_device_provider_probe (GstDeviceProvider * provider);
static gboolean gst_pulse_device_monitor_start (GstDeviceMonitor * monitor); static gboolean gst_pulse_device_provider_start (GstDeviceProvider * provider);
static void gst_pulse_device_monitor_stop (GstDeviceMonitor * monitor); static void gst_pulse_device_provider_stop (GstDeviceProvider * provider);
enum enum
{ {
...@@ -66,19 +66,19 @@ enum ...@@ -66,19 +66,19 @@ enum
static void static void
gst_pulse_device_monitor_class_init (GstPulseDeviceMonitorClass * klass) gst_pulse_device_provider_class_init (GstPulseDeviceProviderClass * klass)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstDeviceMonitorClass *dm_class = GST_DEVICE_MONITOR_CLASS (klass); GstDeviceProviderClass *dm_class = GST_DEVICE_PROVIDER_CLASS (klass);
gchar *client_name; gchar *client_name;
gobject_class->set_property = gst_pulse_device_monitor_set_property; gobject_class->set_property = gst_pulse_device_provider_set_property;
gobject_class->get_property = gst_pulse_device_monitor_get_property; gobject_class->get_property = gst_pulse_device_provider_get_property;
gobject_class->finalize = gst_pulse_device_monitor_finalize; gobject_class->finalize = gst_pulse_device_provider_finalize;
dm_class->probe = gst_pulse_device_monitor_probe; dm_class->probe = gst_pulse_device_provider_probe;
dm_class->start = gst_pulse_device_monitor_start; dm_class->start = gst_pulse_device_provider_start;
dm_class->stop = gst_pulse_device_monitor_stop; dm_class->stop = gst_pulse_device_provider_stop;
g_object_class_install_property (gobject_class, g_object_class_install_property (gobject_class,
PROP_SERVER, PROP_SERVER,
...@@ -95,35 +95,35 @@ gst_pulse_device_monitor_class_init (GstPulseDeviceMonitorClass * klass) ...@@ -95,35 +95,35 @@ gst_pulse_device_monitor_class_init (GstPulseDeviceMonitorClass * klass)
GST_PARAM_MUTABLE_READY)); GST_PARAM_MUTABLE_READY));
g_free (client_name); g_free (client_name);
gst_device_monitor_class_set_static_metadata (dm_class, gst_device_provider_class_set_static_metadata (dm_class,
"PulseAudio Device Monitor", "Sink/Source/Audio", "PulseAudio Device Provider", "Sink/Source/Audio",
"List and monitor PulseAudio source and sink devices", "List and provider PulseAudio source and sink devices",
"Olivier Crete <olivier.crete@collabora.com>"); "Olivier Crete <olivier.crete@collabora.com>");
} }
static void static void
gst_pulse_device_monitor_init (GstPulseDeviceMonitor * self) gst_pulse_device_provider_init (GstPulseDeviceProvider * self)
{ {
self->client_name = gst_pulse_client_name (); self->client_name = gst_pulse_client_name ();
} }
static void static void
gst_pulse_device_monitor_finalize (GObject * object) gst_pulse_device_provider_finalize (GObject * object)
{ {
GstPulseDeviceMonitor *self = GST_PULSE_DEVICE_MONITOR (object); GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (object);
g_free (self->client_name); g_free (self->client_name);
g_free (self->server); g_free (self->server);
G_OBJECT_CLASS (gst_pulse_device_monitor_parent_class)->finalize (object); G_OBJECT_CLASS (gst_pulse_device_provider_parent_class)->finalize (object);
} }
static void static void
gst_pulse_device_monitor_set_property (GObject * object, gst_pulse_device_provider_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec) guint prop_id, const GValue * value, GParamSpec * pspec)
{ {
GstPulseDeviceMonitor *self = GST_PULSE_DEVICE_MONITOR (object); GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (object);
switch (prop_id) { switch (prop_id) {
case PROP_SERVER: case PROP_SERVER:
...@@ -147,10 +147,10 @@ gst_pulse_device_monitor_set_property (GObject * object, ...@@ -147,10 +147,10 @@ gst_pulse_device_monitor_set_property (GObject * object,
} }
static void static void
gst_pulse_device_monitor_get_property (GObject * object, gst_pulse_device_provider_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec) guint prop_id, GValue * value, GParamSpec * pspec)
{ {
GstPulseDeviceMonitor *self = GST_PULSE_DEVICE_MONITOR (object); GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (object);
switch (prop_id) { switch (prop_id) {
case PROP_SERVER: case PROP_SERVER:
...@@ -168,7 +168,7 @@ gst_pulse_device_monitor_get_property (GObject * object, ...@@ -168,7 +168,7 @@ gst_pulse_device_monitor_get_property (GObject * object,
static void static void
context_state_cb (pa_context * c, void *userdata) context_state_cb (pa_context * c, void *userdata)
{ {
GstPulseDeviceMonitor *self = userdata; GstPulseDeviceProvider *self = userdata;
switch (pa_context_get_state (c)) { switch (pa_context_get_state (c)) {
case PA_CONTEXT_READY: case PA_CONTEXT_READY:
...@@ -219,7 +219,7 @@ static void ...@@ -219,7 +219,7 @@ static void
get_source_info_cb (pa_context * context, get_source_info_cb (pa_context * context,
const pa_source_info * info, int eol, void *userdata) const pa_source_info * info, int eol, void *userdata)
{ {
GstPulseDeviceMonitor *self = userdata; GstPulseDeviceProvider *self = userdata;
GstDevice *dev; GstDevice *dev;
if (eol) { if (eol) {
...@@ -230,14 +230,14 @@ get_source_info_cb (pa_context * context, ...@@ -230,14 +230,14 @@ get_source_info_cb (pa_context * context,
dev = new_source (info); dev = new_source (info);
if (dev) if (dev)
gst_device_monitor_device_add (GST_DEVICE_MONITOR (self), dev); gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), dev);
} }
static void static void
get_sink_info_cb (pa_context * context, get_sink_info_cb (pa_context * context,
const pa_sink_info * info, int eol, void *userdata) const pa_sink_info * info, int eol, void *userdata)
{ {
GstPulseDeviceMonitor *self = userdata; GstPulseDeviceProvider *self = userdata;
GstDevice *dev; GstDevice *dev;
if (eol) { if (eol) {
...@@ -248,15 +248,15 @@ get_sink_info_cb (pa_context * context, ...@@ -248,15 +248,15 @@ get_sink_info_cb (pa_context * context,
dev = new_sink (info); dev = new_sink (info);
if (dev) if (dev)
gst_device_monitor_device_add (GST_DEVICE_MONITOR (self), dev); gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), dev);
} }
static void static void
context_subscribe_cb (pa_context * context, pa_subscription_event_type_t type, context_subscribe_cb (pa_context * context, pa_subscription_event_type_t type,
uint32_t idx, void *userdata) uint32_t idx, void *userdata)
{ {
GstPulseDeviceMonitor *self = userdata; GstPulseDeviceProvider *self = userdata;
GstDeviceMonitor *monitor = userdata; GstDeviceProvider *provider = userdata;
pa_subscription_event_type_t facility = pa_subscription_event_type_t facility =
type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK; type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK;
pa_subscription_event_type_t event_type = pa_subscription_event_type_t event_type =
...@@ -279,7 +279,7 @@ context_subscribe_cb (pa_context * context, pa_subscription_event_type_t type, ...@@ -279,7 +279,7 @@ context_subscribe_cb (pa_context * context, pa_subscription_event_type_t type,
GList *item; GList *item;
GST_OBJECT_LOCK (self); GST_OBJECT_LOCK (self);
for (item = monitor->devices; item; item = item->next) { for (item = provider->devices; item; item = item->next) {
dev = item->data; dev = item->data;
if (((facility == PA_SUBSCRIPTION_EVENT_SOURCE && if (((facility == PA_SUBSCRIPTION_EVENT_SOURCE &&
...@@ -295,7 +295,7 @@ context_subscribe_cb (pa_context * context, pa_subscription_event_type_t type, ...@@ -295,7 +295,7 @@ context_subscribe_cb (pa_context * context, pa_subscription_event_type_t type,
GST_OBJECT_UNLOCK (self); GST_OBJECT_UNLOCK (self);
if (dev) { if (dev) {
gst_device_monitor_device_remove (GST_DEVICE_MONITOR (self), gst_device_provider_device_remove (GST_DEVICE_PROVIDER (self),
GST_DEVICE (dev)); GST_DEVICE (dev));
gst_object_unref (dev); gst_object_unref (dev);
} }
...@@ -327,9 +327,9 @@ get_sink_info_list_cb (pa_context * context, const pa_sink_info * info, ...@@ -327,9 +327,9 @@ get_sink_info_list_cb (pa_context * context, const pa_sink_info * info,
} }
static GList * static GList *
gst_pulse_device_monitor_probe (GstDeviceMonitor * monitor) gst_pulse_device_provider_probe (GstDeviceProvider * provider)
{ {
GstPulseDeviceMonitor *self = GST_PULSE_DEVICE_MONITOR (monitor); GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (provider);
GList *devices = NULL; GList *devices = NULL;
pa_mainloop *m = NULL; pa_mainloop *m = NULL;
pa_context *c = NULL; pa_context *c = NULL;
...@@ -397,9 +397,9 @@ failed: ...@@ -397,9 +397,9 @@ failed:
} }
static gboolean static gboolean
gst_pulse_device_monitor_start (GstDeviceMonitor * monitor) gst_pulse_device_provider_start (GstDeviceProvider * provider)
{ {
GstPulseDeviceMonitor *self = GST_PULSE_DEVICE_MONITOR (monitor); GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (provider);
pa_operation *initial_operation; pa_operation *initial_operation;
if (!(self->mainloop = pa_threaded_mainloop_new ())) { if (!(self->mainloop = pa_threaded_mainloop_new ())) {
...@@ -484,7 +484,7 @@ gst_pulse_device_monitor_start (GstDeviceMonitor * monitor) ...@@ -484,7 +484,7 @@ gst_pulse_device_monitor_start (GstDeviceMonitor * monitor)
unlock_and_fail: unlock_and_fail:
pa_threaded_mainloop_unlock (self->mainloop); pa_threaded_mainloop_unlock (self->mainloop);
gst_pulse_device_monitor_stop (monitor); gst_pulse_device_provider_stop (provider);
return FALSE; return FALSE;
mainloop_failed: mainloop_failed:
...@@ -497,9 +497,9 @@ cancel_and_fail: ...@@ -497,9 +497,9 @@ cancel_and_fail:
} }
static void static void
gst_pulse_device_monitor_stop (GstDeviceMonitor * monitor) gst_pulse_device_provider_stop (GstDeviceProvider * provider)
{ {
GstPulseDeviceMonitor *self = GST_PULSE_DEVICE_MONITOR (monitor); GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (provider);
pa_threaded_mainloop_stop (self->mainloop); pa_threaded_mainloop_stop (self->mainloop);
......
/* GStreamer /* GStreamer
* Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com> * Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com>
* *
* pulsedevicemonitor.h: Device probing and monitoring * pulsedeviceprovider.h: Device probing and monitoring
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
*/ */
#ifndef __GST_PULSE_DEVICE_MONITOR_H__ #ifndef __GST_PULSE_DEVICE_PROVIDER_H__
#define __GST_PULSE_DEVICE_MONITOR_H__ #define __GST_PULSE_DEVICE_PROVIDER_H__
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
...@@ -34,20 +34,20 @@ ...@@ -34,20 +34,20 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _GstPulseDeviceMonitor GstPulseDeviceMonitor; typedef struct _GstPulseDeviceProvider GstPulseDeviceProvider;
typedef struct _GstPulseDeviceMonitorPrivate GstPulseDeviceMonitorPrivate; typedef struct _GstPulseDeviceProviderPrivate GstPulseDeviceProviderPrivate;
typedef struct _GstPulseDeviceMonitorClass GstPulseDeviceMonitorClass; typedef struct _GstPulseDeviceProviderClass GstPulseDeviceProviderClass;
#define GST_TYPE_PULSE_DEVICE_MONITOR (gst_pulse_device_monitor_get_type()) #define GST_TYPE_PULSE_DEVICE_PROVIDER (gst_pulse_device_provider_get_type())
#define GST_IS_PULSE_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PULSE_DEVICE_MONITOR)) #define GST_IS_PULSE_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PULSE_DEVICE_PROVIDER))
#define GST_IS_PULSE_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PULSE_DEVICE_MONITOR)) #define GST_IS_PULSE_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PULSE_DEVICE_PROVIDER))
#define GST_PULSE_DEVICE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PULSE_DEVICE_MONITOR, GstPulseDeviceMonitorClass)) #define GST_PULSE_DEVICE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PULSE_DEVICE_PROVIDER, GstPulseDeviceProviderClass))
#define GST_PULSE_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PULSE_DEVICE_MONITOR, GstPulseDeviceMonitor)) #define GST_PULSE_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PULSE_DEVICE_PROVIDER, GstPulseDeviceProvider))
#define GST_PULSE_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_MONITOR, GstPulseDeviceMonitorClass)) #define GST_PULSE_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstPulseDeviceProviderClass))
#define GST_PULSE_DEVICE_MONITOR_CAST(obj) ((GstPulseDeviceMonitor *)(obj)) #define GST_PULSE_DEVICE_PROVIDER_CAST(obj) ((GstPulseDeviceProvider *)(obj))
struct _GstPulseDeviceMonitor { struct _GstPulseDeviceProvider {
GstDeviceMonitor parent; GstDeviceProvider parent;
gchar *server; gchar *server;
gchar *client_name; gchar *client_name;
...@@ -61,11 +61,11 @@ typedef enum { ...@@ -61,11 +61,11 @@ typedef enum {
GST_PULSE_DEVICE_TYPE_SINK GST_PULSE_DEVICE_TYPE_SINK
} GstPulseDeviceType; } GstPulseDeviceType;
struct _GstPulseDeviceMonitorClass { struct _GstPulseDeviceProviderClass {
GstDeviceMonitorClass parent_class; GstDeviceProviderClass parent_class;
}; };
GType gst_pulse_device_monitor_get_type (void); GType gst_pulse_device_provider_get_type (void);
typedef struct _GstPulseDevice GstPulseDevice; typedef struct _GstPulseDevice GstPulseDevice;
...@@ -95,4 +95,4 @@ struct _GstPulseDeviceClass { ...@@ -95,4 +95,4 @@ struct _GstPulseDeviceClass {
GType gst_pulse_device_get_type (void); GType gst_pulse_device_get_type (void);
#endif /* __GST_PULSE_DEVICE_MONITOR_H__ */ #endif /* __GST_PULSE_DEVICE_PROVIDER_H__ */
...@@ -5,7 +5,7 @@ include $(top_srcdir)/common/gst-glib-gen.mak ...@@ -5,7 +5,7 @@ include $(top_srcdir)/common/gst-glib-gen.mak
libgstvideo4linux2_la_SOURCES = gstv4l2.c \ libgstvideo4linux2_la_SOURCES = gstv4l2.c \
gstv4l2allocator.c \ gstv4l2allocator.c \
gstv4l2colorbalance.c \ gstv4l2colorbalance.c \
gstv4l2devicemonitor.c \ gstv4l2deviceprovider.c \
gstv4l2object.c \ gstv4l2object.c \
gstv4l2bufferpool.c \ gstv4l2bufferpool.c \
gstv4l2sink.c \ gstv4l2sink.c \
...@@ -47,7 +47,7 @@ noinst_HEADERS = \ ...@@ -47,7 +47,7 @@ noinst_HEADERS = \
gstv4l2allocator.h \ gstv4l2allocator.h \
gstv4l2bufferpool.h \ gstv4l2bufferpool.h \
gstv4l2colorbalance.h \ gstv4l2colorbalance.h \
gstv4l2devicemonitor.h \ gstv4l2deviceprovider.h \
gstv4l2object.h \ gstv4l2object.h \
gstv4l2sink.h \ gstv4l2sink.h \
gstv4l2src.h \ gstv4l2src.h \
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "gstv4l2sink.h" #include "gstv4l2sink.h"
#include "gstv4l2radio.h" #include "gstv4l2radio.h"
#include "gstv4l2videodec.h" #include "gstv4l2videodec.h"
#include "gstv4l2devicemonitor.h" #include "gstv4l2deviceprovider.h"
#include "gstv4l2transform.h" #include "gstv4l2transform.h"
/* used in v4l2_calls.c and v4l2src_calls.c */ /* used in v4l2_calls.c and v4l2src_calls.c */
...@@ -199,8 +199,8 @@ plugin_init (GstPlugin * plugin) ...@@ -199,8 +199,8 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_V4L2SINK) || GST_TYPE_V4L2SINK) ||
!gst_element_register (plugin, "v4l2radio", GST_RANK_NONE, !gst_element_register (plugin, "v4l2radio", GST_RANK_NONE,
GST_TYPE_V4L2RADIO) || GST_TYPE_V4L2RADIO) ||
!gst_device_monitor_register (plugin, "v4l2monitor", !gst_device_provider_register (plugin, "v4l2deviceprovider",
GST_RANK_PRIMARY, GST_TYPE_V4L2_DEVICE_MONITOR) || GST_RANK_PRIMARY, GST_TYPE_V4L2_DEVICE_PROVIDER) ||
/* etc. */ /* etc. */
!gst_v4l2_probe_and_register (plugin)) !gst_v4l2_probe_and_register (plugin))
return FALSE; return FALSE;
......
/* GStreamer /* GStreamer
* Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com> * Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com>
* *
* gstv4l2devicemonitor.h: V4l2 device probing and monitoring * gstv4l2deviceprovider.h: V4l2 device probing and monitoring
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
*/ */
#ifndef __GST_V4L2_DEVICE_MONITOR_H__ #ifndef __GST_V4L2_DEVICE_PROVIDER_H__
#define __GST_V4L2_DEVICE_MONITOR_H__ #define __GST_V4L2_DEVICE_PROVIDER_H__
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
...@@ -35,20 +35,20 @@ ...@@ -35,20 +35,20 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _GstV4l2DeviceMonitor GstV4l2DeviceMonitor; typedef struct _GstV4l2DeviceProvider GstV4l2DeviceProvider;
typedef struct _GstV4l2DeviceMonitorPrivate GstV4l2DeviceMonitorPrivate; typedef struct _GstV4l2DeviceProviderPrivate GstV4l2DeviceProviderPrivate;
typedef struct _GstV4l2DeviceMonitorClass GstV4l2DeviceMonitorClass; typedef struct _GstV4l2DeviceProviderClass GstV4l2DeviceProviderClass;
#define GST_TYPE_V4L2_DEVICE_MONITOR (gst_v4l2_device_monitor_get_type()) #define GST_TYPE_V4L2_DEVICE_PROVIDER (gst_v4l2_device_provider_get_type())
#define GST_IS_V4L2_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_DEVICE_MONITOR)) #define GST_IS_V4L2_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_DEVICE_PROVIDER))
#define GST_IS_V4L2_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_DEVICE_MONITOR)) #define GST_IS_V4L2_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_DEVICE_PROVIDER))
#define GST_V4L2_DEVICE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2_DEVICE_MONITOR, GstV4l2DeviceMonitorClass)) #define GST_V4L2_DEVICE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2_DEVICE_PROVIDER, GstV4l2DeviceProviderClass))
#define GST_V4L2_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_DEVICE_MONITOR, GstV4l2DeviceMonitor)) #define GST_V4L2_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_DEVICE_PROVIDER, GstV4l2DeviceProvider))
#define GST_V4L2_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_MONITOR, GstV4l2DeviceMonitorClass)) #define GST_V4L2_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstV4l2DeviceProviderClass))
#define GST_V4L2_DEVICE_MONITOR_CAST(obj) ((GstV4l2DeviceMonitor *)(obj)) #define GST_V4L2_DEVICE_PROVIDER_CAST(obj) ((GstV4l2DeviceProvider *)(obj))
struct _GstV4l2DeviceMonitor { struct _GstV4l2DeviceProvider {
GstDeviceMonitor parent; GstDeviceProvider parent;
#ifdef HAVE_GUDEV #ifdef HAVE_GUDEV
GMainContext *context; GMainContext *context;
...@@ -65,11 +65,11 @@ typedef enum { ...@@ -65,11 +65,11 @@ typedef enum {
GST_V4L2_DEVICE_TYPE_SINK GST_V4L2_DEVICE_TYPE_SINK
} GstV4l2DeviceType; } GstV4l2DeviceType;
struct _GstV4l2DeviceMonitorClass { struct _GstV4l2DeviceProviderClass {
GstDeviceMonitorClass parent_class; GstDeviceProviderClass parent_class;
}; };
GType gst_v4l2_device_monitor_get_type (void); GType gst_v4l2_device_provider_get_type (void);
typedef struct _GstV4l2Device GstV4l2Device; typedef struct _GstV4l2Device GstV4l2Device;
...@@ -98,4 +98,4 @@ struct _GstV4l2DeviceClass { ...@@ -98,4 +98,4 @@ struct _GstV4l2DeviceClass {
GType gst_v4l2_device_get_type (void); GType gst_v4l2_device_get_type (void);
#endif /* __GST_V4L2_DEVICE_MONITOR_H__ */ #endif /* __GST_V4L2_DEVICE_PROVIDER_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment