Commit graph

4334 commits

Author SHA1 Message Date
Wim Taymans
05eb109c0d audio-resampler: handle filter length changes
Update the buffer with history samples when the filter length changes
because of an update of the parameters or sample rates.
2016-03-28 13:25:51 +02:00
Wim Taymans
d348fbb9b9 audio-converter: make some optimized functions
Make an optimized function that just calls the resampler when possible.
Optimize the resampler transform_size function a little.
2016-03-28 13:25:50 +02:00
Wim Taymans
de37491662 audio-converter: simplify API
Remove the consumed/produced output fields from the resampler and
converter. Let the caler specify the right number of input/output
samples so we can be more optimal.
Use just one function to update the converter configuration.
Simplify some things internally.
Make it possible to use writable input as temp space in audioconvert.
2016-03-28 13:25:50 +02:00
Wim Taymans
1d9a793545 audio-converter: more work on resampling
- Fix the resampler in the audio converter
- fix memory leaks
2016-03-28 13:13:59 +02:00
Wim Taymans
75d668e152 audio-converter: add resampler
Add a resampler to the processing chain when needed.
port the audio resampler to the new audioconverter library
2016-03-28 13:13:59 +02:00
Jan Schmidt
fd2a14144a subparse: WebVTT parsing support
WebVTT is a new subtitle format for HTML5 video. In this first
version of the parser the cue settings are parsed but only stored in
the internal parser state structure. Later on these settings could be
part of the GstBuffer metadata.

https://bugzilla.gnome.org/show_bug.cgi?id=629764
2016-03-25 00:58:42 +11:00
Jan Schmidt
ecb8d2e023 typefind: Add a typefinder for WebVTT files 2016-03-25 00:58:41 +11:00
Jan Schmidt
468111ee49 typefind: Reduce URI typefinder from MAX to LIKELY
Don't claim maximum likelihood for anything that starts
with text that looks like a uri, it's too broad.
2016-03-25 00:58:41 +11:00
Jan Schmidt
fd92bdf894 decodebin2: Hold new buffering_post lock while posting msgs
There's a small window between decodebin choosing a buffering level
to post and another thread choosing a different buffering level
where things can race. Close that window by holding a new lock
that's only for posting buffering messages - like what was done
in multiqueue.

https://bugzilla.gnome.org/show_bug.cgi?id=764020
2016-03-24 15:01:15 +02:00
Jimmy Ohn
090d0d1961 decodebin: Modify result of seekable in check_upstream_seekable function
In check_upstream_seekable function, it returns FALSE value even though
we already declare about the seekable variable. So, This patch return
result of seekable in check_upstream_seekable function.

https://bugzilla.gnome.org/show_bug.cgi?id=763975
2016-03-24 14:26:23 +02:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Sebastian Dröge
9c2d76fb9f decodebin: Shut down all elements explicitly to NULL state before freeing the decode chain
Due to transient locked state during autoplugging, some elements might be
ignored by the GstBin::change_state() and might still be running. Which could
then cause pad-added and similar accessing decodebin state that does not exist
anymore, and crash.

https://bugzilla.gnome.org/show_bug.cgi?id=763625
2016-03-14 17:09:32 +02:00
Sebastian Dröge
65390b5129 multihandlesink: Remove useless streamheader storage
We don't do anything with it but always get them from the caps anyway, so
stop storing them and having complicated logic around that.

https://bugzilla.gnome.org/show_bug.cgi?id=763278
2016-03-14 12:45:33 +02:00
Sebastian Dröge
1d4fb48718 multihandlesink: Only don't send HEADER buffers normally if they are actually streamheaders from the caps
And also consider HEADER buffers without DELTA_UNIT flag as sync points. This
fixes sync-mode=2 with mpegtsmux for example, which has no streamheaders but
puts the HEADER flag on its keyframes.

https://bugzilla.gnome.org/show_bug.cgi?id=763278
2016-03-14 12:45:33 +02:00
Sebastian Dröge
916746e731 decodebin: expose_pad() is always called with lock==TRUE, simplify code
This basically reverts ee44337fc3 .

https://bugzilla.gnome.org/show_bug.cgi?id=763491
2016-03-14 12:45:29 +02:00
Sebastian Dröge
65d09c1495 decodebin: Don't check twice if the decode chain is complete in pad_added_cb()
expose_pad() already does the same.

