~ubuntu-branches/ubuntu/precise/gst0.10-python/precise

1.1.5 by Loic Minier
Import upstream version 0.10.9
1
/* -*- Mode: C; ; c-file-style: "k&r"; c-basic-offset: 4 -*- */
2
/* gst-python
3
 * Copyright (C) 2007 Johan Dahlin
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Library General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Library General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Library General Public
16
 * License along with this library; if not, write to the
17
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
 * Boston, MA 02111-1307, USA.
19
 * 
20
 * Author: Johan Dahlin <johan@gnome.org>
21
 */
22
23
#include <Python.h>
24
#include <pygobject.h>
25
#include <gst/gst.h>
26
27
static PyObject *
28
_wrap_gstoption_get_group (PyObject *self)
29
{
30
  GOptionGroup *option_group;
31
32
  option_group = gst_init_get_option_group();
33
  return pyg_option_group_new(option_group);
34
}
35
36
static PyMethodDef pygstoption_functions[] = {
37
    { "get_group", (PyCFunction)_wrap_gstoption_get_group, METH_NOARGS, NULL },
38
    { NULL, NULL, 0, NULL }
39
};
40
41
DL_EXPORT(void)
42
initgstoption (void)
43
{
44
     init_pygobject ();
45
46
     if (!g_thread_supported ())
47
       g_thread_init (NULL);
48
49
     Py_InitModule ("gstoption", pygstoption_functions);
50
}