platform/upstream/gstreamer.git
11 years agogst-uninstalled: add new -bad mpegts lib
Tim-Philipp Müller [Wed, 3 Jul 2013 08:27:13 +0000 (09:27 +0100)]
gst-uninstalled: add new -bad mpegts lib

And remove signalprocessor/video libs from -bad which have gone
away or were merged into -base.

11 years agofunnel: Re-push all sticky events when buffers come from a different pad
Olivier Crête [Tue, 2 Jul 2013 00:35:21 +0000 (20:35 -0400)]
funnel: Re-push all sticky events when buffers come from a different pad

Don't special case segment/caps, just push all sticky events when they are
received on the currently active pad or when the active pad changes.

11 years agofunnel: Use default pad function for upstream event/queries
Olivier Crête [Tue, 2 Jul 2013 00:21:10 +0000 (20:21 -0400)]
funnel: Use default pad function for upstream event/queries

The default functions in 1.x already do the right thing

11 years agotests: Remove funnel pad_alloc test
Olivier Crête [Tue, 2 Jul 2013 00:18:58 +0000 (20:18 -0400)]
tests: Remove funnel pad_alloc test

11 years agocheck: Change stream_id parameter name to match GtkDoc
Olivier Crête [Tue, 2 Jul 2013 00:07:03 +0000 (20:07 -0400)]
check: Change stream_id parameter name to match GtkDoc

11 years agocheck: Added gst_check_setup_events_with_stream_id()
Jonas Holmberg [Mon, 1 Jul 2013 09:10:00 +0000 (11:10 +0200)]
check: Added gst_check_setup_events_with_stream_id()

Added a new function gst_check_setup_events_with_stream_id(), since
gst_check_setup_events() does not work with multiple pads.

https://bugzilla.gnome.org/show_bug.cgi?id=703377

11 years agopad: Don't consider flushing pads as needing reconfiguration
Sebastian Dröge [Sun, 30 Jun 2013 16:39:03 +0000 (18:39 +0200)]
pad: Don't consider flushing pads as needing reconfiguration

Renegotiation and reconfiguration will fail because all queries
and events won't be accepted by the pad if it's flushing. In the
best case this just causes unneeded work and spurious warnings in
the debug logs, in the worst case it causes elements to fail completely.

11 years agoqueue2: only block serialized query when it's safe
Wim Taymans [Mon, 24 Jun 2013 21:25:51 +0000 (23:25 +0200)]
queue2: only block serialized query when it's safe

We must be certain that we don't cause a deadlock when blocking the serialized
queries. One such deadlock can happen when we are buffering and downstream is
blocked in preroll and a serialized query arrives. Downstream will not unblock
(and allow our query to execute) until we complete buffering and buffering will
not complete until we can answer the query..

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702840

11 years agopad: Add a filter to the caps_query done by acceptcaps
Sjoerd Simons [Wed, 19 Jun 2013 10:30:47 +0000 (12:30 +0200)]
pad: Add a filter to the caps_query done by acceptcaps

Use the caps that the pad is asked to accept as filter for the query

https://bugzilla.gnome.org/show_bug.cgi?id=702632

11 years agobasetransform: optimize default acceptcaps implementation
Sjoerd Simons [Wed, 19 Jun 2013 10:19:02 +0000 (12:19 +0200)]
basetransform: optimize default acceptcaps implementation

Pass the fixed caps we're asked to accept as a filter for the caps
query, so we don't get a fully-expanded set of caps back (which we don't
need and can take a lot of time for intersection).

This reduces the time for camerabin to produce a second frame on a
logitech C910 camera from around 52 seconds to a bit less then 16
seconds on my system.

https://bugzilla.gnome.org/show_bug.cgi?id=702632

11 years agotaglist: Avoid combinatorial explosion when merging tags
Edward Hervey [Wed, 19 Jun 2013 07:19:53 +0000 (09:19 +0200)]
taglist: Avoid combinatorial explosion when merging tags

When appending/prepending tags, avoid re-creating (and copying) lists if we already
have one and instead just append/prepend the GValue to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=702545

11 years agoqueue: Don't hold the queue mutex while doing serialized queries downstream
Sebastian Dröge [Wed, 19 Jun 2013 08:53:21 +0000 (10:53 +0200)]
queue: Don't hold the queue mutex while doing serialized queries downstream

https://bugzilla.gnome.org/show_bug.cgi?id=702520

11 years agobuffer: Add unit test for map_range()
Sebastian Dröge [Wed, 19 Jun 2013 08:45:45 +0000 (10:45 +0200)]
buffer: Add unit test for map_range()

