Blame gst/gstdevice.h

Packit f546b1
/* GStreamer
Packit f546b1
 * Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com>
Packit f546b1
 *
Packit f546b1
 * gstdevice.c: Device discovery
Packit f546b1
 *
Packit f546b1
 * This library is free software; you can redistribute it and/or
Packit f546b1
 * modify it under the terms of the GNU Library General Public
Packit f546b1
 * License as published by the Free Software Foundation; either
Packit f546b1
 * version 2 of the License, or (at your option) any later version.
Packit f546b1
 *
Packit f546b1
 * This library is distributed in the hope that it will be useful,
Packit f546b1
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit f546b1
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit f546b1
 * Library General Public License for more details.
Packit f546b1
 *
Packit f546b1
 * You should have received a copy of the GNU Library General Public
Packit f546b1
 * License along with this library; if not, write to the
Packit f546b1
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit f546b1
 * Boston, MA 02111-1307, USA.
Packit f546b1
 */
Packit f546b1
Packit f546b1
Packit f546b1
#ifndef __GST_DEVICE_H__
Packit f546b1
#define __GST_DEVICE_H__
Packit f546b1
Packit f546b1
typedef struct _GstDevice GstDevice;
Packit f546b1
typedef struct _GstDeviceClass GstDeviceClass;
Packit f546b1
Packit f546b1
#include <gst/gstelement.h>
Packit f546b1
#include <gst/gstcaps.h>
Packit f546b1
Packit f546b1
Packit f546b1
G_BEGIN_DECLS
Packit f546b1
Packit f546b1
typedef struct _GstDevicePrivate GstDevicePrivate;
Packit f546b1
Packit f546b1
#define GST_TYPE_DEVICE                 (gst_device_get_type())
Packit f546b1
#define GST_IS_DEVICE(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEVICE))
Packit f546b1
#define GST_IS_DEVICE_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEVICE))
Packit f546b1
#define GST_DEVICE_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEVICE, GstDeviceClass))
Packit f546b1
#define GST_DEVICE(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEVICE, GstDevice))
Packit f546b1
#define GST_DEVICE_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstDeviceClass))
Packit f546b1
#define GST_DEVICE_CAST(obj)            ((GstDevice *)(obj))
Packit f546b1
Packit f546b1
/**
Packit f546b1
 * GstDevice:
Packit f546b1
 * @parent: The parent #GstObject strucuture.
Packit f546b1
 *
Packit f546b1
 * A device object.
Packit f546b1
 *
Packit f546b1
 * Since: 1.4
Packit f546b1
 */
Packit f546b1
Packit f546b1
struct _GstDevice {
Packit f546b1
  GstObject         parent;
Packit f546b1
Packit f546b1
  /*< private >*/
Packit f546b1
  GstDevicePrivate *priv;
Packit f546b1
Packit f546b1
  gpointer _gst_reserved[GST_PADDING];
Packit f546b1
};
Packit f546b1
Packit f546b1
/**
Packit f546b1
 * GstDeviceClass:
Packit f546b1
 * @parent_class: The parent #GstObjectClass strucuture.
Packit f546b1
 * @create_element: Creates the fully configured element to access this device.
Packit f546b1
 *  Subclasses need to override this and return a new element.
Packit f546b1
 * @reconfigure_element: This only needs to be implemented by subclasses if the
Packit f546b1
 *  element can be reconfigured to use a different device. See the documentation
Packit f546b1
 *  for gst_device_reconfigure_element().
Packit f546b1
 *
Packit f546b1
 * The class structure for a #GstDevice object.
Packit f546b1
 *
Packit f546b1
 * Since: 1.4
Packit f546b1
 */
Packit f546b1
Packit f546b1
struct _GstDeviceClass {
Packit f546b1
  GstObjectClass    parent_class;
Packit f546b1
Packit f546b1
  GstElement * (*create_element)      (GstDevice * device, const gchar * name);
Packit f546b1
  gboolean     (*reconfigure_element) (GstDevice * device, GstElement * element);
Packit f546b1
Packit f546b1
  /*< private >*/
Packit f546b1
  gpointer _gst_reserved[GST_PADDING];
Packit f546b1
};
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
GType          gst_device_get_type (void);
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
GstElement *   gst_device_create_element      (GstDevice * device, const gchar * name);
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
GstCaps *      gst_device_get_caps            (GstDevice * device);
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
gchar *        gst_device_get_display_name    (GstDevice * device);
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
gchar *        gst_device_get_device_class    (GstDevice * device);
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
GstStructure * gst_device_get_properties      (GstDevice * device);
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
gboolean       gst_device_reconfigure_element (GstDevice * device,
Packit f546b1
                                               GstElement * element);
Packit f546b1
GST_API
Packit f546b1
gboolean        gst_device_has_classesv       (GstDevice * device,
Packit f546b1
                                               gchar ** classes);
Packit f546b1
GST_API
Packit f546b1
gboolean        gst_device_has_classes        (GstDevice * device,
Packit f546b1
                                               const gchar * classes);
Packit f546b1
Packit f546b1
Packit f546b1
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
Packit f546b1
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDevice, gst_object_unref)
Packit f546b1
#endif
Packit f546b1
Packit f546b1
G_END_DECLS
Packit f546b1
Packit f546b1
#endif /* __GST_DEVICE_H__ */