• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * GStreamer
3  * Copyright (C) 2008-2009 Julien Isorce <julien.isorce@gmail.com>
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., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #include <QApplication>
22 #include <QFileDialog>
23 #include "qrenderer.h"
24 
main(int argc,char * argv[])25 int main(int argc, char *argv[])
26 {
27     /* FIXME: port the example to shaders and remove this */
28     g_setenv ("GST_GL_API", "opengl", FALSE);
29 
30     QApplication a(argc, argv);
31     a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
32 
33     QString videolocation = QFileDialog::getOpenFileName(0, "Select a video file",
34         ".", "Format (*.avi *.mkv *.ogg *.asf *.mov *.mp4)");
35 
36     if (videolocation.isEmpty())
37         return -1;
38 
39     QRenderer w(videolocation);
40     w.setWindowTitle("glimagesink implements the gstvideooverlay interface");
41 
42     return a.exec();
43 }
44