Commit graph

41 commits

Author SHA1 Message Date
David Schleef
0b6430f6e8 parser: Allow element names to begin with digits 2011-04-13 12:24:12 -07: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
Sebastian Dröge
e2c1a6f7e9 gst/parse/parse.l: Use "%option never-interactive" to prevent useless calls to isatty() on every input when parsing. ...
Original commit message from CVS:
* gst/parse/parse.l:
Use "%option never-interactive" to prevent useless calls to isatty()
on every input when parsing. Also use "%option noinput" to not define
the static input/yyinput functions which we don't use anyway. This
removes a compiler warning with gcc 4.3 and saves some bytes in the
library.
* gst/parse/lex._gst_parse_yy.pre.c:
Regenerated for the above change.
2008-01-04 18:44:03 +00:00
Marc-Andre Lureau
7a3a27d0c1 gst/parse/: Make the parser reentrant and recursively callable. This requires flex >= 2.5.31, for older versions preg...
Original commit message from CVS:
Patch by: Marc-Andre Lureau <marcandre dot lureau at gmail dot com>
* gst/parse/Makefile.am:
* gst/parse/grammar.y:
* gst/parse/parse.l:
Make the parser reentrant and recursively callable. This requires flex
>= 2.5.31, for older versions pregenerated sources are used as we
can't bump the build dependency. Finally fixes #349180.
* gst/gstparse.c: (gst_parse_launch):
Drop the HAVE_MT_SAVE_FLEX #ifdefs as we always use a new enough flex
now anyway.
* docs/gst/Makefile.am:
* docs/gst/Makefile.am:
* gst/parse/grammar.tab.pre.c: (__gst_parse_strdup),
(__gst_parse_strfree), (__gst_parse_link_new),
(__gst_parse_link_free), (__gst_parse_chain_new),
(__gst_parse_chain_free), (SET_ERROR), (YYPRINTF),
(gst_parse_element_set), (gst_parse_free_link),
(gst_parse_found_pad), (gst_parse_perform_delayed_link),
(gst_parse_perform_link), (yytnamerr), (yysyntax_error), (yyerror),
(_gst_parse_launch):
* gst/parse/grammar.tab.pre.h:
* gst/parse/lex._gst_parse_yy.pre.c: (PRINT), (yy_get_next_buffer),
(yy_get_previous_state), (yy_try_NUL_trans), (input),
(_gst_parse_yyrestart), (_gst_parse_yy_switch_to_buffer),
(_gst_parse_yy_load_buffer_state), (_gst_parse_yy_create_buffer),
(_gst_parse_yy_delete_buffer), (_gst_parse_yy_init_buffer),
(_gst_parse_yy_flush_buffer), (_gst_parse_yypush_buffer_state),
(_gst_parse_yypop_buffer_state),
(_gst_parse_yyensure_buffer_stack), (_gst_parse_yy_scan_buffer),
(_gst_parse_yy_scan_string), (_gst_parse_yy_scan_bytes),
(yy_fatal_error), (_gst_parse_yyget_extra),
(_gst_parse_yyget_lineno), (_gst_parse_yyget_column),
(_gst_parse_yyget_in), (_gst_parse_yyget_out),
(_gst_parse_yyget_leng), (_gst_parse_yyget_text),
(_gst_parse_yyset_extra), (_gst_parse_yyset_lineno),
(_gst_parse_yyset_column), (_gst_parse_yyset_in),
(_gst_parse_yyset_out), (_gst_parse_yyget_debug),
(_gst_parse_yyset_debug), (_gst_parse_yyget_lval),
(_gst_parse_yyset_lval), (_gst_parse_yylex_init),
(yy_init_globals), (_gst_parse_yylex_destroy), (yy_flex_strncpy),
(yy_flex_strlen), (_gst_parse_yyalloc), (_gst_parse_yyrealloc),
(_gst_parse_yyfree):
If the installed flex version is too old use pre-generated parser
sources. These pre-generated parser sources are always updated when
the actual flex/bison sources change but require everybody who wants
to change something in the parser to have flex >= 2.5.31 installed.
2007-04-18 12:34:51 +00:00
Stefan Kost
fb0ce08f2c gst/parse/: Reverted previous patch as it required to bump the flex dependency to 2.5.31, where fc4/5 seem to ship on...
Original commit message from CVS:
* gst/parse/Makefile.am:
* gst/parse/grammar.y:
* gst/parse/parse.l:
Reverted previous patch as it required to bump the flex dependency to
2.5.31, where fc4/5 seem to ship only the ancient 2.5.4a :(
2006-07-30 18:58:28 +00:00
Marc-Andre Lureau
48afa6dc3a gst/parse/: push & pop the state of the lexer for reentrant use case
Original commit message from CVS:
Patch by: Marc-Andre Lureau <marcandre.lureau@gmail.com>
* gst/parse/Makefile.am:
* gst/parse/grammar.y:
* gst/parse/parse.l:
push & pop the state of the lexer for reentrant use case
Fixes #349180
2006-07-30 18:32:49 +00:00
Jan Schmidt
5b271bcd88 Fix some of the leaks exposed by extending the parse-launch testsuite, and move the 3 I can't figure out into a separ...
Original commit message from CVS:
* gst/parse/grammar.y:
* gst/parse/parse.l:
* tests/check/pipelines/parse-launch.c: (expected_fail_pipe),
(GST_START_TEST), (parse_suite):
Fix some of the leaks exposed by extending the parse-launch testsuite,
and move the 3 I can't figure out into a separate test that won't run
the pipelines unless the appropriate line is uncommented.
2006-07-27 13:26:27 +00:00
Jan Schmidt
8ae16e5b4c gst/gststructure.*: Add API for setting values into structures without performing a quark lookup, if the appropriate ...
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_id_set),
(gst_structure_id_set_valist):
* gst/gststructure.h:
Add API for setting values into structures without performing
a quark lookup, if the appropriate quark is already known.
API: gst_structure_id_set
API: gst_structure_id_set_valist
* gst/parse/grammar.y:
* gst/parse/parse.l:
Remove some dead code shown by the coverage information.
Don't throw a critical g_warning when encountering a syntax error,
just warn and let the normal error path handle it.
* plugins/elements/gstelements.c:
Bump the rank of filesink up to PRIMARY so that it is preferred over
gnomevfssink for file:// sink uri's
* tests/check/pipelines/parse-launch.c: (expected_fail_pipe),
(GST_START_TEST), (run_delayed_test),
(gst_parse_test_element_base_init),
(gst_parse_test_element_class_init), (gst_parse_test_element_init),
(gst_parse_test_element_change_state),
(gst_register_parse_element), (parse_suite):
Beef up the tests for parse syntax to check that more error cases
fail as they are supposed to. Increases the test coverage a bit.
2006-07-26 17:04:45 +00:00
Jan Schmidt
88806ceb90 gst/parse/parse.l: Commit patch for parse_launch syntax from #331255. Removes support for quoted strings and mimetype...
Original commit message from CVS:
* gst/parse/parse.l:
Commit patch for parse_launch syntax from #331255. Removes
support for quoted strings and mimetypes when writing filtered
caps. See the bug report for more details - I'm pretty sure this
obscure feature is not in use by _anyone_ anywhere.