https://bugzilla.gnome.org/show_bug.cgi?id=763491
2016-03-14 12:45:29 +02:00
Sebastian Dröge
001c7f04a0 decodebin: Don't hold EXPOSE_LOCK in type_found() outside the stream lock
In other places we lock it the other way around, leading to possible
deadlocks. Also this will deadlock if analyze_pad() causes a new element to be
autoplugged that adds new pads on itself when its state is changed.

https://bugzilla.gnome.org/show_bug.cgi?id=763491
2016-03-14 12:45:29 +02:00
Sebastian Dröge
0a434e9c6c tcp: Remove unused file
It's a copy of multihandlesink, but completely outdated. Let's get rid of it
before it gets even more outdated.

https://bugzilla.gnome.org/show_bug.cgi?id=763278
2016-03-14 12:45:16 +02:00
Sebastian Dröge
e2c992de46 Revert "playbin: use avdeinterlace for deinterlacing until deinterlace is ported"
This reverts commit 0615794300.

deinterlace was ported at some point in the last 4 years and has better video
format support, and especially better negotiation than avdeinterlace. Having
avdeinterlace but not deinterlace causes various problems in zerocopy
scenarios.

https://bugzilla.gnome.org/show_bug.cgi?id=760553
2016-03-02 20:47:42 +02:00
Sebastian Dröge
e79749a531 encodebin: Make dispose() function safe to be called multiple times 2016-03-02 18:47:23 +02:00
Tom Deseyn
8c4d3c6aa9 multisocketsink: handle client close correctly and EWOULDBLOCK
Fixes 100% cpu usage when client disconnects. Commit 6db2ee56
would just make multisocketsink ignore reads of 0 bytes without
removing the client, so we'd get woken up over and over again
for the client.

Fix the original issue differently by handling the non-fatal error code.

https://bugzilla.gnome.org/show_bug.cgi?id=761257
https://bugzilla.gnome.org/show_bug.cgi?id=743834
2016-03-01 13:15:38 +00:00
Edward Hervey
27a1fa469c Revert "playsink: Properly mark pending blocked pads"
This reverts commit 62053852de.

The issue that the patch fixes is only noticeable when using decodebin3,
which isn't yet in master.
2016-02-23 09:35:22 +01:00
Tim-Philipp Müller
a62c7bd54c Fix use of undeclared core debug category symbols
libgstreamer currently exports some debug category
symbols GST_CAT_*, but those are not declared in any
public headers.

Some plugins and libgstvideo just use GST_DEBUG_CATEGORY_EXTERN()
to declare and use those, but that's just not right at
all, and it won't work on Windows with MSVC. Instead look
up the categories via the API.
2016-02-20 11:31:43 +00:00
Tim-Philipp Müller
ddfe7a2808 win32: remove outdated build cruft
This hasn't been touched for generations, doesn't work,
and is just causing confusion. We also don't want to
maintain these files manually.
2016-02-20 10:05:17 +00:00
Reynaldo H. Verdejo Pinochet
9cf5645860 typefind: strengthen check for valid H.263 picture layer
Avoids some false positives leading to miss identification:

* Prevent picture start code emulation for the first 2 bytes read
* Add check for valid "picture coding type" and "PB-frames mode" combination

Additionally, change name on confusingly named TR var to what
it is, the layer's PTYPE.

https://bugzilla.gnome.org/show_bug.cgi?id=693263
2016-02-17 11:26:25 -08:00
Vineeth T M
5d78aab810 decodebin: return incomplete topology if decode chains' cap could not be obtained
When getting caps of the decode chain, in get_topology, the caps are being
checked if fixed or not. But get_topology will be called when the decode is
chain is being exposed and hence it will always be fixed. Hence removing the
check for fixed caps. Removing gst_pad_get_current_caps for the chain->pad, as
get_pad_caps will again call the same api.

And get_topology can return NULL value if currently shutting down the
pipeline, which on being passed to create message will result in assertion
error. Check if topology is valid before using it