https://bugzilla.gnome.org/show_bug.cgi?id=702617

11 years agobuffer: Fix wrong size/index handling when merging memory
Paul HENRYS [Wed, 19 Jun 2013 06:36:22 +0000 (08:36 +0200)]
buffer: Fix wrong size/index handling when merging memory

https://bugzilla.gnome.org/show_bug.cgi?id=702617

11 years agodocs: add missing file for doc-link check
Stefan Sauer [Tue, 18 Jun 2013 09:39:55 +0000 (11:39 +0200)]
docs: add missing file for doc-link check

11 years agotests: add stress test for buffers and pools
Wim Taymans [Mon, 17 Jun 2013 09:12:51 +0000 (11:12 +0200)]
tests: add stress test for buffers and pools

11 years agobasesink: call state change in all cases
Wim Taymans [Mon, 17 Jun 2013 08:25:20 +0000 (10:25 +0200)]
basesink: call state change in all cases

When we asynchronously go from READY to PLAYING, also call the
state change function so that subclasses can update their state for PLAYING.
Because the PREROLL lock is not recursive, we can't make this without
races and we must assume for now that the subclass can handle concurrent calls
to PAUSED->PLAYING and PLAYING->PAUSED. We can make this assumption because not
many elements actually do something in those state changes and the ones that
did would be broken even more without this change.

https://bugzilla.gnome.org/show_bug.cgi?id=702282

11 years agodocs: fix some external links
Stefan Sauer [Sun, 16 Jun 2013 13:07:35 +0000 (15:07 +0200)]
docs: fix some external links

11 years agodocs: check for broken links in docs
Stefan Sauer [Sun, 16 Jun 2013 12:45:08 +0000 (14:45 +0200)]
docs: check for broken links in docs

The check is done using curl (if available). It lists the curl exit code + http
status code (for those > 399) together with the use of the url in the code. The
check is not fatal.

11 years agodocs: change https to http urls
Stefan Sauer [Sun, 16 Jun 2013 11:05:21 +0000 (13:05 +0200)]
docs: change https to http urls

Thank you browser for needlessly changing to https for static doc pages.

11 years agodocs: update links to developer.gnome.org
Stefan Sauer [Sun, 16 Jun 2013 09:41:52 +0000 (11:41 +0200)]
docs: update links to developer.gnome.org

The URL layout has changed. Fix the links and comment out one paragraph where
the doc is gone.
Fixes #702135

11 years agostructure: Add gst_structure_new_from_string()
Sebastian Dröge [Fri, 14 Jun 2013 11:05:38 +0000 (13:05 +0200)]
structure: Add gst_structure_new_from_string()

Convenience API for bindings, gst_structure_from_string() returns
a tuple (structure, end_ptr) in bindings and is unintuitive to use
because of that.

11 years agogst: Don't intercept --help in gst_init()
Hans de Goede [Thu, 13 Jun 2013 06:36:23 +0000 (08:36 +0200)]
gst: Don't intercept --help in gst_init()

Before this patch gst_init would intercept --help, causing for example
cheese's --help to look like this:

[hans@shalem cheese]$ cheese --help
Usage:
  cheese [OPTION...] - GStreamer initialization

Help Options:
  -h, --help                        Show help options
  --help-all                        Show all help options
  --help-gst                        Show GStreamer Options

gst_init is the only gfoo_init function which does this.

https://bugzilla.gnome.org/show_bug.cgi?id=702089

11 years agogst-uninstalled: add uridownloader lib in -bad to search paths
Tim-Philipp Müller [Wed, 12 Jun 2013 08:45:56 +0000 (09:45 +0100)]
gst-uninstalled: add uridownloader lib in -bad to search paths

Even if it might not be around for long.

11 years agogst-launch: Remove unref that should not be there
Sebastian Dröge [Tue, 11 Jun 2013 08:25:02 +0000 (10:25 +0200)]
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

11 years agogst-launch: Improve GstContext handling
Sebastian Dröge [Sun, 9 Jun 2013 15:20:22 +0000 (17:20 +0200)]
gst-launch: Improve GstContext handling

https://bugzilla.gnome.org/show_bug.cgi?id=700967

11 years agowin32: Don't include gstcollectpads.c twice
Kim Lam [Fri, 7 Jun 2013 11:07:37 +0000 (13:07 +0200)]
win32: Don't include gstcollectpads.c twice

https://bugzilla.gnome.org/show_bug.cgi?id=701603