With this simple change, the size of the gstreamer.so here
drops from 2193KB to 1565KB.
2006-03-03 15:32:30 +00:00
Andy Wingo
1d2f26f522 gst/parse/parse.l: Attempt to solve bug #172815.
Original commit message from CVS:
2005-07-19  Andy Wingo  <wingo@pobox.com>

* gst/parse/parse.l: Attempt to solve bug #172815.
2005-07-19 10:40:49 +00:00
Jan Schmidt
04b470bd86 gst/autoplug/gstspideridentity.c: Cosmetic fix - spider_find_peek should be static
Original commit message from CVS:
* gst/autoplug/gstspideridentity.c:
Cosmetic fix - spider_find_peek should be static
* gst/parse/parse.l:
Applying fix for #164261
2005-01-18 15:39:14 +00:00
Wim Taymans
3cf9fdfcb7 Since parse can do 'element name=a:b' make 'a:b.' work as well.
Original commit message from CVS:
* gst/parse/parse.l:
* testsuite/parse/parse1.c: (main):
Since parse can do 'element name=a:b' make 'a:b.' work as
well.
Added testcase to verify fix.
2004-10-19 09:38:20 +00:00
Benjamin Otte
f8f2f5a58d gst/parse/parse.l: fix for G_DISABLE_ASSERT
Original commit message from CVS:
* gst/parse/parse.l:
fix for G_DISABLE_ASSERT
2004-08-03 10:24:39 +00:00
David Schleef
ca7539c40e Changes to handle compilers that don't have variadic macro support. In particular, glib headers define some inlines ...
Original commit message from CVS:
Changes to handle compilers that don't have variadic macro
support.  In particular, glib headers define some inlines
that need G_LOG_DOMAIN defined.  Additional fixes for MSVC
builds.
* gst/Makefile.am:
* gst/cothreads.c:
* gst/elements/gstfdsink.c:
* gst/elements/gstfdsrc.c:
* gst/elements/gstfilesink.c:
* gst/elements/gstfilesrc.c:
* gst/gst_private.h:
* gst/gstatomic.c:
* gst/gstcaps.c: (gst_caps_append):
* gst/gstcpu.c: (gst_cpuid_i386):
* gst/gstelement.c:
* gst/gsterror.c:
* gst/gstfilter.c:
* gst/gstinfo.h:
* gst/gstprobe.c:
* gst/gstquery.c:
* gst/gstregistry.c:
* gst/gststructure.c:
* gst/gsttaginterface.c:
* gst/gsttrace.c: (gst_trace_new):
* gst/gsttrashstack.c:
* gst/gsturi.c:
* gst/gstvalue.c:
* gst/parse/grammar.y:
* gst/parse/parse.l:
* tools/gst-inspect.c: (main):
* tools/gst-launch.c: (main):
* tools/gst-xmlinspect.c: (PUT_STRING):
2004-05-07 02:36:28 +00:00
Benjamin Otte
2696ee9c90 gst/parse/grammar.y: fix assert to not trigger when there's no error argument
Original commit message from CVS:
* gst/parse/grammar.y:
fix assert to not trigger when there's no error argument
* gst/parse/parse.l:
fix definition of caps to allow more than two structures
* testsuite/caps/Makefile.am:
* testsuite/caps/renegotiate.c: (main):
it's sinesrc and works in that case
2004-05-04 17:00:11 +00:00
Andy Wingo
cded585aa2 gst/: Debugging tweaks.
Original commit message from CVS:
2004-02-20  Andy Wingo  <wingo@pobox.com>

