Commit graph

3769 commits

Author SHA1 Message Date
Sebastian Dröge
eb09e561c4 videoconvert: Fix leaking of the chroma resample helper objects 2013-06-11 15:24:05 +02:00
Sebastian Dröge
15375861b5 adder: Reject segments that have a different rate than the output segment
adder does no rate conversion.
2013-06-09 19:20:20 +02:00
Sebastian Dröge
4465741222 playbin: When activating a fixed sink, proxy error messages too
If activating a fixed sink fails, everything will fail later anyway
and we can just error out early.
2013-06-08 23:51:13 +02:00
Sebastian Dröge
44352deadb playbin: Improve autoplugging of decoder/sink combinations by trying to activate the sink
And if that fails don't bother autoplugging that sink. Also gives
us more accurate sink caps.
2013-06-08 23:34:53 +02:00
Sebastian Dröge
ff8839d97b playbin: Proxy the playbin context to the sinks 2013-06-08 23:22:54 +02:00
Sebastian Dröge
77af24c493 playbin: Proxy sink messages if we activate a sink in playbin already
This makes sure the application gets any context related messages and
can do whatever is required to a) get the sink a context or b) share
the context with other elements in the pipeline.

The proxying is necessary because the sink is not a child element of
playbin, but instead will at a later point be a child of some bin
inside playsink.

https://bugzilla.gnome.org/show_bug.cgi?id=700967
2013-06-08 23:22:54 +02:00
Sebastian Dröge
c49531f1b7 decodebin: Let serialize queries before caps events through
Otherwise we're going to deadlock forever because no autoplugging
happens without having caps, but caps can never be send because
we're blocking.

Serialized queries before caps should never be sent unless really
necessary.
2013-06-06 15:57:49 +02:00
Sebastian Dröge
ff5d3313d4 Release 1.1.1 2013-06-05 18:31:27 +02:00
Sebastian Dröge
cc5a476fc6 adder: Add GstChildProxy interface for the sinkpads
This allows to set the sinkpad properties more easily.

Next step: Implement proper synchronization in adder, almost done!
2013-05-30 23:56:52 +02:00
Sebastian Dröge
349174b48e adder: Hold object lock in setcaps a bit longer to prevent race conditions 2013-05-30 23:56:52 +02:00
Sebastian Dröge
dde8d8919d adder: Simplify segment event handling
We don't care about upstream segments but generate our own. This
makes the code more similar to videomixer again.
2013-05-30 23:56:52 +02:00
Sebastian Dröge
2953810ba5 adder: Use gst_audio_info_is_equal() to check if we get the same caps 2013-05-30 23:56:52 +02:00
Sebastian Dröge
0693b78e86 adder: Don't calls gst_pad_set_caps() on sinkpads
It doesn't make much sense and the CAPS query handling
on the sinkpads should handle this.
2013-05-30 23:56:52 +02:00
Sebastian Dröge
5e63a0f674 adder: Set GAP flag on silence buffers we created 2013-05-30 23:56:52 +02:00
Sebastian Dröge
667b856cbc adder: Remove caching of the processing function
The compiler will generate a hashtable from the switch-case, and
we need to call functions explicitely for the volume!=1.0 cases
anyway.
2013-05-30 23:56:52 +02:00
Sebastian Dröge
a76ade2d78 adder: Add support for per-stream volumes 2013-05-30 23:56:52 +02:00
Sebastian Dröge
addb07bc58 adder: Add optimized orc code for F64 processing 2013-05-30 23:56:52 +02:00
Sebastian Dröge
308c8fef68 adder: The output buffer must be readable and writable 2013-05-30 23:56:51 +02:00
Sebastian Dröge
509246cbac adder: Add support for muting individual pads 2013-05-30 23:56:51 +02:00
Sebastian Dröge
3974379a7f adder: Sync pad properties with the GstController 2013-05-30 23:56:51 +02:00
Sebastian Dröge
561ce54b27 adder: Add custom GstPad subclass to hold additional data and properties
This will later allow to set per-stream volumes and mute status.
2013-05-30 23:56:51 +02:00
Wim Taymans
00bbca2f9f videoconvert: free tmplines correctly
Keep track of how many tmplines we allocated and use that to free the
correct amount of lines.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701234
2013-05-30 05:27:31 +02:00
Daniel Drake
d32d2f0b14 playsink: pass translated color balance value to channel
We found a case where untranslated values were being passed from the
proxy to the underlying channel, causing bad color balance values
in some setups.

