diff options
author | Alessandro Decina <alessandro.decina@collabora.co.uk> | 2011-11-16 17:43:59 +0100 |
---|---|---|
committer | Alessandro Decina <alessandro.decina@collabora.co.uk> | 2011-11-16 17:43:59 +0100 |
commit | 4070eb03c77dbec0bf7d6b6dff6e0ff253e9b820 (patch) | |
tree | bf4577182dcd944076cb7ba1caf67387197986ae | |
parent | 3e9b17f31ce17e658757b5c8e984cf04c0d16cf6 (diff) |
gst-indent gstducatividdec.c
-rw-r--r-- | src/gstducatividdec.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c index cacd996..d5c1c15 100644 --- a/src/gstducatividdec.c +++ b/src/gstducatividdec.c @@ -95,7 +95,7 @@ engine_open (GstDucatiVidDec * self) GST_DEBUG_OBJECT (self, "opening engine"); - self->engine = Engine_open ((String)"ivahd_vidsvr", NULL, NULL); + self->engine = Engine_open ((String) "ivahd_vidsvr", NULL, NULL); if (G_UNLIKELY (!self->engine)) { GST_ERROR_OBJECT (self, "could not create engine"); return FALSE; @@ -118,7 +118,7 @@ codec_delete (GstDucatiVidDec * self) } if (self->codec) { - VIDDEC3_delete(self->codec); + VIDDEC3_delete (self->codec); self->codec = NULL; } @@ -149,13 +149,16 @@ codec_create (GstDucatiVidDec * self) /* create codec: */ GST_DEBUG_OBJECT (self, "creating codec: %s", codec_name); - self->codec = VIDDEC3_create (self->engine, (String)codec_name, self->params); + self->codec = + VIDDEC3_create (self->engine, (String) codec_name, self->params); if (!self->codec) { return FALSE; } - err = VIDDEC3_control (self->codec, XDM_SETPARAMS, self->dynParams, self->status); + err = + VIDDEC3_control (self->codec, XDM_SETPARAMS, self->dynParams, + self->status); if (err) { GST_ERROR_OBJECT (self, "failed XDM_SETPARAMS"); return FALSE; @@ -221,8 +224,10 @@ codec_prepare_outbuf (GstDucatiVidDec * self, GstBuffer * buf) self->outBufs->descs[0].memType = y_type; self->outBufs->descs[1].memType = uv_type; if (y_type == XDM_MEMTYPE_RAW || y_type == XDM_MEMTYPE_TILEDPAGE) { - self->outBufs->descs[0].bufSize.bytes = self->stride * self->padded_height; - self->outBufs->descs[1].bufSize.bytes = self->stride * self->padded_height / 2; + self->outBufs->descs[0].bufSize.bytes = + self->stride * self->padded_height; + self->outBufs->descs[1].bufSize.bytes = + self->stride * self->padded_height / 2; } else { self->outBufs->descs[0].bufSize.tileMem.width = self->padded_width; self->outBufs->descs[0].bufSize.tileMem.height = self->padded_height; @@ -362,8 +367,7 @@ codec_flush (GstDucatiVidDec * self, gboolean eos) return TRUE; } - err = VIDDEC3_control (self->codec, XDM_FLUSH, - self->dynParams, self->status); + err = VIDDEC3_control (self->codec, XDM_FLUSH, self->dynParams, self->status); if (err) { GST_ERROR_OBJECT (self, "failed XDM_FLUSH"); goto out; @@ -400,8 +404,8 @@ gst_ducati_viddec_parse_caps (GstDucatiVidDec * self, GstStructure * s) if (gst_structure_get_int (s, "width", &w) && gst_structure_get_int (s, "height", &h)) { - h = ALIGN2 (h, 4); /* round up to MB */ - w = ALIGN2 (w, 4); /* round up to MB */ + h = ALIGN2 (h, 4); /* round up to MB */ + w = ALIGN2 (w, 4); /* round up to MB */ /* if we've already created codec, but the resolution has changed, we * need to re-create the codec: @@ -412,7 +416,7 @@ gst_ducati_viddec_parse_caps (GstDucatiVidDec * self, GstStructure * s) } } - self->width = w; + self->width = w; self->height = h; codec_data = gst_structure_get_value (s, "codec_data"); @@ -545,8 +549,7 @@ gst_ducati_viddec_sink_setcaps (GstPad * pad, GstCaps * caps) gst_caps_truncate (outcaps); } else { outcaps = gst_caps_new_simple ("video/x-raw-yuv-strided", - "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('N', 'V', '1', '2'), - NULL); + "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('N', 'V', '1', '2'), NULL); } out_s = gst_caps_get_structure (outcaps, 0); @@ -590,7 +593,7 @@ gst_ducati_viddec_query (GstPad * pad, GstQuery * query) gboolean res = TRUE, forward = TRUE; GstDucatiVidDec *self = GST_DUCATIVIDDEC (GST_OBJECT_PARENT (pad)); - GST_DEBUG_OBJECT (self, "query: %"GST_PTR_FORMAT, query); + GST_DEBUG_OBJECT (self, "query: %" GST_PTR_FORMAT, query); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_BUFFERS: @@ -745,8 +748,7 @@ gst_ducati_viddec_event (GstPad * pad, GstEvent * event) } static GstStateChangeReturn -gst_ducati_viddec_change_state (GstElement * element, - GstStateChange transition) +gst_ducati_viddec_change_state (GstElement * element, GstStateChange transition) { GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; GstDucatiVidDec *self = GST_DUCATIVIDDEC (element); @@ -797,17 +799,17 @@ gst_ducati_viddec_get_property (GObject * obj, GstDucatiVidDec *self = GST_DUCATIVIDDEC (obj); switch (prop_id) { - case PROP_VERSION: { + case PROP_VERSION:{ int err; char *version = gst_ducati_alloc_1d (VERSION_LENGTH); /* in case something fails: */ snprintf (version, VERSION_LENGTH, "unsupported"); - if (! self->engine) + if (!self->engine) engine_open (self); - if (! self->codec) + if (!self->codec) codec_create (self); if (self->codec) { @@ -830,7 +832,7 @@ gst_ducati_viddec_get_property (GObject * obj, break; } - default: { + default:{ G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec); break; } @@ -846,8 +848,8 @@ gst_ducati_viddec_finalize (GObject * obj) engine_close (self); if (self->codec_data) { - gst_buffer_unref (self->codec_data); - self->codec_data = NULL; + gst_buffer_unref (self->codec_data); + self->codec_data = NULL; } G_OBJECT_CLASS (parent_class)->finalize (obj); @@ -870,17 +872,14 @@ gst_ducati_viddec_class_init (GstDucatiVidDecClass * klass) gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_ducati_viddec_get_property); - gobject_class->finalize = - GST_DEBUG_FUNCPTR (gst_ducati_viddec_finalize); + gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_ducati_viddec_finalize); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_ducati_viddec_change_state); - klass->parse_caps = - GST_DEBUG_FUNCPTR (gst_ducati_viddec_parse_caps); + klass->parse_caps = GST_DEBUG_FUNCPTR (gst_ducati_viddec_parse_caps); klass->allocate_params = GST_DEBUG_FUNCPTR (gst_ducati_viddec_allocate_params); - klass->push_input = - GST_DEBUG_FUNCPTR (gst_ducati_viddec_push_input); + klass->push_input = GST_DEBUG_FUNCPTR (gst_ducati_viddec_push_input); g_object_class_install_property (gobject_class, PROP_VERSION, g_param_spec_string ("version", "Version", @@ -893,8 +892,9 @@ gst_ducati_viddec_init (GstDucatiVidDec * self, GstDucatiVidDecClass * klass) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); - self->sinkpad = gst_pad_new_from_template ( - gst_element_class_get_pad_template (gstelement_class, "sink"), "sink"); + self->sinkpad = + gst_pad_new_from_template (gst_element_class_get_pad_template + (gstelement_class, "sink"), "sink"); gst_pad_set_setcaps_function (self->sinkpad, GST_DEBUG_FUNCPTR (gst_ducati_viddec_sink_setcaps)); gst_pad_set_chain_function (self->sinkpad, @@ -904,7 +904,7 @@ gst_ducati_viddec_init (GstDucatiVidDec * self, GstDucatiVidDecClass * klass) self->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); gst_pad_set_query_function (self->srcpad, - GST_DEBUG_FUNCPTR (gst_ducati_viddec_query)); + GST_DEBUG_FUNCPTR (gst_ducati_viddec_query)); gst_element_add_pad (GST_ELEMENT (self), self->sinkpad); gst_element_add_pad (GST_ELEMENT (self), self->srcpad); |