+2005-12-01 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * plugins/elements/gstelements.c:
+ * plugins/elements/gstfdsink.c: (gst_fd_sink__base_init),
+ (gst_fd_sink__class_init), (gst_fd_sink__init),
+ (gst_fd_sink__chain), (gst_fd_sink__set_property),
+ (gst_fd_sink__get_property):
+ * plugins/elements/gstfdsink.h:
+ * plugins/elements/gstfdsrc.c: (_do_init), (gst_fd_src_base_init),
+ (gst_fd_src_class_init), (gst_fd_src_init), (gst_fd_src_dispose),
+ (gst_fd_src_update_fd), (gst_fd_src_start), (gst_fd_src_stop),
+ (gst_fd_src_unlock), (gst_fd_src_set_property),
+ (gst_fd_src_get_property), (gst_fd_src_create),
+ (gst_fd_src_is_seekable), (gst_fd_src_get_size),
+ (gst_fd_src_uri_get_type), (gst_fd_src_uri_get_protocols),
+ (gst_fd_src_uri_get_uri), (gst_fd_src_uri_set_uri),
+ (gst_fd_src_uri_handler_init):
+ * plugins/elements/gstfdsrc.h:
+ * plugins/elements/gstqueue.c: (gst_queue_get_type):
+ more anal cleanup
+
2005-11-30 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
* docs/gst/Makefile.am:
#GstBuffer, #GstCaps, #GstEvent
</para>
+<!-- ##### SECTION Stability_Level ##### -->
+
+
<!-- ##### ENUM GstDPHeaderFlag ##### -->
<para>
{"fakesrc", GST_RANK_NONE, gst_fake_src_get_type},
{"fakesink", GST_RANK_NONE, gst_fake_sink_get_type},
#if HAVE_SYS_SOCKET_H
- {"fdsrc", GST_RANK_NONE, gst_fdsrc_get_type},
+ {"fdsrc", GST_RANK_NONE, gst_fd_src_get_type},
#endif
{"filesrc", GST_RANK_NONE, gst_file_src_get_type},
{"identity", GST_RANK_NONE, gst_identity_get_type},
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
-#define GST_CAT_DEFAULT gst_fdsink_debug
+GST_DEBUG_CATEGORY_STATIC (gst_fd_sink__debug);
+#define GST_CAT_DEFAULT gst_fd_sink__debug
-static GstElementDetails gst_fdsink_details =
+static GstElementDetails gst_fd_sink__details =
GST_ELEMENT_DETAILS ("Filedescriptor Sink",
"Sink/File",
"Write data to a file descriptor",
#define _do_init(bla) \
- GST_DEBUG_CATEGORY_INIT (gst_fdsink_debug, "fdsink", 0, "fdsink element");
+ GST_DEBUG_CATEGORY_INIT (gst_fd_sink__debug, "fdsink", 0, "fdsink element");
-GST_BOILERPLATE_FULL (GstFdSink, gst_fdsink, GstElement, GST_TYPE_ELEMENT,
+GST_BOILERPLATE_FULL (GstFdSink, gst_fd_sink_, GstElement, GST_TYPE_ELEMENT,
_do_init);
-static void gst_fdsink_set_property (GObject * object, guint prop_id,
+static void gst_fd_sink__set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
-static void gst_fdsink_get_property (GObject * object, guint prop_id,
+static void gst_fd_sink__get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static void gst_fdsink_chain (GstPad * pad, GstData * _data);
+static void gst_fd_sink__chain (GstPad * pad, GstData * _data);
static void
-gst_fdsink_base_init (gpointer g_class)
+gst_fd_sink__base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
- gst_element_class_set_details (gstelement_class, &gst_fdsink_details);
+ gst_element_class_set_details (gstelement_class, &gst_fd_sink__details);
}
static void
-gst_fdsink_class_init (GstFdSinkClass * klass)
+gst_fd_sink__class_init (GstFdSinkClass * klass)
{
GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->set_property = gst_fdsink_set_property;
- gobject_class->get_property = gst_fdsink_get_property;
+ gobject_class->set_property = gst_fd_sink__set_property;
+ gobject_class->get_property = gst_fd_sink__get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
}
static void
-gst_fdsink_init (GstFdSink * fdsink)
+gst_fd_sink__init (GstFdSink * fdsink)
{
fdsink->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink");
gst_element_add_pad (GST_ELEMENT (fdsink), fdsink->sinkpad);
- gst_pad_set_chain_function (fdsink->sinkpad, gst_fdsink_chain);
+ gst_pad_set_chain_function (fdsink->sinkpad, gst_fd_sink__chain);
fdsink->fd = 1;
}
static void
-gst_fdsink_chain (GstPad * pad, GstData * _data)
+gst_fd_sink__chain (GstPad * pad, GstData * _data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstFdSink *fdsink;
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL);
- fdsink = GST_FDSINK (gst_pad_get_parent (pad));
+ fdsink = GST_FD_SINK (gst_pad_get_parent (pad));
g_return_if_fail (fdsink->fd >= 0);
}
static void
-gst_fdsink_set_property (GObject * object, guint prop_id, const GValue * value,
- GParamSpec * pspec)
+gst_fd_sink__set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
{
GstFdSink *fdsink;
- g_return_if_fail (GST_IS_FDSINK (object));
+ g_return_if_fail (GST_IS_FD_SINK (object));
- fdsink = GST_FDSINK (object);
+ fdsink = GST_FD_SINK (object);
switch (prop_id) {
case ARG_FD:
}
static void
-gst_fdsink_get_property (GObject * object, guint prop_id, GValue * value,
+gst_fd_sink__get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
GstFdSink *fdsink;
- g_return_if_fail (GST_IS_FDSINK (object));
+ g_return_if_fail (GST_IS_FD_SINK (object));
- fdsink = GST_FDSINK (object);
+ fdsink = GST_FD_SINK (object);
switch (prop_id) {
case ARG_FD:
*/
-#ifndef __GST_FDSINK_H__
-#define __GST_FDSINK_H__
+#ifndef __GST_FD_SINK_H__
+#define __GST_FD_SINK_H__
#include <gst/gst.h>
G_BEGIN_DECLS
-#define GST_TYPE_FDSINK \
- (gst_fdsink_get_type())
-#define GST_FDSINK(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FDSINK,GstFdSink))
-#define GST_FDSINK_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FDSINK,GstFdSinkClass))
-#define GST_IS_FDSINK(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FDSINK))
-#define GST_IS_FDSINK_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSINK))
+#define GST_TYPE_FD_SINK \
+ (gst_fd_sink__get_type())
+#define GST_FD_SINK(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FD_SINK,GstFdSink))
+#define GST_FD_SINK_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FD_SINK,GstFdSinkClass))
+#define GST_IS_FD_SINK(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FD_SINK))
+#define GST_IS_FD_SINK_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FD_SINK))
typedef struct _GstFdSink GstFdSink;
typedef struct _GstFdSinkClass GstFdSinkClass;
GstElementClass parent_class;
};
-GType gst_fdsink_get_type(void);
+GType gst_fd_sink__get_type(void);
G_END_DECLS
-#endif /* __GST_FDSINK_H__ */
+#endif /* __GST_FD_SINK_H__ */
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-GST_DEBUG_CATEGORY_STATIC (gst_fdsrc_debug);
-#define GST_CAT_DEFAULT gst_fdsrc_debug
+GST_DEBUG_CATEGORY_STATIC (gst_fd_src_debug);
+#define GST_CAT_DEFAULT gst_fd_src_debug
-static GstElementDetails gst_fdsrc_details = GST_ELEMENT_DETAILS ("Disk Source",
+static GstElementDetails gst_fd_src_details =
+GST_ELEMENT_DETAILS ("Disk Source",
"Source/File",
"Synchronous read from a file",
"Erik Walthinsen <omega@cse.ogi.edu>");
PROP_FD,
};
-static void gst_fdsrc_uri_handler_init (gpointer g_iface, gpointer iface_data);
+static void gst_fd_src_uri_handler_init (gpointer g_iface, gpointer iface_data);
static void
-_do_init (GType fdsrc_type)
+_do_init (GType fd_src_type)
{
static const GInterfaceInfo urihandler_info = {
- gst_fdsrc_uri_handler_init,
+ gst_fd_src_uri_handler_init,
NULL,
NULL
};
- g_type_add_interface_static (fdsrc_type, GST_TYPE_URI_HANDLER,
+ g_type_add_interface_static (fd_src_type, GST_TYPE_URI_HANDLER,
&urihandler_info);
- GST_DEBUG_CATEGORY_INIT (gst_fdsrc_debug, "fdsrc", 0, "fdsrc element");
+ GST_DEBUG_CATEGORY_INIT (gst_fd_src_debug, "fdsrc", 0, "fdsrc element");
}
-GST_BOILERPLATE_FULL (GstFdSrc, gst_fdsrc, GstElement, GST_TYPE_PUSH_SRC,
+GST_BOILERPLATE_FULL (GstFdSrc, gst_fd_src, GstElement, GST_TYPE_PUSH_SRC,
_do_init);
-static void gst_fdsrc_set_property (GObject * object, guint prop_id,
+static void gst_fd_src_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
-static void gst_fdsrc_get_property (GObject * object, guint prop_id,
+static void gst_fd_src_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static void gst_fdsrc_dispose (GObject * obj);
+static void gst_fd_src_dispose (GObject * obj);
-static gboolean gst_fdsrc_start (GstBaseSrc * bsrc);
-static gboolean gst_fdsrc_stop (GstBaseSrc * bsrc);
-static gboolean gst_fdsrc_unlock (GstBaseSrc * bsrc);
-static gboolean gst_fdsrc_is_seekable (GstBaseSrc * bsrc);
-static gboolean gst_fdsrc_get_size (GstBaseSrc * src, guint64 * size);
+static gboolean gst_fd_src_start (GstBaseSrc * bsrc);
+static gboolean gst_fd_src_stop (GstBaseSrc * bsrc);
+static gboolean gst_fd_src_unlock (GstBaseSrc * bsrc);
+static gboolean gst_fd_src_is_seekable (GstBaseSrc * bsrc);
+static gboolean gst_fd_src_get_size (GstBaseSrc * src, guint64 * size);
-static GstFlowReturn gst_fdsrc_create (GstPushSrc * psrc, GstBuffer ** outbuf);
+static GstFlowReturn gst_fd_src_create (GstPushSrc * psrc, GstBuffer ** outbuf);
static void
-gst_fdsrc_base_init (gpointer g_class)
+gst_fd_src_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
- gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
+ gst_element_class_set_details (gstelement_class, &gst_fd_src_details);
}
static void
-gst_fdsrc_class_init (GstFdSrcClass * klass)
+gst_fd_src_class_init (GstFdSrcClass * klass)
{
GObjectClass *gobject_class;
GstBaseSrcClass *gstbasesrc_class;
parent_class = g_type_class_ref (GST_TYPE_PUSH_SRC);
- gobject_class->set_property = gst_fdsrc_set_property;
- gobject_class->get_property = gst_fdsrc_get_property;
- gobject_class->dispose = gst_fdsrc_dispose;
+ gobject_class->set_property = gst_fd_src_set_property;
+ gobject_class->get_property = gst_fd_src_get_property;
+ gobject_class->dispose = gst_fd_src_dispose;
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE));
- gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_fdsrc_start);
- gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_fdsrc_stop);
- gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_fdsrc_unlock);
- gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_fdsrc_is_seekable);
- gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_fdsrc_get_size);
+ gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_fd_src_start);
+ gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_fd_src_stop);
+ gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_fd_src_unlock);
+ gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_fd_src_is_seekable);
+ gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_fd_src_get_size);
- gstpush_src_class->create = GST_DEBUG_FUNCPTR (gst_fdsrc_create);
+ gstpush_src_class->create = GST_DEBUG_FUNCPTR (gst_fd_src_create);
}
static void
-gst_fdsrc_init (GstFdSrc * fdsrc, GstFdSrcClass * klass)
+gst_fd_src_init (GstFdSrc * fdsrc, GstFdSrcClass * klass)
{
fdsrc->fd = 0;
fdsrc->new_fd = 0;
}
static void
-gst_fdsrc_dispose (GObject * obj)
+gst_fd_src_dispose (GObject * obj)
{
- GstFdSrc *src = GST_FDSRC (obj);
+ GstFdSrc *src = GST_FD_SRC (obj);
g_free (src->uri);
src->uri = NULL;
}
static void
-gst_fdsrc_update_fd (GstFdSrc * src)
+gst_fd_src_update_fd (GstFdSrc * src)
{
struct stat stat_results;
}
static gboolean
-gst_fdsrc_start (GstBaseSrc * bsrc)
+gst_fd_src_start (GstBaseSrc * bsrc)
{
- GstFdSrc *src = GST_FDSRC (bsrc);
+ GstFdSrc *src = GST_FD_SRC (bsrc);
gint control_sock[2];
src->curoffset = 0;
- gst_fdsrc_update_fd (src);
+ gst_fd_src_update_fd (src);
if (socketpair (PF_UNIX, SOCK_STREAM, 0, control_sock) < 0)
goto socket_pair;
}
static gboolean
-gst_fdsrc_stop (GstBaseSrc * bsrc)
+gst_fd_src_stop (GstBaseSrc * bsrc)
{
- GstFdSrc *src = GST_FDSRC (bsrc);
+ GstFdSrc *src = GST_FD_SRC (bsrc);
close (READ_SOCKET (src));
close (WRITE_SOCKET (src));
}
static gboolean
-gst_fdsrc_unlock (GstBaseSrc * bsrc)
+gst_fd_src_unlock (GstBaseSrc * bsrc)
{
- GstFdSrc *src = GST_FDSRC (bsrc);
+ GstFdSrc *src = GST_FD_SRC (bsrc);
SEND_COMMAND (src, CONTROL_STOP);
}
static void
-gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
+gst_fd_src_set_property (GObject * object, guint prop_id, const GValue * value,
GParamSpec * pspec)
{
- GstFdSrc *src = GST_FDSRC (object);
+ GstFdSrc *src = GST_FD_SRC (object);
switch (prop_id) {
case PROP_FD:
* so it is reflected in get_properties and uri */
GST_OBJECT_LOCK (object);
if (GST_STATE (GST_ELEMENT (src)) <= GST_STATE_READY) {
- gst_fdsrc_update_fd (src);
+ gst_fd_src_update_fd (src);
}
GST_OBJECT_UNLOCK (object);
break;
}
static void
-gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value,
+gst_fd_src_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
- GstFdSrc *src = GST_FDSRC (object);
+ GstFdSrc *src = GST_FD_SRC (object);
switch (prop_id) {
case PROP_FD:
}
static GstFlowReturn
-gst_fdsrc_create (GstPushSrc * psrc, GstBuffer ** outbuf)
+gst_fd_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
{
GstFdSrc *src;
GstBuffer *buf;
gint retval;
#endif
- src = GST_FDSRC (psrc);
+ src = GST_FD_SRC (psrc);
#ifndef HAVE_WIN32
FD_ZERO (&readfds);
}
gboolean
-gst_fdsrc_is_seekable (GstBaseSrc * bsrc)
+gst_fd_src_is_seekable (GstBaseSrc * bsrc)
{
- GstFdSrc *src = GST_FDSRC (bsrc);
+ GstFdSrc *src = GST_FD_SRC (bsrc);
return src->seekable_fd;
}
gboolean
-gst_fdsrc_get_size (GstBaseSrc * bsrc, guint64 * size)
+gst_fd_src_get_size (GstBaseSrc * bsrc, guint64 * size)
{
- GstFdSrc *src = GST_FDSRC (bsrc);
+ GstFdSrc *src = GST_FD_SRC (bsrc);
struct stat stat_results;
if (!src->seekable_fd) {
/*** GSTURIHANDLER INTERFACE *************************************************/
static guint
-gst_fdsrc_uri_get_type (void)
+gst_fd_src_uri_get_type (void)
{
return GST_URI_SRC;
}
static gchar **
-gst_fdsrc_uri_get_protocols (void)
+gst_fd_src_uri_get_protocols (void)
{
static gchar *protocols[] = { "fd", NULL };
return protocols;
}
static const gchar *
-gst_fdsrc_uri_get_uri (GstURIHandler * handler)
+gst_fd_src_uri_get_uri (GstURIHandler * handler)
{
- GstFdSrc *src = GST_FDSRC (handler);
+ GstFdSrc *src = GST_FD_SRC (handler);
return src->uri;
}
static gboolean
-gst_fdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri)
+gst_fd_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
{
gchar *protocol;
- GstFdSrc *src = GST_FDSRC (handler);
+ GstFdSrc *src = GST_FD_SRC (handler);
gint fd;
protocol = gst_uri_get_protocol (uri);
GST_OBJECT_LOCK (src);
if (GST_STATE (GST_ELEMENT (src)) <= GST_STATE_READY) {
- gst_fdsrc_update_fd (src);
+ gst_fd_src_update_fd (src);
}
GST_OBJECT_UNLOCK (src);
}
static void
-gst_fdsrc_uri_handler_init (gpointer g_iface, gpointer iface_data)
+gst_fd_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
{
GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
- iface->get_type = gst_fdsrc_uri_get_type;
- iface->get_protocols = gst_fdsrc_uri_get_protocols;
- iface->get_uri = gst_fdsrc_uri_get_uri;
- iface->set_uri = gst_fdsrc_uri_set_uri;
+ iface->get_type = gst_fd_src_uri_get_type;
+ iface->get_protocols = gst_fd_src_uri_get_protocols;
+ iface->get_uri = gst_fd_src_uri_get_uri;
+ iface->set_uri = gst_fd_src_uri_set_uri;
}
*/
-#ifndef __GST_FDSRC_H__
-#define __GST_FDSRC_H__
+#ifndef __GST_FD_SRC_H__
+#define __GST_FD_SRC_H__
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
G_BEGIN_DECLS
-#define GST_TYPE_FDSRC \
- (gst_fdsrc_get_type())
-#define GST_FDSRC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FDSRC,GstFdSrc))
-#define GST_FDSRC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FDSRC,GstFdSrcClass))
-#define GST_IS_FDSRC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FDSRC))
-#define GST_IS_FDSRC_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSRC))
+#define GST_TYPE_FD_SRC \
+ (gst_fd_src_get_type())
+#define GST_FD_SRC(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FD_SRC,GstFdSrc))
+#define GST_FD_SRC_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FD_SRC,GstFdSrcClass))
+#define GST_IS_FD_SRC(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FD_SRC))
+#define GST_IS_FD_SRC_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FD_SRC))
typedef struct _GstFdSrc GstFdSrc;
void (*timeout) (GstElement *element);
};
-GType gst_fdsrc_get_type(void);
+GType gst_fd_src_get_type(void);
G_END_DECLS
-#endif /* __GST_FDSRC_H__ */
+#endif /* __GST_FD_SRC_H__ */