Commit graph

128 commits

Author SHA1 Message Date
Sebastian Dröge fef082b5d0 gst: Fix compilation with latest GLib
g_object_ref() forwards the type of its argument nowadays.

./grammar.y:409:14: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
gstchildproxy.c:212:7: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
2018-03-25 12:36:09 +03:00
Sebastian Dröge ef42e3811e parse: Don't translate the "bin" element name
Otherwise we won't be able to create bins, there is no element called
"Behälter" if you're using a German locale.

https://bugzilla.gnome.org/show_bug.cgi?id=777998
2017-01-31 21:20:22 +02:00
Sebastian Dröge 80c5fd50db parse: Don't hold element's object lock while querying element pads' caps
This can easily deadlock if the element uses the object lock for
something internally, like posting an error message. Use an GstIterator
for iterating over the pads instead.

https://bugzilla.gnome.org/show_bug.cgi?id=777449
2017-01-18 15:43:13 +02:00
Tim-Philipp Müller 89b413ef15 parse: better error message when linking two elements with capsfilter fails
https://bugzilla.gnome.org/show_bug.cgi?id=760550
2016-11-12 10:55:23 +00:00
Jan Schmidt 5a5ae1be1f parse-launch: Support linking all pads with new operator
Introduce a new operator ':' - e.g. element1 ':' element2

For example, 'uridecodebin : encodebin' -
if the encodebin has multiple profiles compatible with the
decodebin, multiple links will be created.

With '!' , after one delayed link is successfully done, the
pad-added callback is disconnected.

https://bugzilla.gnome.org/show_bug.cgi?id=751450
2016-11-02 12:04:33 +11:00
Tim-Philipp Müller f7391936ce parse: fix erroneous use of _("")
Fixes xgettext warnings when doing 'make update-po':
gst/parse/grammar.y:217: warning: Empty msgid.  It is reserved by GNU gettext:
                                  gettext("") returns the header entry with
                                  meta information, not the empty string.
2016-10-23 22:11:08 +01:00
Carlos Rafael Giani fdd5d22828 parse-launch: Add flag for placing elements in a bin instead of a pipeline
By default, gst_parse_launch_full() creates a GstPipeline if there's more
than one toplevel element. Add a flag to let it use a GstBin instead.

Also fix the parser to let it use this flag for GST_TYPE_ELEMENT property
values, to avoid having GstPipelines inside other GstPipelines.

https://bugzilla.gnome.org/show_bug.cgi?id=763457
2016-03-24 14:50:12 +02:00
Stefan Sauer bdc60306c7 parse_launch: make nicer log messages
Add two macros to build nicer element/pad name strings. The macros avoid
printing "(NULL)" and print the element type in addition to the name.
2016-01-03 22:58:06 +01:00
Stefan Sauer 46a851b279 parse-launch: warn when still waiting to plug sub-pipelines after no-more-pads
The parse-launch API automagically handles dynamic pads and performs delayed
linking as needed, without any feedback about whether the linking succeeded or
not however. If a delayed dynamic link can't be completed for whatever reason,
parse-launch will simply wait in case a suitable pad appears later. This may
never happen though, in which case the pipeline may just hang forever.

Try to improve this by connecting to the "no-more-pads" signal of any element
with dynamic pads and posting a warning message for the related outstanding
dynamic links when "no-more-pads" is emitted.

Fixes #760003
2016-01-03 22:58:06 +01:00
Stefan Sauer 583304959a grammar.y: remove trailing whitespace 2016-01-03 11:39:56 +01:00
Luis de Bethencourt c565c5ecb4 parse: check before truncating strings
Don't truncate the last character of a string if it isn't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:16:07 +00:00
Sebastian Rasmussen 0887020581 parse: Unref reference to enclosing bins
Previously all reference to enclosing bins of an element were leaked
when doing delaying setting a property.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733697
2014-07-28 08:41:27 -03:00
Fabian Kirsch ffe072f694 parse: Some minor fixes
Fix destructor segfaulting
Expect 0 grammar-ambiguities
Fix order of bin-properties assignment

https://bugzilla.gnome.org/show_bug.cgi?id=710034
2014-01-16 15:38:51 +01:00
Sebastian Dröge f15f4ec8aa parse: Make sure to create and link chains in the order as written
Make this work again:
audiotestsrc ! tee name=t  t.src_0 ! queue ! fakesink  t.src_1 ! queue ! fakesink
and this fail again:
audiotestsrc ! tee name=t  t.src_1 ! queue ! fakesink  t.src_0 ! queue ! fakesink