Thanks to Sebastian Dröge for clarifying how the code works, and
suggesting the fix.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701202
2013-05-29 20:20:10 +02:00
Brendan Long
96aab6d8a5 playbin: Don't take an extra reference to the custom stream combiners
They are automatically reffed when added to the bin because they're
already not floating anymore.
2013-05-29 20:12:48 +02:00
Sebastian Dröge
0dee7777ff playbin: Set custom stream-combiners to NULL and unref before finalizing 2013-05-29 10:35:11 +02:00
Brendan Long
53caa99a59 playbin: Rename select to combine and selector to combiner in playbin 2013-05-29 09:53:34 +02:00
Brendan Long
ba5f6cfe72 playbin: Add support for custom stream-combiners
This allows to chose something else than input-selector
for multiple audio/video/text streams, e.g. an adder could
be used for audio.

It is needed for example to implement some of the more
advanced HTML5 video features.

https://bugzilla.gnome.org/show_bug.cgi?id=698851
2013-05-29 09:52:32 +02:00
Sebastian Dröge
14192c031a decodebin: Don't call autoplug-query on shutdown
And remove leftover debug code
2013-05-28 13:32:23 +02:00
Sebastian Dröge
e482b5b8e6 playbin: In autoplug-queries, add the actual decoder/parser/etc template caps
Add the actual decoder/parser/etc caps at the very end to
make sure we don't cause empty caps to be returned, e.g.
if a parser asks us but a decoder is required after it
because no sink can handle the format directly.
2013-05-28 13:23:40 +02:00
Sebastian Dröge
a4ec6fe0b7 playbin: Forward CONTEXT queries to the corresponding sink if we have one
https://bugzilla.gnome.org/show_bug.cgi?id=700967
2013-05-28 13:14:15 +02:00
Sebastian Dröge
e5064ee723 playbin: Refactor autoplug-query handling
We now only check sinks and factories of the corresponding media
type. It doesn't make sense to pass audio/subtitle caps to a video
decoder.
2013-05-28 13:08:00 +02:00
Sebastian Dröge
d366613401 decodebin: Block on serialized queries too
Otherwise we will only block after the serialized, non-sticky event
after the CAPS event or the first buffer. If we're waiting for another
pad to finish autoplugging after we got final caps on this pad, it
will mean that we will let the ALLOCATION query pass although the
pad is not exposed yet.
2013-05-28 13:06:15 +02:00
Sebastian Dröge
9513b770f4 decodebin: Pass the element in the autoplug-query signal too 2013-05-28 12:10:33 +02:00
Sebastian Dröge
730e633d58 decodebin: Need to lock the chain mutex in autoplug_query 2013-05-28 11:40:51 +02:00
Sebastian Dröge
b86267b5be playsinkconvertbin: Fix leak of the downstream caps filter 2013-05-28 11:36:58 +02:00
Sebastian Dröge
db8d53bc17 playbin: Refactor autoplug-query handling a bit 2013-05-28 11:05:21 +02:00
Wim Taymans
7b8ff707b6 videoconvert: run chroma resamplers
Run the chroma upsampler after unpack and the chroma subsampler
before pack for higher quality conversions and correct chroma siting.
2013-05-27 11:05:08 +02:00
Wim Taymans
e5bc2b0d05 videotestsrc: subsample chroma before packing
Run the chroma subsampler before packing.
2013-05-27 11:05:08 +02:00
Wim Taymans
4f2e1b46a7 videoconvert: reformat 2013-05-27 11:05:06 +02:00
Wim Taymans
620e3aad07 videoconvert: actually use the input pixels
Operate on the provided pixels array instead of the temp array.
2013-05-27 11:05:06 +02:00
Sebastian Dröge
92af499eb7 typefind: Ensure we have enough data when reading the sync marker in the AAC/LOAS typefinder 2013-05-24 17:43:53 +02:00
Sebastian Dröge
fa7ad8743c decodebin: Lock the state of child elements as long as we manage their states
https://bugzilla.gnome.org/show_bug.cgi?id=690420
2013-05-24 13:41:46 +02:00
Sebastian Dröge
be4dba23ea Revert "decodebin2: use NO_RESYNC flag"
This reverts commit 0feecef275.
2013-05-24 11:47:13 +02:00
Sebastian Dröge
ca1279e4a3 decodebin: Use signal handler IDs instead of disconnecting by function
This is cleaner and faster.
2013-05-22 17:29:17 +02:00
Sebastian Dröge
504e57ccc5 decodebin: Connect and disconnect the have-type signal of typefind before starting/shutting down 2013-05-22 13:49:18 +02:00
Sebastian Dröge
f4952a9baf typefind: Add variant=itu to the h263 typefinder caps
https://bugzilla.gnome.org/show_bug.cgi?id=700770
2013-05-22 10:58:10 +02:00
Sebastian Dröge
1756f86042 playsink: Use signal handler IDs instead of disconnecting/blocking by function
This is cleaner and faster.
2013-05-21 16:35:18 +02:00
Sebastian Dröge
d802c7395a playback: Only do a subset filtering for the factories if we have fixed caps
Otherwise we're plugging a parser/converter currently and have unfixed caps.
2013-05-15 17:15:18 +02:00
Sebastian Dröge
062246fc6e decodebin: Return immediately from checking if a chain is complete if we're shutting down 2013-05-15 14:51:16 +02:00
Sebastian Dröge
83f2476976 decodebin: Hold the expose lock when freeing a chain
https://bugzilla.gnome.org/show_bug.cgi?id=700342
2013-05-15 14:47:53 +02:00
Sebastian Dröge
74a31a02fc playbin: Fix deadlock caused by lock order inversion
First the source group lock, then the elements list lock.
2013-05-15 13:38:32 +02:00
Sebastian Dröge
450a47c0a5 playback: Use subset checks instead of intersection
https://bugzilla.gnome.org/show_bug.cgi?id=700272
2013-05-14 10:07:44 +02:00
Sebastian Dröge
b19d64d785 subparse/ssaparse: Fix event handling and order 2013-05-10 12:21:31 +02:00
Mathieu Duponchelle
aec0e48aa1 videorate: Reset base timestamp and out_frame_count in any case on SEGMENT_EVENT
Fixes #699187
2013-05-09 16:22:13 +02:00
Sebastian Dröge
b0ec886cb9 playbin2: Chose more balanced metric to compare ranks of decoder/sink combinations 2013-05-09 15:05:21 +02:00
Sebastian Dröge
b23f4e4ab9 playbin: Fix infinite loop in GSequence iteration code 2013-05-08 21:27:17 +02:00
Sebastian Dröge
4c52518ef5 uridecodebin: Always store queue2 elements for later removal
Otherwise we accumulate more and more queue2 elements, and let each
of them start a thread doing nothing but waiting each time uridecodebin
goes to PAUSED.

