Commit graph

4291 commits

Author SHA1 Message Date
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
Sebastian Dröge b4afaee8c0 audioconvert: Update disted orc files 2015-10-23 19:13:05 +03:00
Wim Taymans 2b626a5adf audioconvert: use pack/unpack functions
Rework the converter to use the pack/unpack functions
Because the unpack functions can only unpack to 1 format, add a separate
conversion step for doubles when the unpack function produces int.
Do conversion to S32 in the quantize function directly.
Tweak the conversion factor for doing float->int conversion slightly to
get the full range of negative samples, use clamp to make sure we don't
exceed our int range on the positive axis (see also #755301)
2015-10-23 16:58:17 +02:00
Sebastian Dröge 53f135cec7 playbin: Send upstream events directly to playsink
Send event directly to playsink instead of letting GstBin iterate
over all sink elements. The latter might send the event multiple times
in case the SEEK causes a reconfiguration of the pipeline, as can easily
happen with adaptive streaming demuxers.

What would then happen is that the iterator would be reset, we send the
event again, and on the second time it will fail in the majority of cases
because the pipeline is still being reconfigured
2015-10-23 12:02:28 +03:00
Thibault Saunier ab6b536a66 videotestsrc: Force alpha downstream if foreground color contains alpha
Otherwise the foreground color won't be fully represented in the
outputted frames.

https://bugzilla.gnome.org/show_bug.cgi?id=755482
2015-10-22 11:12:23 +02:00
Matthew Waters 44871680f0 decodebin: track the exposable pads through connect_pad
The logic introduced by
[d50b713: decodebin: set the decode pad target before setting elements to PAUSED]
to expose pads would only ever be able to possibly expose one (the last) pad per element.

Make it so that any exposable pads are able to be exposed rather than just the
last pad returned by connect_element.

https://bugzilla.gnome.org/show_bug.cgi?id=742924
2015-10-20 10:48:05 +03:00
Matthew Waters 94d81fc713 decodebin: return the possibly new chain in analyze_new_pad
In the case of analyzing a demuxer chain, analyze_new_pad may create
a new GstDecodeChain.  This was not propagated to the calling function which as
of [d50b713f decodebin: set the decode pad target before setting elements to PAUSED]
is now required to be able to expose the correct pad.

https://bugzilla.gnome.org/show_bug.cgi?id=742924
2015-10-20 10:47:45 +03:00
Rajat Verma 68ec631db7 playsink: relink text_pad in case of reconfiguration
In case of reconfiguration, text_pad should be re-connected with
stream synchronizer sink pad. Otherwise we'll leave an unlinked pad around if
there always was a streamsynchronizer text pad.

https://bugzilla.gnome.org/show_bug.cgi?id=756804
2015-10-20 10:37:04 +03:00
Sebastian Dröge 4d6aa0f831 decodebin/playbin/playsink/subtitleoverlay: Post async-done on state change failures
https://bugzilla.gnome.org/show_bug.cgi?id=756611
2015-10-19 11:06:25 +03:00
Sebastian Dröge 87dbe54797 playsink: Immediately error out if state change fails
Otherwise we chain up to the parent class' change_state function and might
override the failure with SUCCESS.

https://bugzilla.gnome.org/show_bug.cgi?id=756611
2015-10-19 11:06:25 +03:00
Sebastian Dröge 92061cb19e playbin/uridecodebin: Always post async-done immediately if we're a live pipeline
Not only if the base class told us, but also if one of our own elements did.

https://bugzilla.gnome.org/show_bug.cgi?id=756611
2015-10-19 11:06:25 +03:00
Matthew Waters d50b713f44 decodebin: set the decode pad target before setting elements to PAUSED
Otherwise caps and context queries will disappear into nothing and therefore
fail.  With autoplug-query now actually working, users (such as playbin) can
proxy these queries to the selected video sink and be able to select an
more appropriate configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=731204
2015-10-19 11:55:04 +11:00
Vineeth TM b424bc2e4f playsink: Fix volume element leak
In case sink implements a streamvolume interface, volume element is being got
from the sink. But this is transfer full. So the memory should be freed before
setting it to NULL. This was resulting in major memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=755867
2015-10-15 09:42:21 +03:00
Vineeth T M a1d84edd16 videorate: remove unnecessary break statement
Trivial patch to remove unncessary break statement used after
goto statement.

https://bugzilla.gnome.org/show_bug.cgi?id=754054
2015-10-02 17:27:13 +03:00
Mathieu Duponchelle 0c0f803488 encodebin: Fix special case
Allows to run such a command line :

gst-launch-1.0 uridecodebin uri=file:///home/meh/Music/sthg.mp4 ! \
encodebin profile-string="audio/x-wav|1" ! filesink location=sthg.wav

Previously the code failed because wavenc is considered as a muxer.
We still want encodebin to audio/x-wav as an AudioEncodingProfile,
so this simple fix allows that.

Ability to mux raw streams in containers such as matroskamux
is a different issue.

https://bugzilla.gnome.org/show_bug.cgi?id=751470
2015-10-02 17:25:48 +03:00
Rajat Verma 267f4c2bad decodebin: free hidden groups at time of switching groups
hidden groups should be freed at time of switching groups to avoid memory use
from balloning up.

https://bugzilla.gnome.org/show_bug.cgi?id=755770
2015-10-02 17:02:21 +03:00
Jan Schmidt 3f7138a6e4 videotestsrc: Don't fixate framerate if downstream didn't provide one
intersection with a downstream that accepts any video/x-raw caps
with no further detail won't create a framerate field. If it's
not in the caps, don't fixate it, just set it to 30/1
2015-10-02 15:05:26 +10:00
Tim-Philipp Müller fb30c04145 typefinding: minor clean-up
Remove unnecessary brackets from IS_MPEGTS_HEADER macro.
2015-10-01 12:49:59 +01:00
Pankaj Darak eaf4ce01d3 typefinding: mpeg-ts detection improvement
Allow AFC to be 0 for null pid packets.

https://bugzilla.gnome.org/show_bug.cgi?id=726117
2015-10-01 12:32:33 +01:00
Tim-Philipp Müller 7fb9cd453b subparse: detect closing tags even if there's a space after the slash
</ i> should be handled like </i>

https://bugzilla.gnome.org/show_bug.cgi?id=755875
2015-09-30 18:17:13 +01:00
Vineeth T M 060f0c21f2 audiosink, multisocketsink: Fix error leak during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755143
2015-09-17 11:59:35 +02:00
Sebastian Dröge 2a1e046dd9 uridecodebin: Use the correct caps name for MS Smooth Streaming manifests
Thanks to John Chang <r97922153@gmail.com> for reporting.

https://bugzilla.gnome.org/show_bug.cgi?id=755098
2015-09-16 19:54:43 +02:00
Sebastian Dröge 35cb3b0c57 playback: Add POINTER_TO_ULONG() macro for consistency 2015-09-11 23:29:57 +02:00
Kouhei Sutou ab64b00b48 playback: fix build error for 64bit Windows build by MinGW
Casting to gpointer from gulong generates the following warning with
64bit Windows target MinGW:

    gstplaybin2.c: In function 'pad_added_cb':
    gstplaybin2.c:3476:7: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
           (gpointer) group_id_probe_handler);
           ^
    cc1: all warnings being treated as errors