11 years agoinput-selector: send notify::active signal for input-selector pads.
Brendan Long [Fri, 31 May 2013 15:39:55 +0000 (09:39 -0600)]
input-selector: send notify::active signal for input-selector pads.

https://bugzilla.gnome.org/show_bug.cgi?id=701319

11 years agobasesrc: Only force-update the duration for dynamic sources when doing the DURATION...
Sebastian Dröge [Thu, 6 Jun 2013 14:46:12 +0000 (16:46 +0200)]
basesrc: Only force-update the duration for dynamic sources when doing the DURATION query

Doing it after every single create() is not very efficient and not necessary.
Especially on network file systems fstat() is not cached and causes network
traffic, making the source possibly unusable slow.

https://bugzilla.gnome.org/show_bug.cgi?id=652037

11 years agoBack to development
Sebastian Dröge [Wed, 5 Jun 2013 16:36:40 +0000 (18:36 +0200)]
Back to development

11 years agoRelease 1.1.1 1.1.1
Sebastian Dröge [Wed, 5 Jun 2013 15:58:51 +0000 (17:58 +0200)]
Release 1.1.1

11 years agoUpdate .po files
Sebastian Dröge [Wed, 5 Jun 2013 14:06:35 +0000 (16:06 +0200)]
Update .po files

11 years agoAutomatic update of common submodule
Sebastian Dröge [Wed, 5 Jun 2013 13:14:14 +0000 (15:14 +0200)]
Automatic update of common submodule

From 098c0d7 to 01a7a46

11 years agogstvalue: Add _append_and_take_value() public variants
Edward Hervey [Wed, 5 Jun 2013 09:02:50 +0000 (11:02 +0200)]
gstvalue: Add _append_and_take_value() public variants

API: gst_value_array_append_and_take_value
API: gst_value_list_append_and_take_value

We were already using this internally, this makes it public for code
which frequently appends values which are expensive to copy (like
structures, arrays, caps, ...).

Avoids copies of the values for users. The passed GValue will also
be 0-memset'ed for re-use.

New users can replace this kind of code:
gst_value_*_append_value(mycontainer, &myvalue);
g_value_unset(&myvalue);

by:

gst_value_*_append_and_take_value(mycontainer, &myvalue);

https://bugzilla.gnome.org/show_bug.cgi?id=701632

11 years agogstbuffer: Use internal function for buffer_new_wrapped
Edward Hervey [Wed, 29 May 2013 15:20:34 +0000 (17:20 +0200)]
gstbuffer: Use internal function for buffer_new_wrapped

Shaves ~10% instruction calls from the total cost

https://bugzilla.gnome.org/show_bug.cgi?id=701633

11 years agoinput-selector: return FALSE for "active" property if selector is NULL
Brendan Long [Fri, 31 May 2013 04:57:49 +0000 (22:57 -0600)]
input-selector: return FALSE for "active" property if selector is NULL

https://bugzilla.gnome.org/show_bug.cgi?id=701323

11 years agomanual: update elements to match the rest of "Boost priority of a thread" section
Andrzej Bieniek [Sat, 1 Jun 2013 13:00:22 +0000 (14:00 +0100)]
manual: update elements to match the rest of "Boost priority of a thread" section

11 years agomanual: fix comment in effectswitch example
Andrzej Bieniek [Sat, 1 Jun 2013 12:55:50 +0000 (13:55 +0100)]
manual: fix comment in effectswitch example

11 years agomanual: fix a typo in "Inserting data with appsrc" section
Andrzej Bieniek [Sat, 1 Jun 2013 12:49:18 +0000 (13:49 +0100)]
manual: fix a typo in "Inserting data with appsrc" section

11 years agopwg: fix a few typos
Andrzej Bieniek [Sat, 1 Jun 2013 12:22:22 +0000 (13:22 +0100)]
pwg: fix a few typos

11 years agodocs: remove double "the"
Andrzej Bieniek [Fri, 31 May 2013 22:37:07 +0000 (23:37 +0100)]
docs: remove double "the"

11 years agoscripts: improve git-update.sh status message
Krzysztof Konopko [Tue, 28 May 2013 22:34:54 +0000 (23:34 +0100)]
scripts: improve git-update.sh status message

By default when the script is about to exit (normally or due to an error),
it checks whether $ERROR_LOG file exists.  If the log file exists, the
script prints a "Failures: " message prefix and dumps the log file to the
output.

Apparently the log file is always created and if the update/build is
successful, the script finishes with a bit misleading "Failures: " message.

