Commit 7b1dcdab authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

Fix indentation of .c files

Required to make gst-indent linter on CI happy.
parent 31a98a88
Pipeline #12409 passed with stages
in 29 minutes and 41 seconds
......@@ -10,16 +10,19 @@ enum
static guint test_object_signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE(TestObject, test_object, G_TYPE_OBJECT);
G_DEFINE_TYPE (TestObject, test_object, G_TYPE_OBJECT);
static void test_object_init (TestObject *self) {}
static void test_object_class_init (TestObjectClass *klass)
static void
test_object_init (TestObject * self)
{
}
static void
test_object_class_init (TestObjectClass * klass)
{
test_object_signals[SIGNAL_EVENT] =
g_signal_new ("event", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (TestObjectClass, event), NULL, NULL,
g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1,
GST_TYPE_EVENT);
G_STRUCT_OFFSET (TestObjectClass, event), NULL, NULL,
g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_EVENT);
}
......@@ -12,45 +12,45 @@ _wrap_get_object (PyObject * self)
if (!obj) {
return NULL;
}
return pygobject_new(obj);
return pygobject_new (obj);
}
static PyObject *
_wrap_emit_event (PyObject * self, PyObject *args)
_wrap_emit_event (PyObject * self, PyObject * args)
{
PyGObject *obj;
GstEventType event_type = GST_EVENT_UNKNOWN;
GstEvent *event;
if (!PyArg_ParseTuple(args, "O|i", &obj, &event_type))
if (!PyArg_ParseTuple (args, "O|i", &obj, &event_type))
return NULL;
event = gst_event_new_custom(event_type, NULL);
g_signal_emit_by_name(G_OBJECT(obj->obj), "event", event);
gst_mini_object_unref(GST_MINI_OBJECT(event));
event = gst_event_new_custom (event_type, NULL);
g_signal_emit_by_name (G_OBJECT (obj->obj), "event", event);
Py_INCREF(Py_None);
gst_mini_object_unref (GST_MINI_OBJECT (event));
Py_INCREF (Py_None);
return Py_None;
}
static PyMethodDef testhelper_methods[] = {
{ "get_object", (PyCFunction)_wrap_get_object, METH_NOARGS },
{ "emit_event", (PyCFunction)_wrap_emit_event, METH_VARARGS },
{ NULL, NULL }
{"get_object", (PyCFunction) _wrap_get_object, METH_NOARGS},
{"emit_event", (PyCFunction) _wrap_emit_event, METH_VARARGS},
{NULL, NULL}
};
void
void
inittesthelper ()
{
PyObject *m, *d;
init_pygobject();
gst_init(NULL, NULL);
init_pygobject ();
gst_init (NULL, NULL);
m = Py_InitModule ("testhelper", testhelper_methods);
d = PyModule_GetDict(m);
d = PyModule_GetDict (m);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment