+2006-05-19 Edgard Lima <edgard.lima@indt.org.br>
+
+ * sys/v4l2/gstv4l2.c:
+ * sys/v4l2/gstv4l2object.c:
+ * sys/v4l2/gstv4l2object.h:
+ * sys/v4l2/gstv4l2src.c:
+ Some clean-ups requested by wingo in bug #338818.
+
2006-05-19 Michael Smith <msmith@fluendo.com>
* ext/alsaspdif/alsaspdifsink.c: (alsaspdifsink_base_init),
* gstv4l2.c: plugin for v4l2 elements
*
* Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
- * Copyright (C) 2001-2002 Edgard Lima <edgard.lima@indt.org.br>
+ * Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
}
void
-gst_v4l2object_install_properties_helper (GObjectClass * gobject_class)
+gst_v4l2_object_install_properties_helper (GObjectClass * gobject_class)
{
g_object_class_install_property
}
GstV4l2Object *
-gst_v4l2object_new (GstElement * element,
+gst_v4l2_object_new (GstElement * element,
GstV4l2GetInOutFunction get_in_out_func,
GstV4l2SetInOutFunction set_in_out_func,
GstV4l2UpdateFpsFunction update_fps_func)
void
-gst_v4l2object_destroy (GstV4l2Object ** v4l2object)
+gst_v4l2_object_destroy (GstV4l2Object ** v4l2object)
{
if (*v4l2object) {
gboolean
-gst_v4l2object_set_property_helper (GstV4l2Object * v4l2object,
+gst_v4l2_object_set_property_helper (GstV4l2Object * v4l2object,
guint prop_id, const GValue * value, GParamSpec * pspec)
{
gboolean
-gst_v4l2object_get_property_helper (GstV4l2Object * v4l2object,
+gst_v4l2_object_get_property_helper (GstV4l2Object * v4l2object,
guint prop_id, GValue * value, GParamSpec * pspec)
{
switch (prop_id) {
gboolean
-gst_v4l2object_start (GstV4l2Object * v4l2object)
+gst_v4l2_object_start (GstV4l2Object * v4l2object)
{
if (gst_v4l2_open (v4l2object))
gst_v4l2_set_defaults (v4l2object);
}
gboolean
-gst_v4l2object_stop (GstV4l2Object * v4l2object)
+gst_v4l2_object_stop (GstV4l2Object * v4l2object)
{
#ifdef HAVE_XVIDEO
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GST_V4L2OBJECT_H__
-#define __GST_V4L2OBJECT_H__
+#ifndef __GST_V4L2_OBJECT_H__
+#define __GST_V4L2_OBJECT_H__
/* Because of some really cool feature in video4linux1, also known as
* 'not including sys/types.h and sys/time.h', we had to include it
G_BEGIN_DECLS
-#define GST_V4L2OBJECT(obj) (GstV4l2Object *)(obj)
+#define GST_V4L2_OBJECT(obj) (GstV4l2Object *)(obj)
typedef struct _GstV4l2Object GstV4l2Object;
typedef struct _GstV4l2ObjectClassHelper GstV4l2ObjectClassHelper;
};
-GType gst_v4l2object_get_type(void);
+GType gst_v4l2_object_get_type(void);
#define V4L2_STD_OBJECT_PROPS \
extern GstV4l2Object *
-gst_v4l2object_new (GstElement * element,
+gst_v4l2_object_new (GstElement * element,
GstV4l2GetInOutFunction get_in_out_func,
GstV4l2SetInOutFunction set_in_out_func,
GstV4l2UpdateFpsFunction update_fps_func);
extern void
-gst_v4l2object_destroy (GstV4l2Object ** v4l2object);
+gst_v4l2_object_destroy (GstV4l2Object ** v4l2object);
extern void
-gst_v4l2object_install_properties_helper (GObjectClass *gobject_class);
+gst_v4l2_object_install_properties_helper (GObjectClass *gobject_class);
extern gboolean
-gst_v4l2object_set_property_helper (GstV4l2Object *v4l2object,
+gst_v4l2_object_set_property_helper (GstV4l2Object *v4l2object,
guint prop_id, const GValue * value, GParamSpec * pspec);
extern gboolean
-gst_v4l2object_get_property_helper (GstV4l2Object *v4l2object,
+gst_v4l2_object_get_property_helper (GstV4l2Object *v4l2object,
guint prop_id, GValue * value, GParamSpec * pspec);
-extern gboolean gst_v4l2object_start (GstV4l2Object *v4l2object);
-extern gboolean gst_v4l2object_stop (GstV4l2Object *v4l2object);
+extern gboolean gst_v4l2_object_start (GstV4l2Object *v4l2object);
+extern gboolean gst_v4l2_object_stop (GstV4l2Object *v4l2object);
extern const GList *
gst_v4l2_probe_get_properties (GstPropertyProbe * probe);
G_END_DECLS
-#endif /* __GST_V4L2OBJECT_H__ */
+#endif /* __GST_V4L2_OBJECT_H__ */
gobject_class->set_property = gst_v4l2src_set_property;
gobject_class->get_property = gst_v4l2src_get_property;
- gst_v4l2object_install_properties_helper (gobject_class);
+ gst_v4l2_object_install_properties_helper (gobject_class);
g_object_class_install_property
(gobject_class, PROP_USE_FIXED_FPS,
gst_v4l2src_init (GstV4l2Src * v4l2src, GstV4l2SrcClass * klass)
{
- v4l2src->v4l2object = gst_v4l2object_new (GST_ELEMENT (v4l2src),
+ v4l2src->v4l2object = gst_v4l2_object_new (GST_ELEMENT (v4l2src),
gst_v4l2_get_input, gst_v4l2_set_input, gst_v4l2src_update_fps);
v4l2src->breq.count = 0;
v4l2src = GST_V4L2SRC (object);
- if (!gst_v4l2object_set_property_helper (v4l2src->v4l2object,
+ if (!gst_v4l2_object_set_property_helper (v4l2src->v4l2object,
prop_id, value, pspec)) {
switch (prop_id) {
g_return_if_fail (GST_IS_V4L2SRC (object));
v4l2src = GST_V4L2SRC (object);
- if (!gst_v4l2object_get_property_helper (v4l2src->v4l2object,
+ if (!gst_v4l2_object_get_property_helper (v4l2src->v4l2object,
prop_id, value, pspec)) {
switch (prop_id) {
{
GstV4l2Src *v4l2src = GST_V4L2SRC (src);
- if (!gst_v4l2object_start (v4l2src->v4l2object))
+ if (!gst_v4l2_object_start (v4l2src->v4l2object))
return FALSE;
v4l2src->offset = 0;
return FALSE;
}
- if (!gst_v4l2object_stop (v4l2src->v4l2object))
+ if (!gst_v4l2_object_stop (v4l2src->v4l2object))
return FALSE;
return TRUE;