as tee just counts itself and does not care about the pad names we request
from it.
2014-01-14 15:52:26 +01:00
Sebastian Dröge 156d925cff parse: Remove some C99-style comments 2014-01-14 13:46:24 +01:00
Fabian Kirsch 2b33d33185 parse: Refactor grammar, make it more consistent and fix conflicts
https://bugzilla.gnome.org/show_bug.cgi?id=710034
2014-01-14 13:46:22 +01:00
Sebastian Dröge a400dd2f47 parse: Don't define yyscan_t twice
https://bugzilla.gnome.org/show_bug.cgi?id=720316
2013-12-14 19:09:05 +01:00
Fabian Kirsch 56d74ddb64 parse: fix segfaulting prototype-mismatch
Now YYDEBUG is always set, so check it's value

https://bugzilla.gnome.org/show_bug.cgi?id=712679
2013-11-28 19:05:23 -05:00
Kerrick Staley bd2a01cfe2 parse: make grammar.y work with Bison 3
YYLEX_PARAM is no longer supported in Bison 3.

https://bugzilla.gnome.org/show_bug.cgi?id=706462
2013-08-21 10:02:26 +01:00
Brendan Long 48319d4be2 parse: Add GST_FLAG_NO_SINGLE_ELEMENT_BINS
This makes gst_parse_bin_from_description() return an element instead of
a bin if there's only one element. Also changed gstparse.c to use this,
so gst-launch won't create superfluous bins.

https://bugzilla.gnome.org/show_bug.cgi?id=703405
2013-08-19 11:30:15 +02:00
Tim-Philipp Müller 9a38d713bd parse: fix up for gst_child_proxy_lookup() only working on child proxy interfaces
https://bugzilla.gnome.org/show_bug.cgi?id=681681
2012-08-13 10:27:09 +01:00
Tim-Philipp Müller de7601bb2d parse: fix for new GstChildProxy::child-added signal callback signature
Fixes crash with gst-launch-1.0 uridecodebin uri=... suburi=... ! ..
2012-08-08 00:59:07 +01:00
Wim Taymans 7b19f3eab2 parse: fix some debug 2012-07-17 10:04:26 +02:00
Tim-Philipp Müller 2f46207ec7 parse: update for gst_element_make_from_uri() change 2012-06-23 14:43:21 +01:00
Руслан Ижбулатов 9542b2d073 Fix format string in grammar.y
Fixes #674849
2012-04-26 19:54:49 +02:00
Wim Taymans 3db0ce476f grammar.y: fix childproxy code
It takes GObject and not GstObject now
2012-03-31 12:00:56 +02:00
Stefan Sauer d93c5c5fd0 parser: update for childproxy api changes 2012-03-30 22:45:04 +02:00
Tim-Philipp Müller 01d87250a8 gstparse: prefix generated parser functions so they don't get exported
Don't export those 35-something random _gst_parse_yy* symbols. These were
never in any header files and also blacklisted from our .def files, in
case anyone wonders.
2011-10-08 14:34:04 +01:00
Stefan Kost 61d84b9469 parse-launch: trim whitespaces 2011-02-14 15:39:21 +02:00
Stefan Kost 8f9f95cd78 parse-launch: fix typo in pad-list length comparision
It was comparing the length with itself.