* gst/gstbin.c:
* gst/gstbuffer.c:
* gst/gstplugin.c:
* gst/registries/gstxmlregistry.c:
* gst/schedulers/gstoptimalscheduler.c: Debugging tweaks.

* gst/gstelement.c (gst_element_set_scheduler): Debugging fixes.
(gst_element_add_pad): DEBUG->INFO, some fixes.
(gst_element_get_compatible_pad_template): Just see if the
templates' caps intersect, not if one is a strict subset of the
other. This conforms more to what gst_pad_link_intersect() does.
(gst_element_class_add_pad_template): Don't memcpy the pad
template, just ref it.
(gst_element_get_compatible_pad_filtered): Clean up debug messages

* gst/gstpad.c (gst_pad_can_link_filtered): Debug a true result.
(gst_pad_link_filtered): Debug changes.
(gst_pad_link_prepare): New function, consolidated from
can_link_filtered and link_filtered.

* gst/parse/grammar.y (gst_parse_perform_link): Made INFO output
look more like that of the functions in gstelement.c

* gst/gstinfo.c (gst_debug_print_object): Put a space before the
object, and return the empty string if object is NULL.

* gst/parse/parse.l: Remove trailing newlines when calling PRINT.
* gst/parse/grammar.y (YYFPRINTF): Log bison debugging info via
LOG, not DEBUG. We still get flex info on debug.

