mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
Fix indentation of .c files
Required to make gst-indent linter on CI happy.
This commit is contained in:
parent
31a98a889e
commit
7b1dcdab58
2 changed files with 29 additions and 26 deletions
|
@ -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);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
g_signal_emit_by_name (G_OBJECT (obj->obj), "event", event);
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue