summaryrefslogtreecommitdiff
path: root/gst/rtjpeg/gstrtjpegenc.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-14 22:34:33 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-14 22:34:33 +0000
commit7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2 (patch)
treef863b467dea9559a6ec9c48affbfae11f8104164 /gst/rtjpeg/gstrtjpegenc.c
parenta19db4bbdc4a15ea0d8f4d28e9a1302c9c3d1657 (diff)
downloadgstreamer-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.gz
gst-indent
Original commit message from CVS: gst-indent
Diffstat (limited to 'gst/rtjpeg/gstrtjpegenc.c')
-rw-r--r--gst/rtjpeg/gstrtjpegenc.c65
1 files changed, 35 insertions, 30 deletions
diff --git a/gst/rtjpeg/gstrtjpegenc.c b/gst/rtjpeg/gstrtjpegenc.c
index d562471a6..14d7df1f2 100644
--- a/gst/rtjpeg/gstrtjpegenc.c
+++ b/gst/rtjpeg/gstrtjpegenc.c
@@ -32,24 +32,27 @@ GstElementDetails gst_rtjpegenc_details = {
};
/* GstRTJpegEnc signals and args */
-enum {
+enum
+{
/* FILL ME */
LAST_SIGNAL
};
-enum {
+enum
+{
ARG_0,
ARG_QUALITY,
};
-static void gst_rtjpegenc_class_init (GstRTJpegEncClass *klass);
-static void gst_rtjpegenc_base_init (GstRTJpegEncClass *klass);
-static void gst_rtjpegenc_init (GstRTJpegEnc *rtjpegenc);
+static void gst_rtjpegenc_class_init (GstRTJpegEncClass * klass);
+static void gst_rtjpegenc_base_init (GstRTJpegEncClass * klass);
+static void gst_rtjpegenc_init (GstRTJpegEnc * rtjpegenc);
-static void gst_rtjpegenc_chain (GstPad *pad, GstData *_data);
+static void gst_rtjpegenc_chain (GstPad * pad, GstData * _data);
static GstElementClass *parent_class = NULL;
+
/*static guint gst_rtjpegenc_signals[LAST_SIGNAL] = { 0 }; */
GType
@@ -59,23 +62,25 @@ gst_rtjpegenc_get_type (void)
if (!rtjpegenc_type) {
static const GTypeInfo rtjpegenc_info = {
- sizeof(GstRTJpegEncClass),
- (GBaseInitFunc)gst_rtjpegenc_base_init,
+ sizeof (GstRTJpegEncClass),
+ (GBaseInitFunc) gst_rtjpegenc_base_init,
NULL,
- (GClassInitFunc)gst_rtjpegenc_class_init,
+ (GClassInitFunc) gst_rtjpegenc_class_init,
NULL,
NULL,
- sizeof(GstRTJpegEnc),
+ sizeof (GstRTJpegEnc),
0,
- (GInstanceInitFunc)gst_rtjpegenc_init,
+ (GInstanceInitFunc) gst_rtjpegenc_init,
};
- rtjpegenc_type = g_type_register_static(GST_TYPE_ELEMENT, "GstRTJpegEnc", &rtjpegenc_info, 0);
+ rtjpegenc_type =
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRTJpegEnc",
+ &rtjpegenc_info, 0);
}
return rtjpegenc_type;
}
static void
-gst_rtjpegenc_base_init (GstRTJpegEncClass *klass)
+gst_rtjpegenc_base_init (GstRTJpegEncClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
@@ -83,42 +88,42 @@ gst_rtjpegenc_base_init (GstRTJpegEncClass *klass)
}
static void
-gst_rtjpegenc_class_init (GstRTJpegEncClass *klass)
+gst_rtjpegenc_class_init (GstRTJpegEncClass * klass)
{
GstElementClass *gstelement_class;
- gstelement_class = (GstElementClass*)klass;
+ gstelement_class = (GstElementClass *) klass;
- parent_class = g_type_class_ref(GST_TYPE_ELEMENT);
+ parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
}
static void
-gst_rtjpegenc_init (GstRTJpegEnc *rtjpegenc)
+gst_rtjpegenc_init (GstRTJpegEnc * rtjpegenc)
{
- rtjpegenc->sinkpad = gst_pad_new("sink",GST_PAD_SINK);
- gst_element_add_pad(GST_ELEMENT(rtjpegenc),rtjpegenc->sinkpad);
- gst_pad_set_chain_function(rtjpegenc->sinkpad,gst_rtjpegenc_chain);
- rtjpegenc->srcpad = gst_pad_new("src",GST_PAD_SRC);
- gst_element_add_pad(GST_ELEMENT(rtjpegenc),rtjpegenc->srcpad);
+ rtjpegenc->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
+ gst_element_add_pad (GST_ELEMENT (rtjpegenc), rtjpegenc->sinkpad);
+ gst_pad_set_chain_function (rtjpegenc->sinkpad, gst_rtjpegenc_chain);
+ rtjpegenc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
+ gst_element_add_pad (GST_ELEMENT (rtjpegenc), rtjpegenc->srcpad);
}
static void
-gst_rtjpegenc_chain (GstPad *pad, GstData *_data)
+gst_rtjpegenc_chain (GstPad * pad, GstData * _data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstRTJpegEnc *rtjpegenc;
guchar *data;
gulong size;
- g_return_if_fail(pad != NULL);
- g_return_if_fail(GST_IS_PAD(pad));
- g_return_if_fail(buf != NULL);
+ g_return_if_fail (pad != NULL);
+ g_return_if_fail (GST_IS_PAD (pad));
+ g_return_if_fail (buf != NULL);
rtjpegenc = GST_RTJPEGENC (GST_OBJECT_PARENT (pad));
- data = GST_BUFFER_DATA(buf);
- size = GST_BUFFER_SIZE(buf);
+ data = GST_BUFFER_DATA (buf);
+ size = GST_BUFFER_SIZE (buf);
- gst_info("would be encoding frame here\n");
+ gst_info ("would be encoding frame here\n");
- gst_pad_push(rtjpegenc->srcpad,GST_DATA (buf));
+ gst_pad_push (rtjpegenc->srcpad, GST_DATA (buf));
}