]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blob - libs/gst/helpers/gst-plugin-scanner.c
DEBIAN: Debianization
[glsdk/gstreamer0-10.git] / libs / gst / helpers / gst-plugin-scanner.c
1 /* GStreamer
2  * Copyright (C) 2008 Jan Schmidt <jan.schmidt@sun.com>
3  *
4  * gst-plugin-scanner.c: tool to load plugins out of process for scanning
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  * Helper binary that does plugin-loading out of process and feeds results
22  * back to the parent over fds.
23  */
25 #ifdef HAVE_CONFIG_H
26 #  include "config.h"
27 #endif
29 #include <gst/gst_private.h>
30 #include <gst/gst.h>
32 #include <string.h>
34 int
35 main (int argc, char *argv[])
36 {
37   gboolean res;
38   char **my_argv;
39   int my_argc;
41   if (argc != 2 || strcmp (argv[1], "-l"))
42     return 1;
44 #if !GLIB_CHECK_VERSION (2, 31, 0)
45   if (!g_thread_supported ())
46     g_thread_init (NULL);
47 #endif
49   my_argc = 2;
50   my_argv = g_malloc (my_argc * sizeof (char *));
51   my_argv[0] = argv[0];
52   my_argv[1] = (char *) "--gst-disable-registry-update";
54 #ifndef GST_DISABLE_REGISTRY
55   _gst_disable_registry_cache = TRUE;
56 #endif
58   res = gst_init_check (&my_argc, &my_argv, NULL);
60   g_free (my_argv);
61   if (!res)
62     return 1;
64   /* Create registry scanner listener and run */
65   if (!_gst_plugin_loader_client_run ())
66     return 1;
68   return 0;
69 }