Commit graph

875 commits

Author SHA1 Message Date
Stefan Sauer 24c741554c typefind: use g_get_prgname() for error message 2013-11-07 21:01:27 +01:00
Reynaldo H. Verdejo Pinochet afe174d38d gst-inspect: Remove some dead code 2013-11-04 13:56:37 -08:00
Matthieu Bouron a0e2eb6169 gst-launch: fix potential uninitialized variable warning
https://bugzilla.gnome.org/show_bug.cgi?id=710758
2013-11-01 15:15:29 +01:00
Sebastian Dröge aacedb9da4 gst-launch: Update for GstContext changes 2013-09-18 21:42:42 +02:00
Tim-Philipp Müller 954776ab38 tools: move gst-plot-timeline.py into scripts directory
So it's not in PATH in an uninstalled setup (thwarting
gst-play autocompletion).
2013-09-04 10:43:16 +01:00
Tim-Philipp Müller 71422a9a70 tools: gst-launch: don't print properties being reset when shutting down
It's just noise.
2013-08-26 13:19:10 +01:00
Руслан Ижбулатов 797fcd1d49 info: Add debug color mode option
This allows to explicitely set the debug output color
mode to UNIX on every platform, enable it (use platform
default color mode) or enable it.

https://bugzilla.gnome.org/show_bug.cgi?id=674320
2013-07-18 14:30:44 +02:00
Sebastian Dröge ff47fe72ab gst-launch: Remove unref that should not be there
We keep a reference to the context around all the time.

https://bugzilla.gnome.org/show_bug.cgi?id=701985
2013-06-11 10:25:02 +02:00
Sebastian Dröge b7ad14984b gst-launch: Improve GstContext handling
https://bugzilla.gnome.org/show_bug.cgi?id=700967
2013-06-09 17:20:22 +02:00
David Rothlisberger 9f5e9c8632 tools/gstreamer-completion: Allow 1.0 and 0.10 scripts installed simultaneously
As long as the scripts' filenames are different, and the _gst_inspect
and _gst_launch functions are named differently, the completion scripts
for GStreamer 1.0 and 0.10 can be installed side-by-side in
/etc/bash_completion.d.

On my 0.10 branch† the completion script is renamed to
"gstreamer-completion-0.10" and the functions are renamed to
"_gst_inspect_0_10" and "_gst_launch_0_10". The remaining helper
functions should remain identical (the command-line interface to
gst-inspect hasn't changed, nor has the format of the gst-launch
pipeline), so it doesn't matter if the 1.0 script overrides the 0.10
script's definitions.

Note that I don't expect there to be another GStreamer 0.10 release, so
the 0.10 completion script will probably never be officially released;
but it is still worthwhile allowing both scripts to be installed
alongside each other, for those who install the 0.10 completion script
manually.

Fixes: #690515https://github.com/drothlis/gstreamer/blob/bash-completion-0.10/tools/gstreamer-completion-0.10
2013-04-29 21:17:23 +02:00
David Rothlisberger 5d6635f9b4 tools/gstreamer-completion: Complete option & property values on bash 3.2
Bash 3's completion doesn't split words by characters in
COMP_WORDBREAKS. In particular it doesn't split at "=" signs. Now
_gst_launch_parse handles both bash 3 and 4 format of COMP_WORDS.

Note that "${cur%%=*}" means cur's value with the longest possible match
of "=*" deleted from the end; "${cur#*=}" means cur's value with the
shortest possible match of "*=" deleted from the beginning. See
http://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html

Regardless of the version of bash running the unit tests, I can test for
both behaviours because the unit test populates COMP_WORDS manually. So
this tests the bash 3 behaviour:

    test_gst_inspect_completion --gst-debug-level=4

and this tests the bash 4 behaviour:

    test_gst_inspect_completion --gst-debug-level = 4
2013-04-29 21:12:42 +02:00
David Rothlisberger f586e34a50 tools/gstreamer-completion: Bash 3.2 compatibility fixes
Compatible with bash 3.2; doesn't require the bash-completion package at
all (though the easiest way to install this script is still to install
bash-completion, and then drop this script into /etc/bash_completion.d).

Note that bash 3 doesn't break COMP_WORDS according to characters in
COMP_WORDBREAKS, so "property=val" looks like a single word, so this
won't complete property values (on bash 3). Similarly,
"--gst-debug-level=<TAB>" won't complete properly (on bash 3), but
"--gst-debug-level <TAB>" will.

For that reason, I now offer "--gst-debug-level" etc as completions
instead of "--gst-debug-level=".

Functions "_init_completion" and "_parse_help" were provided by the
bash-completion package >= 2.0; now I roll my own equivalent of
"_parse_help", and instead of "_init_completion" I use
"_get_comp_words_by_ref" which is available from bash-completion 1.2
onwards. If the bash-completion package isn't available at all I use
bash's raw facilities, at the expense of not completing properly when
the cursor is in the middle of a word.

The builtin "compopt" doesn't exist in bash 3; those users will just
have to live with the inconvenience of "property=" completing to
"property= " with a trailing space. Property values aren't completed
properly anyway on bash 3 (see above).

"[[ -v var ]]" to test whether a variable is set, also doesn't exist in
bash 3. Neither does ";;&" to fall through in a "case" statement.

In the unit tests:

* On my system (OS X), "#!/bin/bash" is bash 3.2, whereas
  "#!/usr/bin/env bash" is the 4.2 version I built myself.
* I have to initialise array variables like "expected=()", or bash 3
  treats "+=" as appending to an array already populated with one empty
  string.
2013-04-29 21:12:42 +02:00
David Rothlisberger 020dd3bbf3 tools/gstreamer-completion: Support gst-inspect, and gst-launch element properties
Completes options like "--gst-debug-level" and the values of some of
those options; completes gst-launch pipeline element names, property
names, and even property values (for enum or boolean properties only).

Doesn't complete all caps specifications, nor element names specified
earlier in the pipeline with "name=...".