https://bugzilla.gnome.org/show_bug.cgi?id=755918
2016-02-17 10:48:29 +02:00
Sebastian Dröge
6c2ee2853d decodebin: Fix documentation of the autoplug-query signal 2016-02-15 21:28:33 +02:00
Wim Taymans
9d66b7cdd2 resample: avoid overflows
Avoid overflow in rate calculation. This can cause the resampler to
start on the wrong phase after a rate change.
Avoid overflow in cubic fraction calculation. This can cause noise when
dealing with higher samplerates.
2016-02-11 19:55:08 +01:00
Wim Taymans
188c0811de resample: fix double interpolation sse code
We were only reading 2 filter taps and we need to read 4 to do cubic
interpolation.
2016-02-11 18:03:59 +01:00
Sebastian Dröge
641428966e audiorate: Use gst_audio_format_fill_silence() instead of memset with 0 for generating silence
For unsigned formats, silence is not all bits 0.
2016-01-28 13:29:39 +01:00
Thibault Saunier
135c612550 encodebin: Allow streamheader update when profile.allow_dynamic_output == FALSE
Some encoders can update the stream header through time (for example
vp8 might do that) but it does not strictly changes the output format.
2016-01-27 12:58:23 +01:00
Sebastian Dröge
acd08a828d decodebin: Correctly expose pads from elements that have directly exposable pads
analyze_new_pad() can return a new decode chain, which might have a new
GstDecodePad in the end. We should use those two for expose_pad() and not the
original ones that were passed to analyze_new_pad().

This fails when having a demuxer element that has raw pads immediately or
if a decoder with raw caps is after an adaptive demuxer.

https://bugzilla.gnome.org/show_bug.cgi?id=760949
2016-01-25 13:50:26 +01:00
Mathieu Duponchelle
2717f4a86f streamsynchronizer: Ignore flushing streams [..]
[..] when resetting group start time. In GES, we are usually connected
to the streamsynchronizer on one audio and one video pad.

When seeking the timeline, both nlecompositions often output their flush_start
before any of them has output its flush_stop.

The current code, when receiving the first flush stop was using the
running time of the start of the second composition, which could
be pretty much anything, and means nothing at that point.

This patch is thread-safe, as STREAM_SYNCHRONIZER_LOCK is taken
both when setting flushing and when checking it.

https://bugzilla.gnome.org/show_bug.cgi?id=750013
2016-01-16 11:05:13 +01:00
Sebastian Dröge
fccf83e69f playbin: Only append non-raw and sysmem pad template caps to the autoplug-query result
Otherwise a decoder supporting GL memory will think that all downstream can
support GL memory because of seeing its own template caps.

https://bugzilla.gnome.org/show_bug.cgi?id=758212
2016-01-16 11:05:13 +01:00
Sebastian Dröge
9713ab06cd Revert "playbin: only add the template caps when the result is empty"
This reverts commit 023af2d3b1.

https://bugzilla.gnome.org/show_bug.cgi?id=758212
2016-01-16 11:05:13 +01:00
Edward Hervey
62053852de playsink: Properly mark pending blocked pads
When blocking input pads, we also need to properly set the appropriate
pending flag.

Without this, when switching stream types after initial configuration
(like going from Audio+Video to Audio+Video+Sub) playsink would never
wait for *all* input streams to be blocked (it would just wait for the
new input pad (text in this case) to be blocked).

Since the reconfiguration might introduce unlinking/relinking of elements,
we need to ensure that *ALL* input streams are blocked.

Failure to do so would result in having some input streams pushing data
to inactive elements (returning GST_FLOW_FLUSHING) or unlinked pads
(returning GST_FLOW_NOT_LINKED).

A later optimization could involve only blocking the input pads that
might be involved in reconfiguration. But better be safe than sorry for
now :)
2016-01-15 10:05:58 +01:00
Thiago Santos
0d18717912 subtitleoverlay: replace gst_caps_can_intersect() with is_subset()
Subset check verifies also that all required fields are present
and is mostly commonly used when checking if an element accepts
a certain caps
2016-01-13 16:32:25 -03:00
Thiago Santos
81c52aaa16 playbin: use subset check instead of intersect
Elements usually require that all fields on their caps are present
on the fixed caps they receive. Using intersection won't verify it,
resort to using is_subset() checks.

https://bugzilla.gnome.org/show_bug.cgi?id=760477
2016-01-13 15:29:17 -03:00
Thiago Santos
20f6af651b subtitleoverlay: replace accept-caps with caps query
Those accept caps are actually checking if downstream supports
some particular caps to check if it need to negotiate a different
format. Checking only the next element with accept-caps is not enough
to guarantee that it is supported.

