|
1 /* GStreamer base utils library |
|
2 * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net> |
|
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., 59 Temple Place - Suite 330, |
|
17 * Boston, MA 02111-1307, USA. |
|
18 */ |
|
19 |
|
20 /** |
|
21 * SECTION:gstpbutils |
|
22 * @short_description: General Application and Plugin Utility Library |
|
23 * |
|
24 * <refsect2> |
|
25 * <para> |
|
26 * libgstpbutils is a general utility library for plugins and applications, |
|
27 * available since gst-plugins-base 0.10.12. It currently provides the |
|
28 * following: |
|
29 * </para> |
|
30 * <itemizedlist> |
|
31 * <listitem> |
|
32 * <para> |
|
33 * human-readable description strings of codecs, elements, sources, decoders, |
|
34 * encoders, or sinks from decoder/encoder caps, element names, or protocol |
|
35 * names. |
|
36 * </para> |
|
37 * </listitem> |
|
38 * <listitem> |
|
39 * <para> |
|
40 * support for applications to initiate installation of missing plugins (if |
|
41 * this is supported by the distribution or operating system used) |
|
42 * </para> |
|
43 * </listitem> |
|
44 * <listitem> |
|
45 * <para> |
|
46 * API for GStreamer elements to create missing-plugin messages in order to |
|
47 * communicate to the application that a certain type of plugin is missing |
|
48 * (decoder, encoder, URI protocol source, URI protocol sink, named element) |
|
49 * </para> |
|
50 * </listitem> |
|
51 * <listitem> |
|
52 * <para> |
|
53 * API for applications to recognise and handle missing-plugin messages |
|
54 * </para> |
|
55 * </listitem> |
|
56 * </itemizedlist> |
|
57 * <title>Linking to this library</title> |
|
58 * <para> |
|
59 * You should obtain the required CFLAGS and LIBS using pkg-config on the |
|
60 * gstreamer-plugins-base-0.10 module. You will then also need to add |
|
61 * '-lgstpbutils-0.10' manually to your LIBS line. |
|
62 * </para> |
|
63 * <title>Library initialisation</title> |
|
64 * <para> |
|
65 * Before using any of its functions, applications and plugins must call |
|
66 * gst_pb_utils_init() to initialise the library. |
|
67 * </para> |
|
68 * </refsect2> |
|
69 */ |
|
70 |
|
71 #ifdef HAVE_CONFIG_H |
|
72 # include "config.h" |
|
73 #endif |
|
74 |
|
75 #ifdef __SYMBIAN32__ |
|
76 #include <gst_global.h> |
|
77 #endif |
|
78 |
|
79 #include "pbutils.h" |
|
80 |
|
81 #include "gst/gst-i18n-plugin.h" |
|
82 |
|
83 /** |
|
84 * gst_pb_utils_init: |
|
85 * |
|
86 * Initialises the base utils support library. This function is not |
|
87 * thread-safe. Applications should call it after calling gst_init(), |
|
88 * plugins should call it from their plugin_init function. |
|
89 * |
|
90 * This function may be called multiple times. It will do nothing if the |
|
91 * library has already been initialised. |
|
92 * |
|
93 * Since: 0.10.12 |
|
94 */ |
|
95 #ifdef __SYMBIAN32__ |
|
96 EXPORT_C |
|
97 #endif |
|
98 |
|
99 void |
|
100 gst_pb_utils_init (void) |
|
101 { |
|
102 static gboolean inited; /* FALSE */ |
|
103 |
|
104 if (inited) { |
|
105 GST_LOG ("already initialised"); |
|
106 return; |
|
107 } |
|
108 #ifdef ENABLE_NLS |
|
109 GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, |
|
110 LOCALEDIR); |
|
111 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); |
|
112 #endif |
|
113 |
|
114 inited = TRUE; |
|
115 } |