From b80bdcd5095f2f931052ef4c4eb86338b016ccab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Mon, 9 Oct 2006 19:22:09 +0200 Subject: [PATCH] GStreamer and QuickTime plugin stubs. --- picard/musicdns/gstreamer.c | 57 +++++++++++++++++++++++++++++++++++++ picard/musicdns/quicktime.c | 57 +++++++++++++++++++++++++++++++++++++ setup.py | 14 +++++++++ 3 files changed, 128 insertions(+) create mode 100644 picard/musicdns/gstreamer.c create mode 100644 picard/musicdns/quicktime.c diff --git a/picard/musicdns/gstreamer.c b/picard/musicdns/gstreamer.c new file mode 100644 index 000000000..9bb2690b6 --- /dev/null +++ b/picard/musicdns/gstreamer.c @@ -0,0 +1,57 @@ +/* + * Picard, the next-generation MusicBrainz tagger + * Copyright (C) 2006 Lukáš Lalinský + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +static PyObject * +gstreamer_init(PyObject *self, PyObject *args) +{ + return Py_BuildValue(""); +} + +static PyObject * +gstreamer_done(PyObject *self, PyObject *args) +{ + return Py_BuildValue(""); +} + +static PyObject * +gstreamer_decode(PyObject *self, PyObject *args) +{ + PyObject *filename; + + if (!PyArg_ParseTuple(args, "U", &filename)) + return NULL; + + PyErr_SetString(PyExc_NotImplementedError, ""); + return NULL; +} + +static PyMethodDef gstreamer_methods[] = { + {"init", gstreamer_init, METH_VARARGS, ""}, + {"done", gstreamer_done, METH_VARARGS, ""}, + {"decode", gstreamer_decode, METH_VARARGS, ""}, + {NULL, NULL, 0, NULL} +}; + +PyMODINIT_FUNC +initgstreamer(void) +{ + (void)Py_InitModule("gstreamer", gstreamer_methods); +} + diff --git a/picard/musicdns/quicktime.c b/picard/musicdns/quicktime.c new file mode 100644 index 000000000..aac22e48d --- /dev/null +++ b/picard/musicdns/quicktime.c @@ -0,0 +1,57 @@ +/* + * Picard, the next-generation MusicBrainz tagger + * Copyright (C) 2006 Lukáš Lalinský + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +static PyObject * +quicktime_init(PyObject *self, PyObject *args) +{ + return Py_BuildValue(""); +} + +static PyObject * +quicktime_done(PyObject *self, PyObject *args) +{ + return Py_BuildValue(""); +} + +static PyObject * +quicktime_decode(PyObject *self, PyObject *args) +{ + PyObject *filename; + + if (!PyArg_ParseTuple(args, "U", &filename)) + return NULL; + + PyErr_SetString(PyExc_NotImplementedError, ""); + return NULL; +} + +static PyMethodDef quicktime_methods[] = { + {"init", quicktime_init, METH_VARARGS, ""}, + {"done", quicktime_done, METH_VARARGS, ""}, + {"decode", quicktime_decode, METH_VARARGS, ""}, + {NULL, NULL, 0, NULL} +}; + +PyMODINIT_FUNC +initquicktime(void) +{ + (void)Py_InitModule("quicktime", quicktime_methods); +} + diff --git a/setup.py b/setup.py index d41358777..9737e9121 100644 --- a/setup.py +++ b/setup.py @@ -30,6 +30,20 @@ if sys.platform == "win32": libraries=['strmiids', 'libofa']) ext_modules.append(directshow_ext) +# QuickTime +if sys.platform == "win32" or sys.platform == "darwin": + quicktime_ext = Extension('picard.musicdns.quicktime', + sources=['picard/musicdns/quicktime.c'], + libraries=[]) + ext_modules.append(quicktime_ext) + +# GStreamer +if sys.platform != "win32": + gstreamer_ext = Extension('picard.musicdns.gstreamer', + sources=['picard/musicdns/gstreamer.c'], + libraries=[]) + ext_modules.append(gstreamer_ext) + args = { 'name': 'picard', 'version': '1.0',