Using a caps query makes it obtain the supported caps for downstream
as a whole instead of only the next element.
2016-01-11 18:35:29 -03:00
Thiago Santos
5ef0a09794 videorate: replace accept-caps with a caps query
accept-caps is only a shallow check, it needs to know
whether downstream as a whole accepts the framerate
2016-01-08 15:05:38 -03:00
Wim Taymans
85afad72ec audio-converter: small API tweaks
Pass flags in _converter_new() so that we can configure ourselves
differently depending on some options.
SOURCE_WRITABLE -> IN_WRITABLE because the array is called 'in'
2016-01-08 17:34:50 +01:00
Wim Taymans
980163457e audio-convert: simplify API
Simplify the API, we don't need the consumed and produced output
arguments. The caller needs to use the _get_in_frames/get_out_frames API
to check how much input is needed and how much output will be produced.
2016-01-08 17:19:58 +01:00
Sebastian Dröge
844aa3e6a9 playbin: Use the caps query instead of accept-caps to detect if a sink accepts caps
accept-caps is only for one element, caps query is recursive. Fixes playback
with totem and other situations.

https://bugzilla.gnome.org/show_bug.cgi?id=760234
2016-01-08 16:32:32 +02:00
Aurélien Zanelli
9b9f913809 videotestsrc: add missing break in set_property switch case
To avoid future issue when adding new properties.

https://bugzilla.gnome.org/show_bug.cgi?id=760204
2016-01-06 13:21:06 +02:00
Sebastian Dröge
eb09889176 audioconvert: Pass pointer arrays instead of singleton pointers to gst_audio_converter_samples()
In this specific case it wouldn't cause problems as we only ever access the
first array element, but let's make explicit what is happening here.

CID 1346530 and 1346529
2015-12-29 18:14:54 +02:00
Sebastian Dröge
0416f121f2 typefindfunctions: Make sure that enough data is available in AAC/ADTS typefinder
We would otherwise read beyond the array bounds and crash every now and then.
This was introduced with 5640ba17c8.

https://bugzilla.gnome.org/show_bug.cgi?id=759910
2015-12-28 13:51:02 +02:00
Sebastian Dröge
6a57399270 playsink: Don't leak audio/video filters due to floating references weirdness
The filters' floating references are sinked during set_property() already,
which means that GstBin takes a new reference when adding the filter to it.
Get rid of the additional reference after adding the filter to the bin.
2015-12-25 11:34:10 +01:00
Sebastian Dröge
a136ac0e2f playsink: Allow reuse of audio/video filters by unparenting them from their bins
And also recreate the chains if the filter is changing.
2015-12-25 10:36:44 +01:00
Sebastian Dröge
24181db083 playsink: Don't leak audio/video filters when using non-raw media 2015-12-25 10:28:02 +01:00
Matthew Waters
023af2d3b1 playbin: only add the template caps when the result is empty
Unconditionally adding the template caps when proxying the caps query will play
havoc with decoders that attempt to choose an output format based on some caps
features.  Creating a sink that does not include those caps features and a
decoder/parser/etc that preferentially chooses some specific caps feature when
available, will always return the decoder/parser/etc template caps and choose a
feature that downstream will be unable to support.

Fix by limiting the addition of the template caps to when the result is actually
empty.

https://bugzilla.gnome.org/show_bug.cgi?id=758212
2015-12-18 21:55:00 +11:00
Sebastian Dröge
60bad4815d Revert "decodebin2: fix deadlock on chain shutdown"
This reverts commit 77dc09c3a9.

It can cause the FLUSH_START/STOP events to go to the sink elements, which
then causes state changes and various other problems. We shouldn't really
flush downstream here, the idea is to do *draining*.

Apart from that the testcase for the original bug here works without this
commit now.
2015-12-16 17:09:25 +01:00
Luis de Bethencourt
29cfb9a6d7 multifdsink: fix typo in GST_WARNING_OBJECT
This should make easier to parse the debug logs.
s/fnctl/fcntl
2015-12-16 11:12:03 +00:00
Vincent Penquerc'h
033ce9b20d videorate: remove dead code
Since the loops increasing count from 0 are always run at least
once (if count < 1), count will always be at least one when
compared to the drop/dup conditions.