An improvement provided with this change lets the log file to be created as
needed, i.e. if there's an error message to be printed.  If the file
doesn't exists, the script prints a "Update done" message which clearly
indicates success.

https://bugzilla.gnome.org/show_bug.cgi?id=701177

11 years agocheck: fix position unit test
Wim Taymans [Thu, 30 May 2013 05:03:40 +0000 (07:03 +0200)]
check: fix position unit test

11 years agobasesink: improve position reporting without clock
Wim Taymans [Thu, 30 May 2013 04:51:24 +0000 (06:51 +0200)]
basesink: improve position reporting without clock

When no base time or when sync is disabled, use the same logic as
in paused to report position. The logic in PLAYING assumes we use the
clock.

11 years agopad: Fix memory leak in the unit test
Sebastian Dröge [Wed, 29 May 2013 09:36:38 +0000 (11:36 +0200)]
pad: Fix memory leak in the unit test

11 years agoelementfactory: Add support for checking subtitle/metadata factory types
Sebastian Dröge [Tue, 28 May 2013 10:44:19 +0000 (12:44 +0200)]
elementfactory: Add support for checking subtitle/metadata factory types

11 years agoelementfactory: Add support for checking only the media type of a factory
Sebastian Dröge [Tue, 28 May 2013 10:41:27 +0000 (12:41 +0200)]
elementfactory: Add support for checking only the media type of a factory

And while at it also add Metadata and Subtitle media types.

11 years ago(multi)queue: Don't access query items during flushing
Sebastian Dröge [Mon, 27 May 2013 14:38:18 +0000 (16:38 +0200)]
(multi)queue: Don't access query items during flushing

11 years agomultiqueue: Don't do serialized queries when we're flushing
Sebastian Dröge [Mon, 27 May 2013 14:22:00 +0000 (16:22 +0200)]
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.

11 years agoqueue2: First set query result, then signal GCond
Sebastian Dröge [Mon, 27 May 2013 14:08:39 +0000 (16:08 +0200)]
queue2: First set query result, then signal GCond

11 years agoqueue: Fix handling of serialized queries
Sebastian Dröge [Mon, 27 May 2013 13:59:07 +0000 (15:59 +0200)]
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!).

11 years agoqueue2: Unblock any waiting serialize queries on FLUSH_START
Sebastian Dröge [Mon, 27 May 2013 13:41:14 +0000 (15:41 +0200)]
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.

11 years agoqueue/queue2/multiqueue: When flushing, make sure to not lose any sticky events
Sebastian Dröge [Mon, 27 May 2013 11:01:43 +0000 (13:01 +0200)]
queue/queue2/multiqueue: When flushing, make sure to not lose any sticky events

https://bugzilla.gnome.org/show_bug.cgi?id=688824

11 years agopad: Store sticky events even if the pad is flushing
Sebastian Dröge [Mon, 27 May 2013 10:40:50 +0000 (12:40 +0200)]
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

11 years agovalve: Don't read sticky flag from unrefed event
Nicolas Dufresne [Sun, 26 May 2013 02:03:53 +0000 (22:03 -0400)]
valve: Don't read sticky flag from unrefed event

11 years agotee: fix property description for now-unused "alloc-pad" property
Tim-Philipp Müller [Fri, 24 May 2013 22:28:04 +0000 (23:28 +0100)]
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?

11 years agobasetransform: remove 0.10-ism from docs
Tim-Philipp Müller [Fri, 24 May 2013 22:01:09 +0000 (23:01 +0100)]
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

11 years agoqueue2: Add support for serialized queries if using a memory queue
Sebastian Dröge [Fri, 24 May 2013 17:22:22 +0000 (19:22 +0200)]
queue2: Add support for serialized queries if using a memory queue

11 years agoqueue: Set the last serialized query result to FALSE when flushing
Sebastian Dröge [Fri, 24 May 2013 16:47:24 +0000 (18:47 +0200)]
queue: Set the last serialized query result to FALSE when flushing

11 years agomultiqueue: Initialize all GstMultiQueueItem fields in both code paths
Sebastian Dröge [Fri, 24 May 2013 16:42:55 +0000 (18:42 +0200)]
multiqueue: Initialize all GstMultiQueueItem fields in both code paths

11 years agomultiqueue: Don't access the query after signalling the waiting thread
Sebastian Dröge [Fri, 24 May 2013 16:38:40 +0000 (18:38 +0200)]
multiqueue: Don't access the query after signalling the waiting thread