https://bugzilla.gnome.org/show_bug.cgi?id=699794
2013-05-08 14:52:18 +02:00
Andoni Morales Alastruey
3ad2dec005 typefind: fix detection of HLS playlists with alternative renditions
https://bugzilla.gnome.org/show_bug.cgi?id=699923
2013-05-08 13:23:52 +02:00
Sebastian Dröge
7ff4f8f4d4 playbin: Use the GSequence more efficiently
This makes it possible to take advantage of the O(log n) lookups
of GSequence on the ~1000 element lists and only do iterations
on <10 element lists. Previously the code iterated over ~1000 element
lists multiple times.
2013-05-07 15:23:05 +02:00
Sreerenj Balachandran
52c5115ff0 playbin: Use GSequence instead of GList to store the GstAVElement list.
The GstAVElement list might be big. Use GSequence to optimize it.
2013-05-07 15:23:05 +02:00
Sreerenj Balachandran
a8d1b45491 playbin: autoplug the audio/video decoders and sinks based on capsfeatures.
Autoplug the decoder elements and sink elements based on
the number of common capsfeatures if the ranks are the same.
This will also helps to autoplug the h/w_decoder and h/w_renderer.

https://bugzilla.gnome.org/show_bug.cgi?id=698712
2013-05-07 15:23:05 +02:00
Sebastian Dröge
b719dd9f89 decodebin: Expose pads when they receive EOS before any buffers
Stops decodebin from waiting forever to expose a pad if there
is never data on it.