Coverity 1139674
2015-12-16 11:00:22 +00:00
Wim Taymans
8bcf183c7f audioconvert: clear convert object 2015-12-16 11:13:15 +01:00
Wim Taymans
f5a3f70571 audio: adapt API for non-interleaved formats
Allow an array of sample blocks to be passed to the channel mix and
quantizer functions to support non-interleaved formats.
2015-12-14 09:16:08 +01:00
Wim Taymans
9c2bcd7b76 multisocketsink: add GstNetworkMessage event
Add a property and logic to send a GstNetworkMessage event containing
the message that was received from a client. This can be used to
implement simply bidirectional communication.
2015-12-10 12:44:42 +01:00
Wim Taymans
9aaaa26ff3 multisocketsink: add dispatched event
Add a property and logic to send a GstNetworkMessageDispatched
event upstream to notify that a buffer has been sent. This can be used
to keep track of what client received what buffers.
2015-12-10 12:44:42 +01:00
Wim Taymans
0e1a858d89 socketsrc: handle GstNetworkMessage events
Add a property to handle GstNetworkMessage events. These events contain
a buffer that is sent on the socket to allow for simple bidirectional
communication.
2015-12-10 12:44:42 +01:00
Wim Taymans
5e55968546 audio-convert: improve converter API
Improve the converter API to allow for an max input and output number of
samples and return the number of consumed/produced samples.
2015-12-09 17:16:26 +01:00
Wim Taymans
1da5a3ab66 multisocketsink: let downstream know we support metadata
Let downstream know that we support GstNetControlMessage metadata API.
2015-12-04 12:25:11 +01:00
Tim-Philipp Müller
71505dfa24 decodebin2: fix "Attempt to unlock mutex that was not locked"
Introduced in commit ee44337f, caused the decodebin
test_text_plain_streams unit test to abort.

https://bugzilla.gnome.org/show_bug.cgi?id=752651
2015-12-02 18:16:05 +00:00
Edward Hervey
d292ed48c5 playback: Expose XSUB formats by default
This is a workaround, we should remove this once we have a proper
decoder
2015-12-02 16:37:50 +01:00
Edward Hervey
c79bf13bc2 streamsynchronizer: Rename GstStream => GstSyncStream
Avoid clashes with future GstStream from core
2015-12-02 16:37:41 +01:00
Sebastian Dröge
9e4bf58b8e decodebin: Update buffering messages when removing an element that had buffering pending
Otherwise we'll remove that element while keeping its buffering message in our
list, and because of that never ever report buffering 100% as that element
will always be at a lower percentage.

This fixes e.g. seeking over Period boundaries in DASH and various other
issues when buffering happens between group switches.

Also use a new mutex for protecting the buffering messages. The object lock is
already used by gst_object_has_as_ancestor() and we need to use it now for
checking if the buffering message sender has the to-be-removed element as
ancestor.
2015-12-02 16:16:22 +02:00
Wim Taymans
01f5ca3da8 multisocketsink: keep on reading when we stop sending
When we stop sending because we need more data, still keep a GSource
around to receive data from the clients.
Also handle read and write in the same go.
2015-12-02 10:26:03 +01:00
Thomas Bluemel
2c62aad159 [PATCH] Fix a race condition accessing the decode_chain field.
Make sure that any access to the GstDecodeBin's decode_chain
field is protected using the EXPOSE_LOCK.  Also add a simple
reference counter to the GstDecodeChain structure so that when
the type_found signal fires it can hold onto the decode chain
even while the EXPOSE_LOCK is not held.  This should fix a
race condition if the type_found signal fires right in the
middle of a state change that messes with the same decode
chain.

https://bugzilla.gnome.org/show_bug.cgi?id=755260
2015-12-01 17:36:31 +00:00
Vincent Penquerc'h
870c6df489 decodebin: early out on pad-added when the pad is inactive
The pad may be recently deactivated if the element is switched
back down very quickly.

https://bugzilla.gnome.org/show_bug.cgi?id=752651
2015-12-01 17:36:31 +00:00
Vincent Penquerc'h
ee44337fc3 decodebin: lock the expose lock around decode_chain use
Helps with a crash in decodebin when quickly switching states.