* gst/registries/gstxmlregistry.c (gst_xml_registry_load): Make
debug string more verbose.
(plugin_times_older_than): DEBUG->LOG.
2004-02-20 13:18:32 +00:00
David Schleef
d19ae033fd docs/random/ds/0.9-suggested-changes: Random ramblings
Original commit message from CVS:
* docs/random/ds/0.9-suggested-changes: Random ramblings
* gst/elements/gstfilesrc.c: (gst_filesrc_get_mmap): Cast size_t
to int before printing.
* gst/parse/grammar.y: Fix gcc-2.95 style variadic macros.
* gst/parse/parse.l: same.  See bug #129600
2004-02-07 01:23:13 +00:00
David Schleef
38029f4295 Change usage of isblah() to g_ascii_isblah() to be more locale independent. (#133076)
Original commit message from CVS:
Change usage of isblah() to g_ascii_isblah() to be more locale
independent.  (#133076)
* gst/gsturi.c: (gst_uri_protocol_check_internal):
* gst/gstutils.c:
* gst/parse/parse.l:
2004-02-02 21:08:52 +00:00
David Schleef
003a59c4f3 Allow more characters to be recognized as caps characters
Original commit message from CVS:
Allow more characters to be recognized as caps characters
2003-12-22 06:57:29 +00:00
Benjamin Otte
8cf0d17c3f fix caps parsing. Some evil person (me?\!) disallowed the dot as a character in caps
Original commit message from CVS:
fix caps parsing. Some evil person (me?\!) disallowed the dot as a character in caps
2003-12-14 04:28:11 +00:00
Benjamin Otte
25f85868d4 implement URI schemes
Original commit message from CVS:
implement URI schemes
Elements can now register as a source or sink for a protocol and applications can use gst_element_make_from_uri () to get an element that handles a given URI.
This patch provides:
- removal of old broken URI handling scheme.
- new URI handling using interfaces.
- updates for registry to save handled URIs.
- interface for URI handlers.
- implementation of that in filesrc and filesink for the file:// URI
- extension to pipeline parsing to allow specifying only a URI instead of element

Does not include:
- tests
- inclusion in docs build
2003-11-24 03:21:54 +00:00
Benjamin Otte
803ce6bf48 GST_DEBUG reorganization containing loads of stuff:
Original commit message from CVS:
GST_DEBUG reorganization
This is a big diff (ca 450k), containing loads of stuff:
- gstinfo.[ch] complete rewrite
- changing of all GST_DEBUG messages to reflect that change
- reorganization of subsystem disabling
- addition of gstconfig.h.in so we can track the disablings
- <gst/gst.h> does not include <unistd.h> and <config.h> anymore
- documentation updated for gstinfo stuff (build the docs yourself to know what changed)
- bugfixes for making of the docs (files from CVS are not deleted anymore
- testsuite for debugging changes in testsuite/debug

expect breakage
2003-06-29 14:05:49 +00:00
Benjamin Otte
012cb2cb6f make the parser accept chained caps, too
Original commit message from CVS:
make the parser accept chained caps, too
2003-05-18 02:30:00 +00:00
Benjamin Otte
a960c7a7a3 This is filtered caps in 20 lines. Implemented full featured parsing of pipelines with filtered caps. To get a grip o...
Original commit message from CVS:
This is filtered caps in 20 lines. Implemented full featured parsing of pipelines with filtered caps. To get a grip of the syntax you might want to look at testsuite/caps/string-conversions.c or run that test
2003-05-17 20:45:06 +00:00
David Schleef
376ec32dce Fix bug in PRINT() macro
Original commit message from CVS:
Fix bug in PRINT() macro
2003-05-13 05:47:04 +00:00
Benjamin Otte
838ffca4fa enable debugging output for bison parser, fix // comments, better error recovery, error out on non-instantiable eleme...
Original commit message from CVS:
enable debugging output for bison parser, fix // comments, better error recovery, error out on non-instantiable elements (fixes #110758)
2003-04-14 18:33:58 +00:00
David Schleef
7421b1f671 Revert last Makefile.am change, and fix it correctly. I _think_ this won't break with earlier flex versions, otherwi...
Original commit message from CVS:
Revert last Makefile.am change, and fix it correctly.  I _think_
this won't break with earlier flex versions, otherwise let me know.
2003-04-13 19:40:31 +00:00
Benjamin Otte
3a897e2f30 rewritten pipeline parsing lands. Have fun breaking it.
Original commit message from CVS:
rewritten pipeline parsing lands. Have fun breaking it.
regressions:
- No support for filtered links. If anybody needs this, please contact me and I'll add it as fast as possible.

improvements:
- The pipeline building actually works as expected.
- syntax compatible nearly everywhere but more flexible
- better property parsing (you can now set enums by name or nick)
- uses locked_state to allow for delayed pads
- can connect video pipelines without the need for queues
- allows properties on bins
- does not return a bin, but an element.

You may want to read docs/random/company/gstparse to learn how it works.
2003-04-08 21:59:44 +00:00
Thomas Vander Stichele
5529bbc7dc first pass of connect->link gst-plugins and other stuff compiles without change at this point
Original commit message from CVS:
first pass of connect->link
gst-plugins and other stuff compiles without change at this point
2003-01-09 14:15:37 +00:00
Wim Taymans
07cf2da0c2 Added syntax to make filtered connections like: osssrc src\!audio/raw, channels=int 2, width=int 8\!sink fakesink
Original commit message from CVS:
Added syntax to make filtered connections like:

osssrc src\!audio/raw, channels=int 2, width=int 8\!sink fakesink
2002-12-06 20:06:06 +00:00
Thomas Vander Stichele
009e8bb2b4 applied fixed patch from Brian
Original commit message from CVS:
applied fixed patch from Brian
2002-11-29 17:05:13 +00:00
Thomas Vander Stichele
7cd8540542 revert fix because GST_DEBUG_LEAVE("") doesn't work with it
Original commit message from CVS:
revert fix because GST_DEBUG_LEAVE("") doesn't work with it
2002-11-29 14:20:53 +00:00
Christian Schaller
54cbcd0c18 commit Brian's patch with AC fix from thomas
Original commit message from CVS:
commit Brian's patch with AC fix from thomas
2002-11-29 11:10:35 +00:00
David Schleef
5c1230f6d1 Fix parsing of negative numbers. Note that parsing of floating point numbers is broken in exponential form (1.0e6 or...
Original commit message from CVS:
Fix parsing of negative numbers.  Note that parsing of floating point
numbers is broken in exponential form (1.0e6 or 1.0E6).
2002-10-31 20:06:44 +00:00
Andy Wingo
24b89ebfd6 allow colons in indentifier names (for jack: " ... !alsa_pcm:out_1 jacksink")
Original commit message from CVS:
allow colons in indentifier names (for jack: " ... !alsa_pcm:out_1 jacksink")
2002-05-30 04:50:46 +00:00
Andy Wingo
057d8ccb89 Added --gst-fatal-warnings, the same as --g-fatal-warnings
Original commit message from CVS:
Added --gst-fatal-warnings, the same as --g-fatal-warnings

It's named differently to avoid conflicting with --g-fatal-warnings, which is parsed
by gtk (which we don't depend on)
2002-04-16 13:47:50 +00:00
Andy Wingo
157e961c26 quote spaces in tokens passed to gst_parse_launchv. this restores the old (shell-friendly) quoting behavior.
Original commit message from CVS:
quote spaces in tokens passed to gst_parse_launchv. this restores the old
(shell-friendly) quoting behavior.
2002-04-13 17:11:42 +00:00
Andy Wingo
70cfc6cb4d new parser that uses flex and bison
Original commit message from CVS:
* new parser that uses flex and bison
- doesn't do dynamic pipelines yet...
* added GErrors to the gst_parse_launch[v] api
* added --gst-mask-help command line option
* fixed -o option for gst-launch
* GstElement api change:
- gst_element_get_pad
- gst_element_get_request_pad, gst_element_get_static_pad
- gst_element_get_compatible_pad
- gst_element_get_compatible_static_pad, gst_element_get_compatible_request_pad
- gst_element_[dis]connect -> gst_element_[dis]connect_pads
- gst_element_[dis]connect_elements -> gst_element_[dis]connect
* manual update
* example, tool, and doc updates for the api changes
- no more plugin docs in the core docs, plugins require a more
extensive doc system
2002-04-07 23:32:16 +00:00
Andy Wingo
66107d8717 form a semantic representation of the pipeline in preparation for actual instantiation.
Original commit message from CVS:
* form a semantic representation of the pipeline in preparation for
actual instantiation.

the parser is shaping up quite nicely; it should, in theory, be able to create
all types of pipelines that gstreamer supports
2002-04-01 06:30:39 +00:00
Andy Wingo
f6112a24bb the parser works properly, but it doesn't do anything yet
Original commit message from CVS:
* the parser works properly, but it doesn't do anything yet
2002-04-01 04:36:56 +00:00
Andy Wingo
832f0a7852 add (incomplete) flex/bison-based parser to cvs the tokenizer is functional, but the grammar definition is bad. this ...
Original commit message from CVS:
add (incomplete) flex/bison-based parser to cvs

the tokenizer is functional, but the grammar definition is bad. this
probably breaks distcheck somehow, but hey.
2002-03-31 21:09:17 +00:00