gst-plugins-bad: update translations
[platform/upstream/gstreamer.git] / subprojects / gst-editing-services / tools / ges-launch.c
1 /* GStreamer Editing Services
2  * Copyright (C) 2010 Edward Hervey <bilboed@bilboed.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library 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 GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 #include <stdlib.h>
21 #include <locale.h>             /* for LC_ALL */
22 #include "ges-launcher.h"
23
24 #ifdef __APPLE__
25 #include <TargetConditionals.h>
26 #endif
27
28 static int
29 real_main (int argc, gchar ** argv)
30 {
31   GESLauncher *launcher;
32   gint ret;
33
34   setlocale (LC_ALL, "");
35
36   launcher = ges_launcher_new ();
37
38   ret = g_application_run (G_APPLICATION (launcher), argc, argv);
39
40   if (!ret)
41     ret = ges_launcher_get_exit_status (launcher);
42
43   g_object_unref (launcher);
44   ges_deinit ();
45   gst_deinit ();
46
47   return ret;
48 }
49
50 int
51 main (int argc, char *argv[])
52 {
53 #if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
54   return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
55 #else
56   return real_main (argc, argv);
57 #endif
58 }