https://bugzilla.gnome.org/show_bug.cgi?id=752651
2015-12-01 17:36:31 +00:00
Wim Taymans
ff6d1a2a25 audio-converter: add output size argument
Make it possible to have a different number of output samples than input
samples when we, for example, want to add resampling later.
2015-11-10 09:53:59 +01:00
Edward Hervey
d0eface01c decodebin: Properly deactivate ghostpads
Just setting the ghostpad as flushing wasn't enough. It needs to be
consistent on the internal proxypad also, otherwise you end up in
situations where:
* a pending buffer on the target pad triggers the sticky event
  propagation
* the default implementation sees that the proxypad is not flushing,
  so it tries to push it to the other pad (the actual ghostpad)
* the ghostpad is flushing, so returns FALSE
* the push_event function sees that pushing the event failed...
* ... and pending buffer push returns GST_FLOW_ERROR, instead of
  GST_FLOW_FLUSHING

By using gst_pad_set_active(FALSE), we ensure that both the ghostpad
and the proxypad are flushing/deactivated. The situation above will
no longer occur, and a GST_FLOW_FLUSHING will be returned.
2015-11-06 19:38:13 +01:00
Tim-Philipp Müller
d2e210bbea audioconvert: fix build
Don't include file that is no longer generated, and remove some
files that are no longer needed because they have moved into the
lib. Fixes distcheck.
2015-11-06 18:12:28 +00:00
Wim Taymans
e3f0f3b91e audio-converter: move audio converter to audio libs
Move the audio-converter helper to the audio library.
2015-11-06 17:53:22 +01:00
Wim Taymans
dfa25a40fc audio-channel-mix: move channel mixer to audio libs
Move the channel mixer code to the audio library
2015-11-06 17:39:33 +01:00
Wim Taymans
b8bea9d8be audio: add debug categories 2015-11-06 17:29:22 +01:00
Wim Taymans
268ed5dd6f channelmix: don't limit channelpositions
Don't set a limit on the channel positions, just like the metadata.
2015-11-06 16:42:35 +01:00
Wim Taymans
9fbe0386d0 channelmix: simplify API a little
Remove the format and layout from the mix_samples function and use the
format when creating the channel mixer object. Also use a flag to handle
the unlikely case of non-interleaved samples like we do elsewhere.
2015-11-06 16:03:20 +01:00
Wim Taymans
7f5104f52f channelmix: GstChannel -> GstAudioChannel
Rename GstChannel to GstAudioChannel
2015-11-06 15:50:34 +01:00
Wim Taymans
1635bc0a45 audioconvert: cleanups and add some docs
Add docs for the internal audioconvert object before moving it to the
audio library.
Remove get_sizes and implement the trivial logic in the element.
Remove some unused orc functions
2015-11-06 12:46:36 +01:00
Wim Taymans
c36ac3ce45 audioconvert: move audio quantize code to libs
Move the audio quantize code from audioconvert to the audio library.
work on making an audio converter helper function similar to the video
converter.
Fold fastrandom directly into the quantizer, add some ORC code to
optimize this later.
2015-11-06 12:10:48 +01:00
Wim Taymans
a7789854d5 audio-channels: rename get_default_mask
Rename _get_default_mask() to _get_fallback_mask() to make it more
clear that the function only provides a fallback if nothing else can be
done. Also clarify this in the documentation.

API: gst_audio_channel_get_fallback_mask()
2015-11-05 12:50:18 +01:00
Thibault Saunier
9c7d3c8ab2 volume: Do not try to get binding value array if we are not processing any sample
In some conditions we might process empty buffers, calling
gst_control_binding_get_value_array in that case will lead
to the assertion:

  (lt-ges-launch-1.0:18859): GStreamer-CRITICAL **: gst_control_binding_get_value_array: assertion 'values' failed
2015-11-05 11:44:31 +01:00
Wim Taymans
f86ed8cdf6 audio-channels: make method to get default channel-mask
Add a new method to get the default channel-mask.
Use the new method on audiodecoder and audioconvert.