The GStreamer version number is hard-coded into the completion script:
This patch is off the master branch and has the version hard-coded as
"1.0"; it needs to be updated if backported to the 0.10 branch. You
could always create a "gstreamer-completion.in" that has the appropriate
version inserted by "configure", but I'd rather not do that. The
hard-coded version is consistent with the previous implementation of
gstreamer-completion, which had the registry path hard-coded as
~/.gstreamer-1.0/registry.xml.

Note that GStreamer 0.10 installs "gst-inspect" and "gst-inspect-0.10".
"gst-inspect --help" only prints 4 flags (--help, --print, --gst-mm,
gst-list-mm) whereas "gst-inspect-0.10 --help-all" prints the full list
of flags. The same applies to "gst-launch" and "gst-launch-0.10".
GStreamer 1.0 only installs "gst-inspect-1.0", not "gst-inspect".

Requires bash 4; only tested with bash 4.2. Requires "bash-completion"
(which you install with your system's package manager).

Put this in /etc/bash_completion.d/ or in `pkg-config
--variable=compatdir bash-completion`, where it will be loaded at the
beginning of every new terminal session;
or in `pgk-config --variable=completionsdir bash-completion`, renamed to
match the name of the command it completes (e.g. "gst-launch-1.0", with
an additional symlink named "gst-inspect-1.0"), where it will be
autoloaded when needed.

test-gstreamer-completion.sh is (for now) in tests/misc -- it might be
worth creating "tests/check/tools", with all the necessary automake
boilerplate, and moving test-gstreamer-completion.sh there, and have it
run automatically with "make check".

IF YOU'RE NEW TO BASH COMPLETION SCRIPTS
----------------------------------------

"complete -F _gst_launch gst-launch-1.0" means that bash will run the
function "_gst_launch" to generate possible completions for the command
"gst-launch-1.0".

"_gst_launch" must return the possible completions in the array variable
COMPREPLY. (Note on bash syntax: "V=(a b c)" assigns three elements to
the array "V").

"compgen" prints a list of possible completions to standard output. Try
it:

    compgen -W "abc1 abc2 def" -- "a"
    compgen -f -- "/"

The last argument is the word currently being completed; compgen uses it
to filter out the non-matching completions. We put "--" first, in case
the word currently being completed starts with "-" or "--", so that it
isn't treated as a flag to compgen.

For the documentation of COMP_WORDS, COMP_CWORD, etc see
http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-COMP_005fCWORD-180

See also:
* http://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html
* http://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html

The bash-completion package provides the helper function
"_init_completion" which populates variables "cur", "prev", and "words".
See
http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=blob;f=bash_completion;h=870811b4;hb=HEAD#l634

Note that by default, bash appends a space to the completed word. When
the completion is "property=" we don't want a trailing space; calling
"compopt -o nospace" modifies the currently-executing completion
accordingly. See
http://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html#index-compopt
2013-04-29 21:12:42 +02:00
David Rothlisberger 271c707c45 tools/gstreamer-completion: Updated to work with the binary registry
The original registry was in xml format (~/.gstreamer-*/registry.xml). A
binary registry format was added in 2007 (commit ebf0c9d3) and made the
default in 2008 (commit 3f39fd7e). In 0.10 you could still choose at
"configure" time to use the xml registry instead; in 1.0 the binary
registry is your only choice.

This change to gstreamer-completion should work with either format
because it parses the output of "gst-inspect" instead of reading the
registry file directly.

Note that _gst_launch no longer needs an explicit "return 0" because,
unlike the previous grep command, compgen always returns 0 (unless a
genuine error occurs).

Just like the previous implementation by David Schleef, this "only
completes names of features, but that's 90% of what I want it for."
2013-04-29 21:12:42 +02:00
Tim-Philipp Müller 7954ac2ad7 tools: update for latest context API changes 2013-04-18 10:13:30 +01:00
Sebastian Dröge 8f8036f344 gst-launch: Add GstContext support
gst-launch will collect all the contexts from the pipeline elements
and update the overall pipeline context with it.
2013-04-17 13:47:35 +02:00
Tim-Philipp Müller 21e584696d gst-inspect: only add a '*' for non-'gpointer' pointers
Spotted by Jose Antonio Santos Cadena.

https://bugzilla.gnome.org/show_bug.cgi?id=697791
2013-04-13 12:00:12 +01:00
Jose Antonio Santos Cadenas 9e98492e12 gst-inspect: add pointer mark to signal and action return types that are pointers
When the return type of a signal or action is a pointer, it
should have an asterisk to mark it as such.

https://bugzilla.gnome.org/show_bug.cgi?id=697791
2013-04-11 23:35:38 +01:00
Wim Taymans 9ee7e72c36 launch: handle PROGRESS messages
Wait for all PROGRESS messages (if any) to complete before going to the PLAYING
state. This is the only way we can wait for live elements to complete their
operations.

This is interesting for elements like rtspsrc that do some asynchronous network
requests as part of going to the PAUSED state. It could be possible that it, for
example, provides a clock and then we would like to wait until it completes
so that we can use the provided clock when going to PLAYING.
2013-04-11 14:00:32 +01:00
David Schleef 96a8d5945f gst-launch: Fix space in fault message 2013-04-06 16:10:16 -07:00
Sebastian Dröge 91b3890d70 caps: Handle ANY caps features properly in more places 2013-04-06 21:49:25 +02:00
Sebastian Dröge f810565ca7 gst-inspect: Print caps features too 2013-04-01 10:20:01 +02:00
Wim Taymans 9baef63f5b launch: don't exit the loop on buffering in paused
When we receive a buffering message of 100% in the paused state, we exit
the event_loop and move to the PLAYING state. What should happen is that
we wait for both ASYNC-DONE and 100% buffering before continueing.
2013-03-11 12:28:19 +01:00
Krzysztof Konopko 6099b35f7e gst-launch: Use g_unix_signal_add() to handle keyboard interruption
Current implementation uses a traditional signal handler and a 250ms
timeout callback in the event loop.  Adding a GSource with
g_unix_signal_add() to the GMainLoop is a much more elegant solution.
The signal handler with this approach can send a message to the bus
directly rather than set a flag as all dispatching intricacies are handled
by GLib.

https://bugzilla.gnome.org/show_bug.cgi?id=693481
2013-02-14 10:10:59 +01:00
Tim-Philipp Müller b22385af0a docs: flesh out gst-launch-1.0 man page a little
Fix up default location of the registry.

Mention more options for GST_DEBUG (wildcards and
named debug levels).

Explain what to do with the dot files that can be
produced by setting GST_DEBUG_DUMP_DOT_DIR.

https://bugzilla.gnome.org/show_bug.cgi?id=693607
2013-02-13 23:27:16 +00:00
Tim-Philipp Müller c015b70456 tools: minor addition to gst-launch-1.0 man page
https://bugzilla.gnome.org/show_bug.cgi?id=692015
2013-01-18 16:05:09 +00:00
Tim-Philipp Müller 1ccf9cf006 tools: update gst-launch-1.0 man page for new debug levels
There are more debug levels these days, not only 0-5.

https://bugzilla.gnome.org/show_bug.cgi?id=692015
2013-01-18 16:01:11 +00:00
Andrzej Bieniek 8cbdf007a7 gst-launch: report execution time in GST_TIME_FORMAT
https://bugzilla.gnome.org/show_bug.cgi?id=687523
2012-12-10 13:02:48 +01:00
Sebastian Dröge 2b49726d8e gst-inspect: Fix indention for printing typefinder features 2012-11-12 10:30:08 +01:00
Olivier Crête 1d41a8002b Document GST_DEBUG_FILE 2012-11-06 18:30:31 +01:00
Tim-Philipp Müller bfc3982308 gst-inspect: fix alignment of rank, etc. 2012-11-06 17:03:47 +00:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Wim Taymans 5d64c5ce5a docs: some 0.10 -> 1.0 changes 2012-10-02 13:22:35 +02:00
Wim Taymans a87e95f38f docs: updates
MIME-type -> Media type
Fix some old gst-inspect output
2012-09-25 17:06:45 +02:00
Josep Torra Valles 111fcc6e31 Make intel compiler happier
https://bugzilla.gnome.org/show_bug.cgi?id=552657
2012-09-25 00:56:26 +01:00
Bastian Winkler 771d061658 man: Fix syntax for value lists in caps strings
Value lists use curly brackets instead of parentheses

https://bugzilla.gnome.org/show_bug.cgi?id=684293
2012-09-21 11:47:23 +01:00
Mark Nauwelaerts 2834dd0518 use gst_element_factory_get_metadata to replace obsolete API 2012-09-15 19:09:08 +02:00
Wim Taymans 8db60df244 docs: fourcc is no more 2012-09-13 11:38:33 +02:00
Wim Taymans 3abc720345 docs: fix some docs
from git grep for ffmpegcolorspace and x-raw-
2012-09-13 11:35:41 +02:00
Tim-Philipp Müller 48541a0b59 tools: add --exists and --atleast-version option to gst-inspect
For checking if an element exists with a given minimum version.
Will use that in our new GST_ELEMENT_CHECK m4 macro.

https://bugzilla.gnome.org/show_bug.cgi?id=682968
2012-09-01 23:02:10 +01:00
Tim-Philipp Müller b292dc8401 tools: output gst-inspect errors to stderr 2012-08-29 22:57:26 +01:00
Tim-Philipp Müller fc0d6ce23a tools: minor fixes to gst-launch man page 2012-08-18 21:42:23 +01:00
Tim-Philipp Müller f938cf9257 tools: fix printing of partial dates in gst-launch 2012-08-02 11:33:41 +01:00
Tim-Philipp Müller 04142a9653 Revert "tools: print TOC scope"
This reverts commit ee6ab7c936.

The application will probably only ever receive global TOCs,
so don't really need this.
2012-08-02 11:15:16 +01:00
Tim-Philipp Müller ee6ab7c936 tools: print TOC scope 2012-07-28 09:40:25 +01:00
Tim-Philipp Müller 280ac5c5ef gst-launch: print image tags and other GstSample tags properly
These tags are now of type GstSample not GstBuffer.
2012-07-26 15:26:09 +01:00
Stefan Sauer e234651bd3 inspect: suppress glib deprecations warnings for G_VALUE_ARRAY 2012-07-08 20:15:33 +02:00
Edward Hervey e4bfefb51b gst-inspect: Remove unused define 2012-07-06 12:48:44 +02:00
Sebastian Dröge dfd9b60221 toc: Make structures opaque and clean up function names and fields a bit 2012-07-05 12:29:02 +02:00
Tim-Philipp Müller 1c7ce1594a tools: minor clean-up
Get rid of superfluous argument.
2012-06-26 17:30:22 +01:00
Tim-Philipp Müller 6438a0439d tools: remove useless g_set_prgname() wrapper 2012-06-26 17:30:22 +01:00
Tim-Philipp Müller 5be0a58463 tools: point people to right binary when a crash happens
"gst-launch" is the 0.10 wrapper script, using that with
gdb is not going to yield great results.
2012-06-26 17:30:21 +01:00
Tim-Philipp Müller 8590be2861 tocsetter, gst-launch, tests: update for GstToc API changes 2012-06-24 20:15:19 +01:00
Tim-Philipp Müller a2cc2b5af2 tools: remove pointless get_state() in gst-launch
State changes to NULL state are always sync.
2012-06-23 12:39:10 +01:00
Wim Taymans 6efb5c9b6b bus: add GDestroyNotify to set_sync_handler() 2012-06-20 12:29:35 +02:00
Tim-Philipp Müller cd3875857e gst_tag_list_free() -> gst_tag_list_unref() 2012-05-28 00:08:18 +01:00
Anton Belka 86375c6c42 gst-launch: fix -c, --toc message 2012-05-21 09:25:18 +02:00
Tim-Philipp Müller 37e516ccf7 tools, tests: don't access the GstPluginFeature structure directly 2012-05-19 17:23:43 +01:00
Tim-Philipp Müller 36acfbd619 tools: don't use private GstElementFactory API in gst-inspect 2012-05-19 14:59:14 +01:00
Wim Taymans 6e87803114 launch: improve EOS on shutdown handling
When the -e option is selected, also wait for EOS when the pipeline produced an
error.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=630997
2012-05-18 09:52:09 +02:00
Sebastian Dröge cacdea6ae6 gst: Rename gst_toc_entry_type_to_string() to gst_toc_entry_type_get_nick()
It's more consistent.
2012-05-15 16:38:30 +02:00
Anton Belka d167c321be gst-launch: fix print_toc_entry() 2012-05-15 16:18:37 +02:00
Anton Belka 9667e1e75c gst-launch: print tags in toc 2012-05-09 12:24:11 +02:00
Tim-Philipp Müller e73747a7e0 tools, base: don't poke into GstTypeFindFactory struct, use public API 2012-05-01 23:23:41 +01:00
Tim-Philipp Müller c7eca5ca15 plugin: use GstObject flags for plugin flags 2012-04-29 17:46:32 +01:00
Tim-Philipp Müller 3453ae1a7f tools: use public accessors for plugin description details
Mostly anyway (flags still need sorting out).
2012-04-29 16:49:57 +01:00
Youness Alaoui be5d2987a8 gst-inspect: If running with --print-all, fix printing of the Children: line 2012-04-17 09:09:14 +02:00
Youness Alaoui 894aa56140 gst-inspect: If running with --print-all, fix printing of signal names 2012-04-17 09:09:14 +02:00
Sebastian Dröge b0d89da6b6 gst: Change versioning
Remove GST_MAJORMINOR and replace it by GST_API_VERSION
Also set GST_VERSION_{MAJOR,MINOR,MICRO,NANO} explicitely
now.

All versions are at 1.0.0 now for the release soon but
API/ABI can still change until the 1.0.0 release.

Next release versions until 1.0.0 will be 0.10.9X and
these will be release candidates. GST_VERSION_* will
nonetheless stay at 1.0.0.0.
2012-04-04 14:28:55 +02:00
Tim-Philipp Müller f1bf53823a tools: fix compiler warning
gst-launch.c: In function ‘print_toc_entry’:
gst-launch.c:446:3: error: the size of array ‘spc’ can’t be evaluated [-Werror=vla]
gst-launch.c:446:3: error: variable-sized object may not be initialized
2012-04-02 23:17:21 +01:00
Stefan Sauer 1074a4e99a Merge branch '0.10'
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/Makefile.am
	gst/gst.c
	gst/gst.h
	gst/gstevent.c
	gst/gstevent.h
	gst/gstmessage.h
	gst/gstquark.c
	gst/gstquark.h
	gst/gstquery.c
	gst/gstquery.h
	tests/check/Makefile.am
2012-04-02 21:33:10 +02:00
Stefan Sauer ea9cc8c871 gst-launch: add -c, --toc to print the toc
Print the nested chapter and edition structure of the chapters message.
2012-04-02 10:49:38 +02:00
Sebastian Dröge 4b6c3c7fea Merge remote-tracking branch 'origin/0.10'
Conflicts:
	plugins/elements/gstmultiqueue.c
2012-03-29 14:54:53 +02:00
Stefan Sauer f08d942795 gst-launch: don't shadow global variable 2012-03-22 08:36:50 +01:00
Edward Hervey 823807c5f0 Suppress deprecation warnings in selected files, for g_value_array_* mostly 2012-02-27 13:43:59 +01:00
Sebastian Dröge 4e108ee92a gst-inspect: Fix memory leak 2012-01-27 19:00:03 +01:00
Sebastian Dröge a602d5b3e4 gst-inspect: Don't unref plugin features multiple times
gst_plugin_feature_list_free() unrefs them too.
2012-01-27 18:54:24 +01:00
Wim Taymans 321ee10bd6 trace: rework alloc tracing
Remove trace, we use debug log for that
Make alloc trace simpler, removing some methods.
Activate alloc trace with a GST_TRACE=3 environment variable.
Dump leaked objects atexit.
Provide an offset in the object where the GType can be found so that more
verbose info can be given for objects.
Remove -T option from gst-launch because tracing is now triggered with the
environment variable.
2012-01-27 17:54:43 +01:00
Tim-Philipp Müller 70d3e5b13f tools: gst-inspect: suppress deprecation warnings for G_TYPE_VALUE_ARRAY
For now anyway.
2012-01-26 10:44:11 +00:00
Sebastian Dröge 35ea12eeea Merge branch 'master' into 0.11 2012-01-25 11:43:13 +01:00
Tim-Philipp Müller 8c832a5e45 tools: fix typo in gst-inspect debug message 2012-01-22 15:23:13 +00:00
Tim-Philipp Müller 13d91d1f6c Use recent GLib API unconditionally now that we depend on the latest GLib 2012-01-22 01:25:22 +00:00
Vincent Penquerc'h 6ede81d18e gst-inspect: plug factory leak on error 2012-01-13 10:43:41 +00:00
Tim-Philipp Müller 66d19b65fb Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tools/gst-inspect.c
2012-01-13 00:22:03 +00:00
Vincent Penquerc'h f460cea1d7 gstinspect: fix features and list leaks 2012-01-12 15:50:53 +00:00
Tim-Philipp Müller ed80a5cd4b registry: rename gst_registry_get_default() to gst_registry_get()
It's not really a default if there is only one that can't be changed.

Should we return a ref like e.g. g_volume_monitor_get() does?
2012-01-02 02:22:51 +00:00
Tim-Philipp Müller be04f3945c index: remove GstIndex and GstIndexFactory for now
There are many good use cases for GstIndex and we want
to add it back again in some form, but possibly not with
the current API, which is very powerful (maybe too powerful),
but also a bit confusing. At the very least we'd need to
make the API bindings-friendly.
2011-12-30 18:32:57 +00:00
Tim-Philipp Müller a1daf846f3 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstobject.h
	libs/gst/check/gstcheck.h
	libs/gst/controller/gstcontroller.c
	plugins/elements/gstidentity.c
	tools/gst-xmlinspect.c
2011-12-04 15:38:09 +00:00
Tim-Philipp Müller fef18639db g_thread_init() is deprecated in glib master
It's not needed any longer.
2011-12-03 17:40:53 +00:00
Wim Taymans 1754ee91ad element: add indexable flag
Remove the is_indexable method check and use an element flag to check if the
element can use an index.
2011-11-28 18:13:27 +01:00
Wim Taymans 40616aeb63 element: use flags for require/provide clock
Remove the _require/_provide_clock() methods and use element flags to mark
elements instead of looking at the implementation of the vmethod.
2011-11-28 17:22:44 +01:00
Stefan Sauer 52e3861e91 warnings: avoid set-but-unused warnings with load-save disabled 2011-11-27 20:39:42 +01:00
Tim-Philipp Müller 19c90d4638 tools: make gst-inspect print a nasty debug message for non-grata property type
Try to eradicate properties of long/ulong/char/uchar type.
2011-11-24 01:06:52 +00:00
Wim Taymans b5c3e254b1 pad: remove getcaps and use caps query
Remove the getcaps function on the pad and use the CAPS query for
the same effect.
Add PROXY_CAPS to the pad flags. This instructs the default caps event and query
handlers to pass on the CAPS related queries and events. This simplifies a lot
of elements that passtrough caps negotiation.
Make two utility functions to proxy caps queries and aggregate the result. Needs
to use the pad forward function instead later.
Make the _query_peer_ utility functions use the gst_pad_peer_query() function to
make sure the probes are emited properly.
2011-11-15 11:20:48 +01:00
Tim-Philipp Müller f598856765 plugins, tools: update for get_protocols() return value change 2011-11-13 23:25:23 +00:00
Tim-Philipp Müller bb18ca7fa4 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tools/gst-inspect.c
2011-11-13 13:23:09 +00:00
Tim-Philipp Müller c0d5857cd9 gst-inspect: print current value as default value
Instead of printing separate 'Current' and 'Default' values
(the former obtained via g_object_get() and the latter from
the property GParamSpec), simply print the Current value as
the Default value. This is the right thing to do for almost
all elements and avoids confusion if a subclass of a base
class chooses a different default than the base class.
2011-11-12 16:42:14 +00:00
Wim Taymans 37318a8cd2 pad: remove GstPadFixateCapsFunction
The fixate caps function was not used externally and we have vmethods in the
base classes where it is needed.
Update some docs.
simplify some fixate functions in the base classes. Also pass the untruncated
caps to the vmethod.
2011-11-10 10:58:42 +01:00
Wim Taymans b7966c0c7d pad: make an ACCEPT_CAPS query
Replace the acceptcaps function with a query.
2011-11-09 17:36:00 +01:00
Wim Taymans 6cc7254166 remove query types
It was not really useful
2011-11-09 11:47:10 +01:00
Stefan Sauer b5d35e2acb controller: port to new controller api 2011-11-04 20:11:51 +01:00
Edward Hervey 08ccde744e gst-inspect: Don't leak plugin feature list 2011-10-14 09:27:38 +02:00
Piotr Fusik 14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Tim-Philipp Müller 1090f00ee2 tools: make unversioned wrapper look for -0.10 tools only
Don't want (incompatible) 0.11 tools to be picked up by accident.
2011-08-05 12:12:33 +01:00
Wim Taymans a767bf2bf9 caps: use the caps event
Use the caps event instead of gst_pad_set_caps() and the setcaps function
2011-06-07 09:43:20 +02:00
Tim-Philipp Müller accfb89ea8 tools: remove unversioned gst-launch, gst-inspect and gst-typefind
The unversioned tool wrappers are confusing and annoying for packagers,
users and developers alike. A gst-launch pipeline that works in 0.10
will likely not work in 0.11 (e.g. because elements or properties get
renamed, or syntax changes). The unversioned tools also yield useless
results when used with gdb or valgrind. Packagers need to co-ordinate
the packaging of all major versions to make sure there are no conflicts
when both try to install the same files. When two major versions are
in use (e.g. 0.10 and 0.11/1.0), it may be unclear (when looking at
things on IRC/pastebin/mailing list etc.) which version is actually
being used when there are unversioned wrappers. For all these reasons,
it seems best to just remove them for now.
2011-06-05 14:20:25 +01:00
Tim-Philipp Müller a4092cd5c4 Remove everything libxml2- and loadsave-related 2011-06-04 15:22:06 +01:00
Tim-Philipp Müller 0bf43651a9 tools: remove SIGUSR* handling from gst-launch
Remove SIGUSR* handling from gst-launch, since it might interfere
with other things (e.g. libleaks), and should be done differently
anyway (either via support for simple timed-commands scripting or
remote control via DBus or so).
2011-06-04 14:41:16 +01:00
Tim-Philipp Müller 510ee7be34 tools: remove gst-xmlinspect
People should just query the registry themselves or write a small
python script if they need this functionality (which is likely
less work than parsing the XML that this script outputs, and I'm
not aware of anything using the xml2text xsl either).
2011-06-04 14:28:08 +01:00
Tim-Philipp Müller 548856596d tools: remove gst-feedback
It's not really that useful, and no one's been using it for years.
2011-06-04 14:22:05 +01:00
Tim-Philipp Müller 9e20c4eadc tools, tests: fix some unused-but-set-variable compiler warnings 2011-06-04 14:13:07 +01:00
Sebastian Dröge 350a2d1ba8 gst-launch: Don't access the GstMessage structure directly 2011-05-30 07:44:50 +02:00
Sebastian Dröge 58302cedfa Merge branch 'master' into 0.11 2011-05-30 07:41:13 +02:00
Tim-Philipp Müller 329b786569 tools: catch and print missing-plugin messages in gst-launch
So that users get some feedback if they're using a pipeline
like  src ! decodebin2 ! sink  and are missing an element.
2011-05-27 15:17:32 +01:00
Wim Taymans 2c221a5729 feature: use object name
Remove the name property from the plugin feature and port code to use the object
name instead.
2011-05-24 18:17:24 +02:00
Wim Taymans e39182a085 Merge branch 'master' into 0.11
Conflicts:
	gst/gstminiobject.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstplugin.h
	libs/gst/base/gstbaseparse.c
2011-05-18 13:14:57 +02:00
Stefan Kost 649ff4e1f6 inspect: show flags the same way they need to be entered
The (de)serialisation uses "+" and not " | ".
2011-05-18 09:55:57 +03:00
Wim Taymans 22d64af104 tools: avoid using pad caps
Avoid directly accessing the pad caps, use gst_pad_get_current_caps() instead.
2011-05-09 10:54:10 +02:00
Wim Taymans ba6b915651 base: avoid using buffer caps
Comment all code using buffer caps.
Rework capsfilter code a little.
Fix some unit tests
2011-05-08 12:46:17 +02:00
Wim Taymans c4751ec8c1 Revert "context: use context on buffers instead of caps"
This reverts commit 9ef1346b1f.

Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Wim Taymans 9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Wim Taymans 6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Wim Taymans 24bb414035 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2011-04-19 16:21:15 +02:00
Tim-Philipp Müller 7b9769b322 gst-launch: remove newline from translatable string 2011-04-16 14:52:40 +01:00
Wim Taymans 6be4dbdb5a Merge branch 'master' into 0.11
Conflicts:
	android/base.mk
	android/controller.mk
	android/dataprotocol.mk
	android/elements.mk
	android/gst-inspect.mk
	android/gst-launch.mk
	android/gst-plugin-scanner.mk
	android/gst.mk
	android/indexers.mk
	android/net.mk
	win32/common/libgstbase.def
2011-04-11 10:26:54 +02:00
Alessandro Decina 3f1ef2255a android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 01:08:07 +02:00
Wim Taymans d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02:00
Wim Taymans 230c3455ac Merge branch 'master' into 0.11
Conflicts:
	gst/gstregistry.h
2011-03-02 11:08:34 +01:00
Tim-Philipp Müller b923b7f901 tools: print "pad-added", "pad-removed" and "no-more-pads" signals for elements with sometimes pads
It's often not obvious to people that elements like e.g. uridecodebin
(or demuxers) automatically support the standard signals of the
GstElement class, so let's print the useful pad-related ones for
elements with sometimes pads.
2011-02-28 14:59:33 +00:00
Stefan Kost 88cda98939 gst-launch: add index support
When option "-i" is given, set an index object on the pipeline and compute
statistics for all index writers. Print a sumary when shutting down the
pipeline.
2011-02-24 15:36:47 +02:00
Wim Taymans 6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01:00
Wim Taymans 238b9a57cc Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst/gstelement.c
	gst/gstelement.h
	gst/gstpad.c
	gst/gstutils.c
	libs/gst/base/Makefile.am
	libs/gst/check/Makefile.am
	libs/gst/controller/Makefile.am
	libs/gst/dataprotocol/Makefile.am
	libs/gst/net/Makefile.am
	win32/common/libgstreamer.def
2011-02-22 14:11:59 +01:00
Tim-Philipp Müller d6aec1acc3 gst-launch: pretty-print datetime tags 2011-02-13 22:57:48 +00:00
Tim-Philipp Müller 6fef105491 docs: minor gst-launch man page fix
Transmitter/receiver pipelines were mislabelled. Spotted by Majin.
2011-01-25 09:17:55 +00:00
Wim Taymans 920ef127ce element: rework GstElementDetails
Clean up the GstElement structure
Replace GstElementDetails with metadata
2010-12-07 15:33:04 +01:00
Wim Taymans 993eda5004 remove deprecated symbols and methods 2010-12-06 19:18:31 +01:00
Wim Taymans 99775e5271 more 0.10 -> 0.11 2010-12-06 13:21:45 +01:00
Mark Nauwelaerts 9be4aa34a3 gst-inspect: remove some commented code 2010-12-03 13:35:36 +01:00
Mark Nauwelaerts b9c582f4af gst-inspect: useful factory names for uri-handlers output
Fixes #632236.
2010-10-15 19:45:30 +02:00
Thijs Vermeir 0f896f8ab0 tools: fix parsing of timestamp in gst-plot-timeline 2010-10-05 11:52:24 +02:00
Tim-Philipp Müller bcb7ff4f1d gst-inspect: print GST_PARAM_MUTABLE_* property flags 2010-09-23 20:55:54 +01:00
Sebastian Dröge 748433776a gst-launch: Use g_file_test() instead of access() which does not exist on MSVC6
Fixes bug #629494.
2010-09-17 19:54:26 +02:00
Stefan Kost 3eb97aa32c gst-launch: add a sync bus handler and move state-change logging there
The sync handler is called for all mesages, the event loop we previously used
was not. In the sync handler trigger pipeline dot dumps and call access for a
file in tmp-dir to add markers interceptable by strace and co.
2010-09-09 15:59:55 +03:00
Tim-Philipp Müller 1b4504c50d gst-inspect: don't use gst_structure_foreach() on NULL pointers 2010-09-07 11:10:06 +01:00
Stefan Kost 65356fbb7a element-details: allow for arbitrary element details
Add a GstStructure to GstElementClass and GstElementFactory. Add setters/getter.
Handle it in the registry code. Print items in gst-inspect.
Fixes #396774.

API: gst_element_class_set_meta_data(), gst_element_factory_get_meta_data_detail()
2010-09-06 12:31:04 +03:00
David Schleef 95cd0ab6e4 gst-launch: Fix OIL_CPU_FLAGS docs for Orc 2010-08-24 12:51:41 -07:00
Stefan Kost 58b8319f9c man: remove OIL_CPU_FLAGS from man page
We're using ORC instead of libOil now.
2010-08-24 16:25:16 +03:00
Stefan Kost 330f308c3d inspect: pad info output improvements
Don't print empty query types. Also print caps-vmethods.
2010-08-05 09:40:03 +03:00
Tim-Philipp Müller 708bc7dc97 tools: make gst-inspect print the release date time stamp 2010-07-23 20:46:10 +01:00
Michael Bunk 6df8250d01 docs: fix typo on gst-inspect man page
See #624164.
2010-07-16 18:20:57 +01:00
Sebastian Dröge be77e8d6e1 Revert "-launch: disable CLOCK_LOST message handling"
This reverts commit 1f8eba611a.

This should be fixed now (and if not should be fixed) and the
clock-lost handling is now needed for playbin2 gapless playback.

See bug #579127.
2010-07-16 17:27:56 +02:00
Tim-Philipp Müller bd03793273 tools: remove -p shorthand for --no-sigusr-handler
It's not really needed, and doesn't map any longer after the long option
has been renamed.
2010-07-08 13:43:22 +01:00
Tim-Philipp Müller d989fa3cf1 tools: mention --eos-on-shutdown on gst-launch man page 2010-06-28 13:56:00 +01:00
Sebastian Dröge 5f4a965f67 gstxml: Deprecate GstXml and related functions
Pipeline serialisation to and from XML is horribly broken for all
but the most simple use cases, and will likely never be fixed.
Make sure everyone playing around with these tools is aware of
this, to avoid frustration. See countless bug reports in bugzilla.

Fixes bug #622685.
2010-06-25 18:25:40 +02:00
Tim-Philipp Müller fd64c4b255 tools: deprecate gst-xmllaunch and print fat warning if someone tries to use it
Pipeline serialisation to and from XML is horribly broken for all
but the most simple use cases, and will likely never be fixed.
Make sure everyone playing around with these tools is aware of
this, to avoid frustration. See countless bug reports in bugzilla.
2010-06-24 17:53:36 +01:00
Tim-Philipp Müller 1210e4a006 gst-launch: rename new --no-play command line option to --no-sigusr-handler
--no-play seems a bit confusing.

Fixes #621867.
2010-06-24 17:27:09 +01:00
Tim-Philipp Müller 1e3bd02618 gst-launch: print more errors to stderr and suppress more output in quiet mode
If --quiet is given, don't print anything but errors. Also, make
sure errors are always printed to stderr and not to stdout.

Fixes #621595.
2010-06-15 01:20:37 +01:00
David Schleef ad9f5e11d0 gst-inspect: print ranks with offsets from names 2010-06-11 16:12:33 -07:00
Руслан Ижбулатов 01a966eec3 tools: fix gst-run wrapper to work on Windows
Fixes #617625
2010-05-05 17:08:32 +01:00
Stefan Kost 7c4e0537d3 gst-launch: add -p option to disable play handler.
Same logic as for the fault handler. This is useful for some debug/tracing tools
that need to grab SIGUSR1 and SIGUSR2 them self.
2010-04-30 10:03:38 +03:00
Tim-Philipp Müller 47ac7cf1fc build: when building executables, put libs to link to into LDADD instead of LDFLAGS
Use foo_LDADD instead of foo_LDFLAGS to specify the libraries to link to.
This should make sure arguments are passed to the linker in the right
order. See #615697.
2010-04-14 11:23:37 +01:00
Wim Taymans ba3f4140f3 launch: make -q be more quiet
Convert some g_print into PRINT so that they are not printed when the -q option
is selected.
2010-04-09 15:48:00 +02:00
Edward Hervey 5f3d98f29f gst-indent: Add --leave-preprocessor-space for indent 2.2.11
It was previously broken, which is why we never needed it. This keeps backward
compatibility with indent <= 2.2.11
2010-04-03 20:51:17 +02:00
Benjamin Otte a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Benjamin Otte 3234c0128b Fixes for -Wold-style-definition
https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:35 +01:00
Sebastian Dröge ce74a1ae19 build: Make some more rules silent if requested 2010-03-09 20:57:17 +00:00
Tim-Philipp Müller ca320242f3 tools: call g_set_prgname() before doing the option parsing
g_setprgname is implicitly called by g_option_context_new() with a check
to see if it's been set already, so set it before g_option_context_new()

Move version printing back until after the options have been parsed,
otherwise it won't work, since it evaluates a flag set by the
option parser.
2010-02-16 11:33:19 +00:00
Tim-Philipp Müller 47601cb911 Revert "tools: Move gst_tools_print_version call to avoid warning from new GLib."
This reverts commit 93dd95f02e.

This commit made --version not work any longer. The g_setprgname()
warning is fixed in recent GLib versions.
2010-02-16 11:33:19 +00:00
Tim-Philipp Müller 33a38153f4 gst-launch: don't leak timeout GSource 2010-02-12 00:02:16 +00:00
Benjamin Otte 91b948589b tools: Run g_thread_init() unconditionally
Since we define G_THREADS_MANDATORY, g_thread_supported() evaluates to
TRUE unconditionally, so calling g_thread_init() never happened.
2010-01-20 14:13:11 +01:00
Wim Taymans 50179ec478 launch: also print leaked objects
Make the -T option also print the leaked objects
2009-12-23 21:39:20 +01:00
Sebastian Dröge 0ffca884b0 tools: Move gst_tools_print_version() for the remaining tools 2009-12-09 07:25:31 +01:00
Ole André Vadla Ravnås 93dd95f02e tools: Move gst_tools_print_version call to avoid warning from new GLib.
g_setprgname is implicitly called by g_option_context_new() with a check
to see if it's been set already.

Fixes bug #604093.
2009-12-09 07:24:22 +01:00
David Schleef c222a3015e tools: Fix check for Windows 2009-12-01 22:37:51 -08:00
Stefan Kost ccd1a2e8ad inspect: allow to get plugin-install-info for all installed plugins
If no plugin is given, print the info for all plugins. This can be used as a
starting point to generate a profile about what the gstreamer installation can
potentialy handle (e.g. for MTP or DLNA).
2009-11-09 14:57:54 +02:00
Tim-Philipp Müller ed86995cd8 gst-launch: wake up less often to check if we've been interrupted
Check if we've been interrupted only four times per second instead
of twenty times per second, to wake up the cpu less often and
save power (see bug #600922).
2009-11-07 20:22:49 +00:00
Jan Schmidt 35e1103446 gst-indent: Use the same logic to find gnuindent as the git hook 2009-11-04 11:36:19 +00:00
Tim-Philipp Müller 5f8b121619 docs: add another example to the gst-launch man page
Add an example that shows how to refer to specific pads by name
when constructing a pipeline string. Fixes #600382.
2009-11-03 01:23:03 +00:00
Edward Hervey adfb63837c tools/gst-inspect: Check we're not handling NULL pointers. 2009-10-19 13:30:10 +02:00
Edward Hervey b11d72adb4 tools/gst-inspect: Remove dead assignment 2009-10-19 13:29:40 +02:00
Stefan Kost cfb4aa4627 build: sprintf, sscanf need stdio.h 2009-10-07 10:59:54 +03:00
Stefan Kost bc6b1db5e9 man: fix copy and past mistake for -q option 2009-10-07 10:59:54 +03:00
Edward Hervey 4322a4b0db gst-launch: Don't activate tracing if not requested. 2009-10-07 08:41:32 +02:00
Jan Schmidt ef32c11e6e Add restarting of the plugin loader and blacklisting of broken files 2009-10-06 19:51:42 +01:00
Sebastian Dröge 1e39f6ea0e tools: Use iterate_internal_links instead of deprecated get_internal_links 2009-08-18 14:57:25 +02:00
Tim-Philipp Müller 335024b082 tools: the plugin features listed by gst-inspect are typefinders, not types 2009-07-10 19:29:37 +01:00
Philip Jägenstedt 9501767704 tools: Fix compilation if option parsing is disabled
Fixes bug #587976.
2009-07-08 15:15:04 +02:00
Tim-Philipp Müller ecf142bbe0 gst-inspect: fix broken flags to flag string serialisation
e.g. cdparnoiasrc would show fragment|full for a flags value of 2.
2009-06-19 21:07:06 +01:00
Tim-Philipp Müller 99a1493e69 gst-launch: refer to element, pad, or object in some message strings
Revisit these strings now that the change regarding the message source
object in gst_element_found_tags_for_pad() got reverted. Try to refer
explicitly to what kind of element it is (element, pad, etc.) in some
cases, which is nicer than having to deduce this info (and we can
re-use the already existing translated strings for the most common
case). It also makes for better example code, since it's clear now
that the message source object doesn't have to be an element.
2009-06-04 00:40:52 +01:00
David Schleef 08fb55c2e1 tools: Set pipeline to PAUSED before waiting for main loop idle
When it is shutting down a pipeline after ctrl-c, set pipeline to
paused before waiting for the main loop to complete all pending
transactions.  Fixes #584657.

If some part of the pipeline is generating signals or idle functions
at a fast rate, waiting for a main loop iteration may never return.
2009-06-02 13:49:36 -07:00
Tim-Philipp Müller 23cdff62ea docs: fix cdparanoia example pipeline in gst-launch man page 2009-05-26 09:51:51 +01:00
Tim-Philipp Müller 3a8aba7e92 gst-launch: don't use G_GUINT32_FORMAT in translatable string
xgettext doesn't handle this very well. Fixes #583419.
2009-05-21 10:57:47 +01:00
Sebastian Dröge 18f5b1a59e gst-launch: Print the path string for message sources
This reduces confusion if the message source is a pad
and only "src" is printed as source.
2009-05-14 12:30:04 +02:00
Wim Taymans 53d3663139 -launch: connect to deep-notify with right name
Connect to the right signal name with - instead of _.
2009-05-11 22:33:14 +02:00
Wim Taymans 1f8eba611a -launch: disable CLOCK_LOST message handling
Disable the handling of the CLOCK_LOST messages until we fixed and released the
elements (rtspsrc) that break when we quickly PAUSE/PLAY the pipeline.

Fixes #579127
2009-04-16 12:01:50 +02:00
Wim Taymans cf78781c6b -launch: handle clock-lost messages
When we receive a clock-lost message, we need to select a new clock in the
pipeline by setting the pipeline to PAUSED and back to PLAYING.
2009-04-10 14:15:36 +02:00
Edward Hervey 5142a04656 gst-inspect: remove dead assignment
first_flag will be either:
* rewritten without being read if we loop again (line 284)
* not read again if we don't loop
2009-04-04 14:42:04 +02:00
Thiago Santos 37fe4bf3b9 gst-launch: Fixes error when DISABLE_FAULT_HANDLER is defined
When defined, this macro prevented the declaration of 'waiting_eos', causing an error.
2009-03-31 18:14:08 -03:00
Thiago Santos 5fa36d9f3d Adds flag for eos on shutdown in gst-launch. Fixes #575814. 2009-03-27 08:30:27 -03:00
Tim-Philipp Müller 927d016461 docs: gst-launch man page fix
The command line option is --gst-debug-disable, not --gst-disable-debug.
Fixes #576556. Spotted by Bogdan Harjoc.
2009-03-24 21:39:21 +00:00