It might've free'd the query already.

11 years agomultiqueue: Make sure to always signal any possible pending serialized queries
Sebastian Dröge [Fri, 24 May 2013 16:30:44 +0000 (18:30 +0200)]
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

11 years agobasetransform: Return GST_FLOW_ERROR if the allocator did not allow to allocate a...
Sebastian Dröge [Fri, 24 May 2013 12:37:19 +0000 (14:37 +0200)]
basetransform: Return GST_FLOW_ERROR if the allocator did not allow to allocate a buffer

11 years agodocs: Remove mention of gconf* elements
Olivier Crête [Fri, 24 May 2013 07:24:10 +0000 (16:24 +0900)]
docs: Remove mention of gconf* elements

Instead recommend pulsesrc/sink for audio, there is nothing GNOME
specific for video.

11 years agotypefind: Handle the force-caps property more similar to all typefinding code flow
Sebastian Dröge [Wed, 15 May 2013 11:22:04 +0000 (13:22 +0200)]
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.

11 years agocheck: Fix event handling in gst_check_element_push_buffer_list()
Sebastian Dröge [Wed, 15 May 2013 09:21:46 +0000 (11:21 +0200)]
check: Fix event handling in gst_check_element_push_buffer_list()

11 years agoAutomatic update of common submodule
Sebastian Dröge [Wed, 15 May 2013 08:51:01 +0000 (10:51 +0200)]
Automatic update of common submodule

From 5edcd85 to 098c0d7

11 years agopad: Only check if we get buffers before stream-start/segment if compiling without...
Sebastian Dröge [Fri, 10 May 2013 14:03:34 +0000 (16:03 +0200)]
pad: Only check if we get buffers before stream-start/segment if compiling without G_DISABLE_ASSERT

In releases this is set usually.

11 years agocheck: Add helper that sends initial events
Nicolas Dufresne [Thu, 9 May 2013 21:17:14 +0000 (17:17 -0400)]
check: Add helper that sends initial events

https://bugzilla.gnome.org/show_bug.cgi?id=700033

11 years agopad: Fix uninitialized variable compiler warning
Sebastian Dröge [Thu, 9 May 2013 15:22:16 +0000 (17:22 +0200)]
pad: Fix uninitialized variable compiler warning

11 years agopad: Make sure pending, older sticky events are sent downstream in dynamic linking...
Sebastian Dröge [Thu, 9 May 2013 15:21:13 +0000 (17:21 +0200)]
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.

11 years agotests: Fix event order warnings and dataflow before stream-start/segment event
Sebastian Dröge [Thu, 9 May 2013 11:32:07 +0000 (13:32 +0200)]
tests: Fix event order warnings and dataflow before stream-start/segment event

11 years agobasetransform: Properly port unit test to actually use caps and check results
Sebastian Dröge [Thu, 9 May 2013 11:31:38 +0000 (13:31 +0200)]
basetransform: Properly port unit test to actually use caps and check results

11 years agoqueue: Store sticky events on the srcpad if we're dropping them because of leaking
Sebastian Dröge [Thu, 9 May 2013 10:50:20 +0000 (12:50 +0200)]
queue: Store sticky events on the srcpad if we're dropping them because of leaking

11 years agooutputselector: Always forward sticky events to all pads
Sebastian Dröge [Thu, 9 May 2013 10:27:12 +0000 (12:27 +0200)]
outputselector: Always forward sticky events to all pads

11 years agoinputselector: Forward all sticky events, including stream-start
Sebastian Dröge [Thu, 9 May 2013 10:15:48 +0000 (12:15 +0200)]
inputselector: Forward all sticky events, including stream-start

11 years agopad: Warn if data flow happens before stream-start or segment event
Sebastian Dröge [Thu, 9 May 2013 09:05:50 +0000 (11:05 +0200)]
pad: Warn if data flow happens before stream-start or segment event

11 years agopad: Only let gst_pad_sticky_events_foreach() iterate over existing events
Sebastian Dröge [Thu, 9 May 2013 08:59:41 +0000 (10:59 +0200)]
pad: Only let gst_pad_sticky_events_foreach() iterate over existing events

11 years agopad: If we push sticky events because of another sticky event, only push those that...
Sebastian Dröge [Thu, 9 May 2013 08:29:11 +0000 (10:29 +0200)]
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

11 years agocapsfilter: Add more debug output and forward caps events immediately too
Sebastian Dröge [Thu, 9 May 2013 07:50:41 +0000 (09:50 +0200)]
capsfilter: Add more debug output and forward caps events immediately too

