2 Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published
6 by the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include <QGst/Pipeline>
18 #include <QGst/ElementFactory>
19 #include <QGst/Global>
20 #include <QtCore/QCoreApplication>
21 #include <QtCore/QFile>
24 static void sighandler(int code)
28 QCoreApplication::quit();
31 int main(int argc, char **argv)
33 QCoreApplication app(argc, argv);
34 QGst::init(&argc, &argv);
36 QGst::PipelinePtr pipeline = QGst::Pipeline::newPipeline();
38 QGst::ElementPtr src = QGst::ElementFactory::make("audiotestsrc");
39 QGst::ElementPtr sink = QGst::ElementFactory::make("autoaudiosink");
45 pipeline->setState(QGst::StatePlaying);
47 signal(SIGINT, sighandler);
48 int result = app.exec();
50 pipeline->setState(QGst::StateNull);