https://bugzilla.gnome.org/show_bug.cgi?id=691072
2013-05-06 15:49:00 +02:00
Thibault Saunier
b940cba826 streamsplitter: Keep srcpad alive while querying peer 2013-05-02 12:29:48 +01:00
Thibault Saunier
372eddf00e adder: Get collectpad stream lock when fowarding flush events
Fixes #698410
2013-05-02 12:29:48 +01:00
Tim-Philipp Müller
04a70ea835 typefindfunctions: minor SSA typefinder clean-up
Remove code that doesn't make sense as it is. If there's
a 2-byte UTF-16 BOM or a 4-byte UTF-32 BOM, the following
text won't be 8-bit ASCII.
2013-04-28 18:56:28 +01:00
Sebastian Dröge
7f6e1bdfdb tcp: Use the generic marshaller instead of generating custom ones 2013-04-25 09:20:29 +02:00
Sebastian Dröge
e06cc5295a tcp: Add FIXME comment for 2.0 to rename "host" to "bind-address" for the server elements 2013-04-25 09:06:33 +02:00
Sebastian Dröge
9c5c0ca878 streamsynchronizer: Fix check for belonging to another stream
https://bugzilla.gnome.org/show_bug.cgi?id=697820
2013-04-24 11:11:41 +02:00
Tim-Philipp Müller
88acbd60cd typefindfunctions: fix crash in new MSS typefinder
Fixes icydemux test_first_buf_offset_when_merged_for_typefinding
unit test segfaulting on a NULL pointer.
2013-04-24 00:08:15 +01:00
Wim Taymans
c5840ebbd9 decodebin2: also remove the bytes limit
Remove the byte limit for adaptive http streaming. Because some fragments might
be very big, we might need a lot of buffering. I also suspect another problem
where data is actually missing and things go out of sync somehow.
2013-04-23 11:20:28 -03:00
Wim Taymans
26c5bc1ce4 decodebin2: update buffer size in multiqueue
When we disable buffering in the more upstream multiqueue elements,
we need to also update the queue limits. In particular, the max_size_time should
be set to 0 or else we might simply deadlock.
2013-04-23 11:20:28 -03:00
Thiago Santos
5cd07bd2af decodebin2: only allow 'lower' multiqueues to emit buffering messages
When we have a scenario of demuxers linked to demuxers, decodebin2
will create multiqueue at different levels of the pipeline. The problem
is that only the lowest multiqueue's should do the buffering messaging,
as they will handle with the raw streams data.

When all multiqueues are doing buffering, the upper ones can handle
large buffers that easily fill them, moving from 0% to 100% from
buffer to buffer, causing too much buffering messages to be posted.
This hangs the pipeline unnecessarily and might lead to deadlocks.
2013-04-23 11:20:28 -03:00
Thiago Santos
6382d4c0ad decodebin2: do not handle the next-groups list as if it was a single item
Decodebin2's chains store a next_groups list that was being handled as
it could only have a single element. This is true for most of the
chaining streams scenarios where streams change not very often.

In more stressfull changing scenarios, like adaptive streams, those
changes can happen very often, and in short time intervals. This could
confuse decodebin2 as this list was always being used as a single
element list.

This patches makes it handle as a real list, using iteration instead
of picking the first element as the correct one always.
2013-04-23 10:32:19 -03:00
Thiago Santos
054ffc6e2b decodebin2: preserve next groups order 2013-04-23 10:32:19 -03:00
Thiago Santos
42db7c7b08 decodebin2: still report chain as drained when not 'handled'
Even if the chain hasn't been 'handled' in this switching round,
report it as drained so upper chains/groups know abou it.

This makes switching happen on upper levels of the groups/chain
trees
2013-04-23 10:32:19 -03:00
Thiago Santos
ce20bc1dc0 typefind: add smoothstreaming manifest typefinding
Checks if the received XML is a smoothstreaming manifest
in both UTF8 and UTF16 formats. The check is made for a
SmoothStreamingMedia top level element.

Conflicts:
	gst/typefind/gsttypefindfunctions.c
2013-04-23 10:32:19 -03:00
Sebastian Dröge
d77f76049e streamsynchronizer: Don't consider a stream added for an already running one as "new"
Fixes enabling visualizations after disabling them after they were enabled already.
2013-04-23 13:54:49 +02:00
Sebastian Dröge
2e017bd595 streamsynchronizer: If a stream belongs to an already running stream, don't wait
This fixes enabling visualizations after the audio stream already started.

https://bugzilla.gnome.org/show_bug.cgi?id=697820
2013-04-23 13:19:38 +02:00
Tim-Philipp Müller
f5c0d61be7 Update disted orc backup files
Generated with 0.4.17 now.
2013-04-22 13:58:33 +01:00
Tim-Philipp Müller
830926e47d uridecodebin: don't report 'no uri handler found' if the URI was rejected by a source
If a source element could be created for a URI, but all elements rejected
the URI for some reason, propagate the error from the URI handler instead
of reporting a 'no uri handler found for protocol xyz' error, which is
confusing. Fixes error reporting with dvb:// URIs when the channel config
file could not be found or not be parsed or the channel isn't listed.

