1 /* 2 * Clutter-GStreamer. 3 * 4 * GStreamer integration library for Clutter. 5 * 6 * clutter-gst-camera-device.h - GObject representing a camera device using GStreamer. 7 * 8 * Authored By Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> 9 * 10 * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/> 11 * 12 * This library is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU Lesser General Public 14 * License as published by the Free Software Foundation; either 15 * version 2 of the License, or (at your option) any later version. 16 * 17 * This library is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * Lesser General Public License for more details. 21 * 22 * You should have received a copy of the GNU Lesser General Public 23 * License along with this library; if not, write to the 24 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 25 * Boston, MA 02111-1307, USA. 26 */ 27 28 #if !defined(__CLUTTER_GST_H_INSIDE__) && !defined(CLUTTER_GST_COMPILATION) 29 #error "Only <clutter-gst/clutter-gst.h> can be included directly." 30 #endif 31 32 #ifndef __CLUTTER_GST_CAMERA_DEVICE_H__ 33 #define __CLUTTER_GST_CAMERA_DEVICE_H__ 34 35 #include <glib-object.h> 36 #include <gst/gstelement.h> 37 38 G_BEGIN_DECLS 39 40 #define CLUTTER_GST_TYPE_CAMERA_DEVICE clutter_gst_camera_device_get_type() 41 42 #define CLUTTER_GST_CAMERA_DEVICE(obj) \ 43 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ 44 CLUTTER_GST_TYPE_CAMERA_DEVICE, ClutterGstCameraDevice)) 45 46 #define CLUTTER_GST_CAMERA_DEVICE_CLASS(klass) \ 47 (G_TYPE_CHECK_CLASS_CAST ((klass), \ 48 CLUTTER_GST_TYPE_CAMERA_DEVICE, ClutterGstCameraDeviceClass)) 49 50 #define CLUTTER_GST_IS_CAMERA_DEVICE(obj) \ 51 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ 52 CLUTTER_GST_TYPE_CAMERA_DEVICE)) 53 54 #define CLUTTER_GST_IS_CAMERA_DEVICE_CLASS(klass) \ 55 (G_TYPE_CHECK_CLASS_TYPE ((klass), \ 56 CLUTTER_GST_TYPE_CAMERA_DEVICE)) 57 58 #define CLUTTER_GST_CAMERA_DEVICE_GET_CLASS(obj) \ 59 (G_TYPE_INSTANCE_GET_CLASS ((obj), \ 60 CLUTTER_GST_TYPE_CAMERA_DEVICE, ClutterGstCameraDeviceClass)) 61 62 typedef struct _ClutterGstCameraDevice ClutterGstCameraDevice; 63 typedef struct _ClutterGstCameraDeviceClass ClutterGstCameraDeviceClass; 64 typedef struct _ClutterGstCameraDevicePrivate ClutterGstCameraDevicePrivate; 65 66 /** 67 * ClutterGstCameraDevice: 68 * 69 * GObject representing a camera device using GStreamer. 70 * 71 * The #ClutterGstCameraDevice structure contains only private data and 72 * should not be accessed directly. 73 */ 74 struct _ClutterGstCameraDevice 75 { 76 /*< private >*/ 77 GObject parent; 78 ClutterGstCameraDevicePrivate *priv; 79 }; 80 81 /** 82 * ClutterGstCameraDeviceClass: 83 * 84 * Base class for #ClutterGstCameraDevice. 85 */ 86 struct _ClutterGstCameraDeviceClass 87 { 88 /*< private >*/ 89 GObjectClass parent_class; 90 91 void (* capture_resolution_changed) (ClutterGstCameraDevice *device, 92 gint width, 93 gint height); 94 95 /* Future padding */ 96 void (* _clutter_reserved1) (void); 97 void (* _clutter_reserved2) (void); 98 void (* _clutter_reserved3) (void); 99 void (* _clutter_reserved4) (void); 100 void (* _clutter_reserved5) (void); 101 void (* _clutter_reserved6) (void); 102 }; 103 104 GType clutter_gst_camera_device_get_type (void) G_GNUC_CONST; 105 106 const gchar * clutter_gst_camera_device_get_node (ClutterGstCameraDevice *device); 107 const gchar * clutter_gst_camera_device_get_name (ClutterGstCameraDevice *device); 108 109 const GPtrArray * clutter_gst_camera_device_get_supported_resolutions (ClutterGstCameraDevice *device); 110 void clutter_gst_camera_device_get_capture_resolution (ClutterGstCameraDevice *device, 111 gint *width, 112 gint *height); 113 void clutter_gst_camera_device_set_capture_resolution (ClutterGstCameraDevice *device, 114 gint width, 115 gint height); 116 117 G_END_DECLS 118 119 #endif /* __CLUTTER_GST_CAMERA_DEVICE_H__ */ 120