Fixes #642071.
2011-02-14 15:37:23 +02:00
Tim-Philipp Müller 189facea50 parse: fix more compiler warnings
Fix 'grammar.tab.c:815:6: warning: "YYENABLE_NLS" is not defined'
compiler warning and the same for YYLTYPE_IS_TRIVIAL. The two
translated strings aren't particularly helpful, so just define
YYENABLE_NLS to 0.
2010-04-07 19:09:24 +01:00
Tim-Philipp Müller a26879b7a0 parse: fix compiler warning
Fix 'grammar.y:668: passing argument 1 of ‘g_free’ discards qualifiers
from pointer target type' compiler warning.
2010-04-07 19:09:23 +01:00
Stefan Kost da287f556d parse-launch: make delayed set recursive
Right now deleyed set would only try for first set of children. We need to keep
trying to support arbitrary deep hierarchies (like in playbin2 with auto*sinks).
Also GstBin would need to actualy emit the child-added/removed signal as it
implements the iface. Fixes #613215.
2010-03-22 10:01:38 +02:00
Edward Hervey d60a3b8a59 gstreamer: remove unneeded casts
G_PARAM_SPEC_VALUE_TYPE does an expensive type check, whereas the
value_type field is a public field, so we can just use it directly.
2010-03-11 11:46:28 +01:00
Benjamin Otte e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01:00
Tim-Philipp Müller 087aa6ced4 gst_private.h: make sure gst_private.h is included before glib.h
For the reason outlined at the beginning of gst_private.h (inline
functions in glib may need the g_log_domain variable). Also include
gst_private.h before using any G_OS_* defines, esp. in plugin loader.
2010-01-20 01:48:56 +00:00
Tim-Philipp Müller c8c893c30e parse/grammar.y: remove unused ERROR define 2009-11-19 13:05:13 +00:00
Sebastian Dröge 28493b04ec parser: Make sure that signal user data is freed by setting a GClosureNotify
...instead of using a second mechanism and storing the user data
inside the GObjects qdata.
2009-10-31 16:56:17 +01:00
Sebastian Dröge 02d044e291 parser: Use GSlice for allocating the structs 2009-10-31 16:49:03 +01:00
Sebastian Dröge 5b5718cd20 parser: Always get DelayedLink information from the objects qdata
This makes sure that it is always valid.
2009-10-31 16:43:26 +01:00
David Schleef 62e236394a parse: Fix memleak of unused delayed links
Attach the DelayedLink structure to the element, so that when
the element is disposed, the DelayedLink is freed.
2009-10-28 22:05:06 -07:00
Rob Clark e025e328fd parse: don't format the string twice
We were formatting the string once and then passing the string as a format
string to the log functions.
2009-10-07 23:23:08 +03:00
Tim-Philipp Müller 3c6db4ed95 gst: remove more unnecessary cast when using g_signal_*() 2009-10-06 20:04:10 +01:00
Stefan Kost 5ce13775b8 parse-launch: allow specifying GstElement properties via gst_parse_bin_from_description
If deserializing a property fails, check if the value type is a string and if so
attempt to create a bin from the string value. This allows to e.g. specify
audio-sink/video-sink for playbin on gst-launch commandline.
2009-05-12 18:31:19 +03:00
Tim-Philipp Müller 32cafe9457 gst/parse/grammar.y: Remove unneeded casts.
Original commit message from CVS:
* gst/parse/grammar.y:
Remove unneeded casts.
2008-05-25 14:13:22 +00:00
Tim-Philipp Müller b0afa5e42e Get all missing elements from a parse launch string if possible (ie. if the FATAL_ERRORS flag has been specified). Fi...
Original commit message from CVS:
* gst/parse/grammar.y:
* tests/check/pipelines/parse-launch.c:
Get all missing elements from a parse launch string if possible
(ie. if the FATAL_ERRORS flag has been specified). Fixes #528178.
2008-05-25 13:56:38 +00:00
Tim-Philipp Müller ebc08ddfb9 API: gst_parse_launch_full()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gst_private.h: (_GstParseContext):
* gst/gstparse.c: (gst_parse_error_quark), (gst_parse_context_new),
(gst_parse_context_free), (gst_parse_context_get_missing_elements),
(gst_parse_launchv), (gst_parse_launchv_full), (gst_parse_launch),
(gst_parse_launch_full):
* gst/gstparse.h: (GST_PARSE_FLAG_NONE), (GST_PARSE_FLAG_FATAL_ERRORS),
(GstParseFlags), (GstParseContext):
* gst/gstutils.c: (gst_parse_bin_from_description),
(gst_parse_bin_from_description_full):
* gst/gstutils.h:
* gst/parse/grammar.y:
* gst/parse/types.h:
* win32/common/libgstreamer.def:
Add new gst_parse_*_full API (#528178):
API: gst_parse_launch_full()
API: gst_parse_launchv_full()
API: gst_parse_bin_from_description_full()
API: gst_parse_context_new()
API: gst_parse_context_free()
API: gst_parse_context_get_missing_elements()
2008-05-24 15:33:53 +00:00
Tim-Philipp Müller 479a58ebfe gst/: More guards against bad input; typo fix; some minor clean-ups.
Original commit message from CVS:
* gst/gstparse.c: (_gst_parse_escape), (gst_parse_launchv):
* gst/gstutils.c: (gst_parse_bin_from_description):
* gst/parse/grammar.y: (graph):
More guards against bad input; typo fix; some minor clean-ups.
2008-05-22 15:38:54 +00:00
Wim Taymans 363148faf4 gst/parse/grammar.y: Remove unneeded value unset.
Original commit message from CVS:
* gst/parse/grammar.y:
Remove unneeded value unset.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add unit test for de/serialization of caps.
2008-05-14 10:22:17 +00:00
Wim Taymans 5b5be74fc5 gst/: Fix 2 caps leaks.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_caps):
* gst/parse/grammar.y:
Fix 2 caps leaks.
2008-04-17 08:45:19 +00:00