We should cast to guintptr from gulong before we cast to gpointer.

https://bugzilla.gnome.org/show_bug.cgi?id=754755
2015-09-11 23:28:07 +02:00
Wim Taymans 3d733ad09f videoscale: fix gamma-decode option
We need to use the enum to configure the option now.
2015-09-03 17:56:05 +02:00
Thiago Santos 76d26a60bd playsinkconvertbin: implement accept-caps handler
The default one will just go through the internal elements which might
just be identity when it is in passthrough which will lead to the query
being handled by the downstream sink, ignoring all that playsinkconvertbin
could actually handle and convert.

https://bugzilla.gnome.org/show_bug.cgi?id=754235
2015-08-28 09:44:10 -03:00
Eunhae Choi b1f78b5d23 subparse: use g_clear_error instead of g_error_free
To avoid invalid pointer accees the err pointer should be set to NULL.
By using g_clear_error() it calls free and clear the pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=753817
2015-08-19 16:21:25 +03:00
Sebastian Dröge 2727ca01f5 Revert "decodebin: Handle the preroll multi-queue size"
This reverts commit 5c8ef0ea05.
2015-08-18 18:47:22 +03:00
Sebastian Dröge 4fe4357188 Revert "decodebin: Store extra_buffer_required per group, not globally"
This reverts commit 1ea81114ea.
2015-08-18 18:47:21 +03:00
Sebastian Dröge 970bc16bf8 Revert "decodebin: If extra buffers are going to be required, we're still prerolling"
This reverts commit a3b24f0241.
2015-08-18 18:47:18 +03:00
Sebastian Dröge a3b24f0241 decodebin: If extra buffers are going to be required, we're still prerolling 2015-08-18 15:19:03 +03:00
Sebastian Dröge 1ea81114ea decodebin: Store extra_buffer_required per group, not globally
It's only relevant for each group, and by storing it in the group
we have locking and everything else like for the other buffering-related
variables. Locking looks a bit fishy still, but it was like that for a long
time already so shouldn't be worse than before.
2015-08-18 15:19:03 +03:00
Myoungsun Lee 5c8ef0ea05 decodebin: Handle the preroll multi-queue size
Overview:
There are some of interleaved streams which has long-term location of audio data.
It mean the audio data is located far away more than multiqueue size.
In this case, because of multiqueue overrun, the pipeline is stopped.
To prevent hanging-like state, the decodebin needs to handle the queue size.