11 years agopad: No sticky events must arrive after EOS
Sebastian Dröge [Thu, 9 May 2013 07:42:33 +0000 (09:42 +0200)]
pad: No sticky events must arrive after EOS

11 years agocapsfilter: Fix typo in last commit
Sebastian Dröge [Thu, 9 May 2013 07:38:35 +0000 (09:38 +0200)]
capsfilter: Fix typo in last commit

11 years agopad: Improve warning message naming events type name
Nicolas Dufresne [Wed, 8 May 2013 23:44:09 +0000 (19:44 -0400)]
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

11 years agopad: Only inforce STREAM_START, CAPS and SEGMENT ordering
Nicolas Dufresne [Wed, 8 May 2013 22:19:48 +0000 (18:19 -0400)]
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

11 years agocapsfilter: Send all events that should happen after CAPS after the CAPS event
Sebastian Dröge [Thu, 9 May 2013 07:32:49 +0000 (09:32 +0200)]
capsfilter: Send all events that should happen after CAPS after the CAPS event

11 years agocapsfilter: Send caps before segment
Nicolas Dufresne [Thu, 9 May 2013 01:45:08 +0000 (21:45 -0400)]
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

11 years agopad: Detect, fix and warn when sticky events are in wrong order
Nicolas Dufresne [Wed, 8 May 2013 01:53:37 +0000 (21:53 -0400)]
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

11 years agotests: add some basic checks for gst_buffer_fill()
Tim-Philipp Müller [Wed, 8 May 2013 09:26:15 +0000 (10:26 +0100)]
tests: add some basic checks for gst_buffer_fill()

11 years agobuffer: allow calling _fill() with a NULL data pointer if size is 0 bytes
Tim-Philipp Müller [Wed, 8 May 2013 09:25:36 +0000 (10:25 +0100)]
buffer: allow calling _fill() with a NULL data pointer if size is 0 bytes

11 years agobasesrc: Add FIXME comment for unused assignment results
Sebastian Dröge [Tue, 7 May 2013 14:46:32 +0000 (16:46 +0200)]
basesrc: Add FIXME comment for unused assignment results

11 years agodocs: fix typo in metadata section in app dev manual
Tim-Philipp Müller [Tue, 7 May 2013 14:18:06 +0000 (15:18 +0100)]
docs: fix typo in metadata section in app dev manual

There's no g_tag_list_get_xyz().

11 years agocontroller: Fix the function signature and a minor typo fix
Sreerenj Balachandran [Tue, 7 May 2013 11:47:09 +0000 (14:47 +0300)]
controller: Fix the function signature and a minor typo fix

https://bugzilla.gnome.org/show_bug.cgi?id=699827

11 years agotypefind: Send stream-start before anything else
Nicolas Dufresne [Mon, 6 May 2013 22:47:44 +0000 (18:47 -0400)]
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

11 years agotools/gstreamer-completion: Allow 1.0 and 0.10 scripts installed simultaneously
David Rothlisberger [Wed, 26 Dec 2012 11:54:51 +0000 (11:54 +0000)]
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: #690515
† https://github.com/drothlis/gstreamer/blob/bash-completion-0.10/tools/gstreamer-completion-0.10

11 years agotools/gstreamer-completion: Complete option & property values on bash 3.2
David Rothlisberger [Fri, 21 Dec 2012 18:13:53 +0000 (18:13 +0000)]
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

11 years agotools/gstreamer-completion: Bash 3.2 compatibility fixes
David Rothlisberger [Fri, 21 Dec 2012 08:56:26 +0000 (08:56 +0000)]
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.

11 years agotools/gstreamer-completion: Support gst-inspect, and gst-launch element properties
David Rothlisberger [Wed, 19 Dec 2012 10:46:50 +0000 (10:46 +0000)]
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

11 years agotools/gstreamer-completion: Updated to work with the binary registry
David Rothlisberger [Tue, 13 Nov 2012 16:36:46 +0000 (16:36 +0000)]
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."

11 years agoporting-to-1.0.txt: nit clarification
Stefan Sauer [Mon, 29 Apr 2013 19:11:36 +0000 (21:11 +0200)]
porting-to-1.0.txt: nit clarification

It is the process context that matters.

11 years agotypefind: Always leave TYPEFIND mode when we're stopping typefinding
Sebastian Dröge [Mon, 29 Apr 2013 11:20:11 +0000 (13:20 +0200)]
typefind: Always leave TYPEFIND mode when we're stopping typefinding