API: gst_audio_channel_get_default_mask()
2015-11-05 10:52:53 +01:00
Wim Taymans
801f7ca464 audio-format: add TRUNCATE_RANGE flag
Add a TRUNCATE_RANGE flag for unpack functions to fill the least
significate bits with 0 (as did the old code). Also add functions
that don't truncate. Use the TRUNC flag in audioconvert for
backwards compatibility for now.
2015-11-03 12:12:08 +01:00
Wim Taymans
9e15c89564 audioconvert: change multiplier for int<->float conversion
Use (1 << 31) as the multiplier for int<->float conversions. This makes
sure that int->float conversions always end up with floats between
[-1.0, 1.0].
For the conversion from float to int, this multiplier will give the complete
int range after we perform clipping.
Change the unit test to take this into consideration.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=755301
2015-11-03 12:12:08 +01:00
Wim Taymans
bd89f2430b audiotestsrc: increase freq limit
Raise the frequency limit and try to negotiate to a samplerate of 4*freq
when larger then the default samplerate.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=754450
2015-11-02 15:54:19 +01:00
Wim Taymans
c688eb0d88 audiotestsrc: add support for unlimited number of channels
Raise the channel limit and set the channel-mask for > 2 channels.
2015-11-02 15:46:22 +01:00
Wim Taymans
b0bf294a62 audiotestsrc: add support for all formats
Use the pack functions to also support the other audio formats we
have.
2015-11-02 13:22:18 +01:00
Sebastian Dröge
e51c9a3dad audioresample: Clip input buffers to the segment before handling them
https://bugzilla.gnome.org/show_bug.cgi?id=757068
2015-11-02 10:20:37 +02:00
Sebastian Dröge
000c424835 audioconvert: Clip input buffers to the segment before handling them
https://bugzilla.gnome.org/show_bug.cgi?id=757068
2015-11-02 10:20:37 +02:00
Tim-Philipp Müller
3dd26bb9e8 audioconvert: update orc backup code to fix build without orc 2015-11-01 23:06:11 +00:00
Csaba Toth
3159501002 multisocketsink: fix "client-removed" signal on 64-bit platforms and with bindings
The client-removed signal used G_INT_TYPE instead of G_SOCKET_TYPE
in its definition leading to problems on platforms where the size
of a pointer is larger than the size of an integer, It would also
not work at all with dynamic language bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=757155
2015-10-31 11:12:38 +00:00
Joan Pau Beltran
a95a900c21 videotestsrc: fix handling of Bayer format 'gbrg'
Due to a typo, videotestsrc did not handle the Bayer
format 'gbrg' properly and reported it as invalid,
causing negotiation errors.

https://bugzilla.gnome.org/show_bug.cgi?id=757264
2015-10-30 20:29:04 +00:00
Wim Taymans
5cf367ae57 audioconvert: rework audioconvert
Rewrite audioconvert to try to make it more clear what steps are
executed during conversion.
Add passthrough step that just does a memcpy when possible.
Add ORC optimized dither and quantization functions.
Implement noise-shaping on S32 samples only and allow for arbitrary
noise shaping coefficients if we want this later.
2015-10-30 17:51:47 +01:00
Wim Taymans
e1569ce76a channelmix: fix up API a little
don't use gpointer * for something that should be gpointer.
2015-10-30 17:51:47 +01:00
Wim Taymans
26d469a04b audioquantize: make helper for add with saturation 2015-10-30 17:51:47 +01:00
Wim Taymans
cd6c29e071 audioconvert: make the quantizer a reusable object
Turn the quantizer into a reusable object.
2015-10-28 11:36:18 +01:00
Wim Taymans
8fc2569328 audioconvert: make the channel mixer a separate reusable object
A first attempt at making the channel mixer a separate object.
2015-10-28 11:36:18 +01:00
Wim Taymans
8d4cd51e59 audioquantize: fix 8-pole noise shaping
Fix the 8-pole noise shaping error update. We were mixing errors from
different channels.
2015-10-28 11:36:18 +01:00
Sebastian Dröge
36b80edb72 decodebin: Send SEEK events directly to adaptive streaming demuxers
This makes sure that they will always get SEEK events, even if we're currently
in the middle of a group switch (i.e. switching to another
representation/bitrate/etc).

https://bugzilla.gnome.org/show_bug.cgi?id=606382
2015-10-27 15:50:45 +02:00
Guillaume Desmottes
7d6b6b0313 decodebin: fix event leak
As stated in GST_PAD_PROBE_HANDLED's documentation, we are
supposed to unref the event before returning.

Fixes an event leak in the validate.hls.playback.play_15s.hls_bibbop
validate scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=754459
2015-10-25 11:18:29 +00:00