Commit graph

14883 commits

Author SHA1 Message Date
Sebastian Dröge ee21c26cea elementfactory: Add support for checking only the media type of a factory
And while at it also add Metadata and Subtitle media types.
2013-05-28 12:41:27 +02:00
Sebastian Dröge ab6a1085ee (multi)queue: Don't access query items during flushing 2013-05-27 16:38:18 +02:00
Sebastian Dröge e472d9d261 multiqueue: Don't do serialized queries when we're flushing
Just immediately fail the query, otherwise we would wait forever
for the query to be answered.
2013-05-27 16:22:00 +02:00
Sebastian Dröge a03435dfba queue2: First set query result, then signal GCond 2013-05-27 16:08:39 +02:00
Sebastian Dröge 6f042f13ae queue: Fix handling of serialized queries
During FLUSH_START the query needs to be unblocked already, otherwise
it can lead to deadlocks if the FLUSH_START is the result of something
done from the streaming thread of the srcpad (the queue will never be
emptied!).
2013-05-27 15:59:07 +02:00
Sebastian Dröge cdc429f296 queue2: Unblock any waiting serialize queries on FLUSH_START
Fixes some deadlocks during flushing.

And store queue items differently to not accidentially read
already unreffed queries when flushing. Queries are owned by
upstream and not us.
2013-05-27 15:41:14 +02:00
Sebastian Dröge b6fac17502 queue/queue2/multiqueue: When flushing, make sure to not lose any sticky events
https://bugzilla.gnome.org/show_bug.cgi?id=688824
2013-05-27 13:01:43 +02:00
Sebastian Dröge 73895c05b1 pad: Store sticky events even if the pad is flushing
But do this only for events that are not dropped by flushing,
i.e. do it only for everything except SEGMENT and EOS.

Without this we might drop a CAPS event if flushing happens
at an unfortunate time and nobody is resending the CAPS event.

https://bugzilla.gnome.org/show_bug.cgi?id=700806
2013-05-27 12:40:50 +02:00
Nicolas Dufresne 5bbc6f1c8c valve: Don't read sticky flag from unrefed event 2013-05-25 22:03:53 -04:00
Tim-Philipp Müller 789b68e506 tee: fix property description for now-unused "alloc-pad" property
Should probably proxy ALLOCATION queries on that though, if set.
But what else? CAPS and ACCEPT_CAPS too?
2013-05-24 23:28:04 +01:00
Tim-Philipp Müller 4d1cb14c68 basetransform: remove 0.10-ism from docs
gst_buffer_pad_alloc() never existed, and gst_pad_alloc_buffer()
doesn't exist any more either, so don't mention it in the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=694714
2013-05-24 23:01:09 +01:00
Sebastian Dröge e692993e79 queue2: Add support for serialized queries if using a memory queue 2013-05-24 19:22:22 +02:00
Sebastian Dröge 46270f8925 queue: Set the last serialized query result to FALSE when flushing 2013-05-24 18:47:24 +02:00
Sebastian Dröge a79d3a0220 multiqueue: Initialize all GstMultiQueueItem fields in both code paths 2013-05-24 18:42:55 +02:00
Sebastian Dröge 1c6341e6a4 multiqueue: Don't access the query after signalling the waiting thread
It might've free'd the query already.
2013-05-24 18:38:40 +02:00
Sebastian Dröge 3b44a44a01 multiqueue: Make sure to always signal any possible pending serialized queries
And don't unref them when flushing the queue, they're owned by the caller!