https://bugzilla.gnome.org/show_bug.cgi?id=678892
2013-04-21 17:30:58 +01:00
Thibault Saunier
fbe80a688d adder: Do not try to wait for flush_stop after receiving a segment event
+ Add a simple test
2013-04-21 16:11:41 +02:00
Stefan Sauer
fa9c0cdf6e volume: skip controlled processing if we have no timestamp 2013-04-21 16:11:41 +02:00
Sreerenj Balachandran
9c94a1812f playbin: use _plugin_feature_rank_compare API instead of duplicating the code. 2013-04-18 13:59:52 +02:00
Sreerenj Balachandran
8cf6049643 decodebin: use _plugin_feature_rank_compare API instead of duplicating the code. 2013-04-18 13:59:36 +02:00
Philippe Normand
26fb72cf65 uridecodebin: query bandwidth capability to source element
Use a scheduling query to check if the source element has some
bandwidth limitations. If this is the case on-disk buffering might be
used. If the source element doesn't handle the scheduling query then
fallback to checking the URI protocol against the hardcoded list of
protocols known to handle buffering already.

Fixes bug 693484.
2013-04-16 16:47:28 +02:00
Sebastian Dröge
948a4a3632 gst: Add better support for static plugins 2013-04-15 15:52:58 +02:00
Sreerenj Balachandran
9b33c75cd4 playbin: use ascending order for name based sorting of pluginfeatures.
The compare_factories_func() should return negative value
if the rank of both PluginFeatures are equal and the name of
first PluginFeature comes before the second one (== ascending order).
2013-04-15 12:05:22 +02:00
Sreerenj Balachandran
f07eb23728 decodebin: use ascending order for name based sorting of pluginfeatures.
The _decode_bin_compare_factories_func() should return negative
value if the rank of both PluginFeatures are equal and the name of
first PluginFeature comes before the second one (== ascending order).
2013-04-15 12:05:16 +02:00
Tim-Philipp Müller
1c0288db38 playbin: fix jpeg passthrough to decoder sinks by marking image/* as video stream 2013-04-12 11:51:30 +01:00
Sebastian Dröge
882677eb8e videoscale: Allow passthrough for ANY caps features 2013-04-08 08:30:38 +02:00
Sebastian Dröge
d0133a2d11 videoconvert: Allow passthrough for ANY caps features 2013-04-08 08:30:38 +02:00
David Schleef
c07efdabd8 videoscale: set reasonable limits on properties
Properties sharpen, sharpness, and envelope are only useful
near their default values.  Decrease ranges to avoid brokenness.

https://bugzilla.gnome.org/show_bug.cgi?id=682171
2013-04-06 13:19:44 -07:00
Stefan Sauer
c2b34b05de videoscale: set min value to DBL_MIN to avoid a value of 0.0 that would crash 2013-04-05 22:39:43 +02:00
Wim Taymans
92b77c5aa4 decodebin2: forward all sticky events to decodepad
Forward all sticky events to the decodepad before exposing the pads. This makes
sure all sticky events are on the exposed pad.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696915
2013-04-04 15:00:52 +02:00
Wim Taymans
c082c06b6c decodebin: debug sticky events on exposed pads 2013-04-04 14:53:32 +02:00
Wim Taymans
08dd2454cd decodebin2: small cleanup
Take the event from the probe just once.
2013-04-04 14:37:15 +02:00
Wim Taymans
34eea4d5f2 streamsynchronizer: update position for reverse
When doing reverse playback the positino advances from timestamp_end to
timestamp.
2013-03-31 12:57:35 +02:00
Edward Hervey
b3d94bd0e4 encodebin: Add action signal to get pad for a given profile
This allows getting a pad for a specific encoding profile, which can
be useful when there are several stream profiles of the same type.

Also update the encodebin unit tests so that we check that the returned
pad has the right caps.

https://bugzilla.gnome.org/show_bug.cgi?id=689845
2013-03-31 12:02:05 +02:00
Wim Taymans
bc4238f959 videoconvert: use one matrix function
Use only one matrix function pointer, let the implementation cast the pixels to
the right size.
2013-03-30 19:14:40 +01:00
Wim Taymans
43a9bfae78 videoconvert: use one temp array for lines
Use only one temporary array for pixels.
2013-03-30 19:14:40 +01:00