~ubuntu-branches/ubuntu/trusty/gstreamer1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst/gstparse.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2012-08-08 18:12:33 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120808181233-riejwxprfsxh1njl
Tags: 0.11.93-1
* New upstream release:
  + debian/libgstreamer.symbols:
    - Update symbols file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
 *
97
97
 * Returns: (transfer full): a newly-allocated parse context. Free with
98
98
 *     gst_parse_context_free() when no longer needed.
99
 
 *
100
 
 * Since: 0.10.20
101
99
 */
102
100
GstParseContext *
103
101
gst_parse_context_new (void)
119
117
 * @context: (transfer full): a #GstParseContext
120
118
 *
121
119
 * Frees a parse context previously allocated with gst_parse_context_new().
122
 
 *
123
 
 * Since: 0.10.20
124
120
 */
125
121
void
126
122
gst_parse_context_free (GstParseContext * context)
145
141
 * Returns: (transfer full) (array zero-terminated=1) (element-type gchar*): a
146
142
 *     NULL-terminated array of element factory name strings of missing
147
143
 *     elements. Free with g_strfreev() when no longer needed.
148
 
 *
149
 
 * Since: 0.10.20
150
144
 */
151
145
gchar **
152
146
gst_parse_context_get_missing_elements (GstParseContext * context)
181
175
_gst_parse_escape (const gchar * str)
182
176
{
183
177
  GString *gstr = NULL;
 
178
  gboolean in_quotes;
184
179
 
185
180
  g_return_val_if_fail (str != NULL, NULL);
186
181
 
187
182
  gstr = g_string_sized_new (strlen (str));
188
183
 
 
184
  in_quotes = FALSE;
 
185
 
189
186
  while (*str) {
190
 
    if (*str == ' ')
 
187
    if (*str == '"' && (!in_quotes || (in_quotes && *(str - 1) != '\\')))
 
188
      in_quotes = !in_quotes;
 
189
 
 
190
    if (*str == ' ' && !in_quotes)
191
191
      g_string_append_c (gstr, '\\');
 
192
 
192
193
    g_string_append_c (gstr, *str);
193
194
    str++;
194
195
  }
230
231
 *   or a partially-constructed bin or element will be returned and @error will
231
232
 *   be set (unless you passed #GST_PARSE_FLAG_FATAL_ERRORS in @flags, then
232
233
 *   %NULL will always be returned on failure)
233
 
 *
234
 
 * Since: 0.10.20
235
234
 */
236
235
GstElement *
237
236
gst_parse_launchv_full (const gchar ** argv, GstParseContext * context,
252
251
  argvp = argv;
253
252
  while (*argvp) {
254
253
    arg = *argvp;
 
254
    GST_DEBUG ("escaping argument %s", arg);
255
255
    tmp = _gst_parse_escape (arg);
256
256
    g_string_append (str, tmp);
257
257
    g_free (tmp);
307
307
 * Returns: (transfer full): a new element on success, %NULL on failure. If
308
308
 *    more than one toplevel element is specified by the @pipeline_description,
309
309
 *    all elements are put into a #GstPipeline, which then is returned.
310
 
 *
311
 
 * Since: 0.10.20
312
310
 */
313
311
GstElement *
314
312
gst_parse_launch_full (const gchar * pipeline_description,