https://bugzilla.gnome.org/show_bug.cgi?id=700342
2013-05-24 18:30:44 +02:00
Sebastian Dröge 3e515099ec basetransform: Return GST_FLOW_ERROR if the allocator did not allow to allocate a buffer 2013-05-24 14:37:37 +02:00
Olivier Crête bd5708a0cd docs: Remove mention of gconf* elements
Instead recommend pulsesrc/sink for audio, there is nothing GNOME
specific for video.
2013-05-24 16:25:09 +09:00
Sebastian Dröge 1d1946a321 typefind: Handle the force-caps property more similar to all typefinding code flow
This makes sure that events happen in order and simplifies the code a bit.
2013-05-15 13:22:04 +02:00
Sebastian Dröge 516611bc33 check: Fix event handling in gst_check_element_push_buffer_list() 2013-05-15 11:22:25 +02:00
Sebastian Dröge fd482f69a5 Automatic update of common submodule
From 5edcd85 to 098c0d7
2013-05-15 10:51:01 +02:00
Sebastian Dröge 3d44f542ed pad: Only check if we get buffers before stream-start/segment if compiling without G_DISABLE_ASSERT
In releases this is set usually.
2013-05-10 16:03:34 +02:00
Nicolas Dufresne a1866e64c5 check: Add helper that sends initial events
https://bugzilla.gnome.org/show_bug.cgi?id=700033
2013-05-10 09:23:28 +02:00
Sebastian Dröge d500ffc300 pad: Fix uninitialized variable compiler warning 2013-05-09 17:55:21 +02:00
Sebastian Dröge 1b87f0c36a pad: Make sure pending, older sticky events are sent downstream in dynamic linking scenarios
If a pad block was triggered from sending a sticky event downstream, it
could happen that the pad block is relinking pads, which then requires
to resend previous sticky events.
2013-05-09 17:55:21 +02:00
Sebastian Dröge 114f9584d4 tests: Fix event order warnings and dataflow before stream-start/segment event 2013-05-09 13:32:07 +02:00
Sebastian Dröge f38496067d basetransform: Properly port unit test to actually use caps and check results 2013-05-09 13:31:38 +02:00
Sebastian Dröge 8e1f70473b queue: Store sticky events on the srcpad if we're dropping them because of leaking 2013-05-09 12:50:20 +02:00
Sebastian Dröge f93c52684a outputselector: Always forward sticky events to all pads 2013-05-09 12:27:12 +02:00
Sebastian Dröge 1d40478014 inputselector: Forward all sticky events, including stream-start 2013-05-09 12:15:48 +02:00
Sebastian Dröge 8bedcf450f pad: Warn if data flow happens before stream-start or segment event 2013-05-09 11:05:50 +02:00
Sebastian Dröge 430285b5c8 pad: Only let gst_pad_sticky_events_foreach() iterate over existing events 2013-05-09 10:59:41 +02:00
Sebastian Dröge e0f59d22eb pad: If we push sticky events because of another sticky event, only push those that come before the new event
https://bugzilla.gnome.org/show_bug.cgi?id=699937
2013-05-09 10:29:11 +02:00
Sebastian Dröge 172817e332 capsfilter: Add more debug output and forward caps events immediately too 2013-05-09 09:51:13 +02:00
Sebastian Dröge ae47133360 pad: No sticky events must arrive after EOS 2013-05-09 09:51:13 +02:00
Sebastian Dröge e4cbae46cc capsfilter: Fix typo in last commit 2013-05-09 09:38:35 +02:00
Nicolas Dufresne e8a9ffa092 pad: Improve warning message naming events type name
With this patch, message should look like ¨Sticky event misordering, got
'caps' before 'stream-start'¨ making it faster to debug.

https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:30 +02:00
Nicolas Dufresne f6aa4d85c1 pad: Only inforce STREAM_START, CAPS and SEGMENT ordering
Previous patch was inforcing a complete ordering of the sticky events, while
in fact, only STREAM_START, CAPS and SEGMENT events need proper ordering.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:19 +02:00
Sebastian Dröge 98f6b75cd3 capsfilter: Send all events that should happen after CAPS after the CAPS event 2013-05-09 09:32:49 +02:00
Nicolas Dufresne c86f42bc88 capsfilter: Send caps before segment
In the case the source has no caps, caps must be sent before segment. This
fixes few unit tests that where failing due to the new misordering warning.

https://bugzilla.gnome.org/show_bug.cgi?id=699968
2013-05-09 09:14:49 +02:00
Nicolas Dufresne a68e33712e pad: Detect, fix and warn when sticky events are in wrong order
We can prevent buggy element from causing other elements to fail or crash
by sorting sticky event at insertion. In this case, we also warn as this
is not supposed to happen.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-08 13:48:59 +02:00
Tim-Philipp Müller 913b1e6f20 tests: add some basic checks for gst_buffer_fill() 2013-05-08 10:26:15 +01:00
Tim-Philipp Müller 65c2ecb4f3 buffer: allow calling _fill() with a NULL data pointer if size is 0 bytes 2013-05-08 10:25:36 +01:00
Sebastian Dröge 1319196349 basesrc: Add FIXME comment for unused assignment results 2013-05-08 08:52:25 +02:00
Tim-Philipp Müller dc6aabfc55 docs: fix typo in metadata section in app dev manual
There's no g_tag_list_get_xyz().
2013-05-07 15:18:06 +01:00
Sreerenj Balachandran f2bbbdff59 controller: Fix the function signature and a minor typo fix
https://bugzilla.gnome.org/show_bug.cgi?id=699827
2013-05-07 14:53:23 +02:00
Nicolas Dufresne ba354f6b03 typefind: Send stream-start before anything else
To do so, send stream-start when the streaming thread goes up for the first
time.

https://bugzilla.gnome.org/show_bug.cgi?id=699767
2013-05-07 09:17:13 +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