Caused:
The multiqueue size is not enough, the pipeline will stay being stalled status
and decodebin cannot complete to build decode chain.
In this issue file, decodebin did not receive no_more_pads signal or audio data yet.

Steps to Reproduce:
play the high-resolution(4K file) files or some streaming media(push mode).

Actual Results:
There is no audio or subtitle.
We can see only video or infinite loading.

Resolution:
Decodebin detect this problem, and add extra buffer size to multiqueue.
The multiqueue is larger than before, the next data can be pushed the downstream element.

Additional Information:
The max-preroll extra buffer size is set 8MB.
We can use total pre-roll buffer 10MB.
Only first overrun callback can handle multiqueue size.

https://bugzilla.gnome.org/show_bug.cgi?id=733235
2015-08-18 15:19:02 +03:00
Sebastian Dröge 8a736f6e98 typefindfunctions: Add typefinder for TTML+XML
Used in DASH among other things, as SMPTE Timed Text.
2015-08-18 12:56:33 +03:00
Edward Hervey 7fc856ff5c decodebin: Fix list iteration
We were using the wrong variable ...

CID #1316477
2015-08-16 12:53:23 +02:00
Edward Hervey eaf9ca90c7 decodebin2: Handle flushing with multiple decode groups
When an upstream element wants to flush downstream, we need to take
all chains/groups into consideration.

To that effect, when a FLUSH_START event is seen, after having it
sent downstream we mark all those chains/groups as "drained" (as if
they had seen a EOS event on the endpads).

When a FLUSH_STOP event is received, we check if we need to switch groups.
This is done by checking if there are next groups. If so, we will switch
over to the latest next_group. The actual switch will be done when
that group is blocked.

https://bugzilla.gnome.org/show_bug.cgi?id=606382
2015-08-15 18:50:06 +02:00
Edward Hervey 2d3743e37d decodebin2: Forward event/queries for unlinked groups
When upstream events/queries reach sinkpads of unlinked groups (i.e.
no longer linked to the upstream demuxer), this patch attempts to find
the linked group and forward it upstream of that group.

This is done by adding upstream event/query probes on new group sinkpads
and then:
* Checking if the pad is linked or not (has a peer or not)
* If there is a peer, just let the event/query follow through normally
* If there is no peer, we find a pad to which to proxy it and return
  GST_PROBE_HANDLED if it succeeded (allowing the event/query to be properly
  returned to the initial called)

Note that this is definitely not thread-safe for the time being

https://bugzilla.gnome.org/show_bug.cgi?id=606382
2015-08-15 18:50:06 +02:00
Jan Schmidt f188a023c7 typefind: Make the H.264 typefind a tiny bit more lenient.
When we see prefix NALs before a Subset SPS has been spotted,
it might just be because the stream was truncated at the
start, so don't count those as either 'bad' or 'good' packets.
2015-08-15 12:14:56 +10:00
Thiago Santos 052d1c7b8b playsinkconvertbin: remove accept-caps handling
Just let the internal element of the bin do it instead of forcing a
caps query to do it.
2015-08-14 05:48:31 -03:00
Thiago Santos 909f494a5a videorate: fixate the pixel-aspect-ratio
If the pixel-aspect-ratio is not fixed, try to get it as close
to 1/1 as possible

https://bugzilla.gnome.org/show_bug.cgi?id=748635
2015-08-13 14:11:37 -03:00
Joan Pau Beltran 5070d6367e videorate: add support for bayer formats
Since the videorate element just duplicates or drops frames
to achieve the desired framerate, it can accept video/x-bayer media
(in any format), which are not present in the current caps.
Just add "video/x-bayer(ANY);" to the caps of the static pad template
(fixing line style to pass the indent commit hook).

https://bugzilla.gnome.org/show_bug.cgi?id=753483
2015-08-10 17:21:03 -04:00
Vineeth TM 0a3fe31f26 decodebin: fix deadend_details string leak
deadend_details need not be returned when the pad is not a deadend.
Hence checking if res value is TRUE and clearing the string instead of
passing it on

https://bugzilla.gnome.org/show_bug.cgi?id=753088
2015-08-05 14:33:35 -03:00
Nicolas Dufresne 7db376d05e videotestsrc: Don't set DTS on buffer
DTS is for encoded data and have no meaning for raw. It better to not
set it, as it's confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=752791
2015-08-04 18:00:35 -04:00
Ville Skyttä 04e3fc3f33 typefind: Treat *.umx (Unreal Music Package) as audio/x-mod
https://bugzilla.gnome.org//show_bug.cgi?id=752436
2015-07-22 12:59:03 +01:00