Commit graph

4571 commits

Author SHA1 Message Date
Sebastian Dröge
ce693174f4 decodebin2: Put the correct element srcpad into the topology for the very last element of a chain
We were putting the decode pad there, which is the ghostpad linked to
the last element. The decode pad is already in the pad field.
2016-12-17 22:01:10 +02:00
Sebastian Dröge
46835f550d decodebin2: Put the correct pad into the stream-topology if a parser/converter is used
We have to take the capsfilter into account then as the elements are not
linked directly. Previously this caused NULL be set in these cases.
2016-12-17 22:01:10 +02:00
Thibault Saunier
d67f945177 encoding-profile: Fix documentation and port to gtk markdown
And remove some trailling whitepsaces
2016-12-16 11:27:31 -03:00
Sebastian Dröge
991758c3d6 decodebin: For adaptive streaming, ensure to put the buffering multiqueue after a parser or demuxer
There are cases when there is no demuxer involved that could do the
buffering, e.g. HLS with raw MP3 or AAC. In this case we want to place
the buffering multiqueue after the parser.

Before this change, we've considered the first element after the
adaptive streaming demuxer as a parser. This is not always true, e.g.
id3demux. Instead we now wait until we actually have a parser (or
decoder).

Fixes playback on such HLS streams.
2016-12-15 16:31:20 +02:00
Seungha Yang
c4929b8647 playback: Add ANY caps features to default text raw caps
Raw text caps with any caps features should be also default raw caps

https://bugzilla.gnome.org/show_bug.cgi?id=775967
2016-12-12 11:10:50 +02:00
Seungha Yang
49653b058a decodebin3: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
582c7cef18 decodebin3: More cleanup DecodebinOutputStream and MultiQueueSlot
When removing DecodebinInputStream, cleanup DecodebinOutputStream and
MultiQueueSlot also if they were drained.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
6bd7a5602c decodebin3: Drop duration query during _input_pad_unlink ()
Playbin3 takes lock when querying duration and handling
stream-collection message. So,to post stream-collection message,
duration query should be dropped when input pad is being unlinked.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
7e76405895 decodebin3: Update stream-collection with _input_pad_unlink()
Since parsebin does not post new stream-collection message when
it was being removed, decodebin3 should update it itself.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
f08e4592a4 decodebin3: Cleanup no more used DecodebinInput
Remove DecodebinInput using gst_element_call_async() API.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
bd6ec225b9 decodebin3: Cleanup no more used MultiQueueSlot
Since MultiQueueSlot cannot be removed inside of streaming thread,
use gst_element_call_async() API.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
4fcbcf4e48 decodebin3: Send custom-eos event to notify drained state
Likewise how urisourcebin is doing, use custom event if other streams
are still alive.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
f4d6aa7167 playbin3: Reconfigure playsink again with pad-removed
If selected streams and actived streams are matched,
do reconfigure of playsink again with pad-removed signal

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
858ee3d913 playback: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
cbd4bcd7a4 urisourcebin: Try to link output slot before cleanup
Before cleaning up output slot, check pending pads first, if available.
Then, cleanup it only if linking was failed.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
5760bd4543 urisourcebin: Cleanup unused output slot
Since urisourcebin cannot cleanup unused output slot
in streaming thread, it will be handled in thread pool
with gst_element_call_async ().

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Tim-Philipp Müller
f14a307638 rawvideoparse: fix typos in property description 2016-12-05 18:17:30 +00:00
Reynaldo H. Verdejo Pinochet
13a491fb6c typefind: add another test to itc typefinder
Report certainty after every test passes.

Additionally:

 - Remove self-explanatory comment.
2016-12-02 16:13:24 -08:00
Sebastian Dröge
d452ad0eca ssaparse: Free initialization section before storing the next one
If getting multiple caps events.

https://bugzilla.gnome.org/show_bug.cgi?id=775480
2016-12-01 19:57:47 +02:00
Sebastian Dröge
52d7441942 audioconvert: Error out if mapping input/output buffer failed 2016-11-30 10:55:16 +02:00
Sebastian Dröge
1e64800278 audioconvert: Don't map the input buffer in in-place mode
Input and output buffer are the same, let's not do unnecessary work.

https://bugzilla.gnome.org/show_bug.cgi?id=775369
2016-11-30 10:49:58 +02:00
Sebastian Dröge
1631a38640 audioconvert: Don't call transform_ip() in passthrough mode
https://bugzilla.gnome.org/show_bug.cgi?id=775369
2016-11-30 10:36:14 +02:00
Jan Alexander Steffens (heftig)
58be309344 multihandlesink: Fix buffers-queued being off by one
max_buffer_usage is the index of the oldest buffer in the queue,
starting at zero, not the number of buffers queued.

find_limits returns the index of the oldest buffer that satisfies the
limits in its min_idx parameter, not the number of buffers needed. Fix
this use too in order to keep passing the tests that read
buffers-queued.

https://bugzilla.gnome.org/show_bug.cgi?id=775351
2016-11-29 19:14:10 +02:00
Jan Alexander Steffens (heftig)
8b9ebd8f88 multihandlesink: Update bufpos in a separate pass
If a client gets dropped and the iteration gets restarted, bufpos is
incremented again for all clients that preceded the dropped one, causing
havoc.

Adjust the bufpos for all clients first before trying to drop any.

https://bugzilla.gnome.org/show_bug.cgi?id=774908
2016-11-29 19:13:00 +02:00
Garima Gaur
6c5381eda6 playbin: Fix caps memory leak in usage of gst_static_caps_get() API
https://bugzilla.gnome.org/show_bug.cgi?id=775310
2016-11-29 13:42:28 +02:00
Petr Kulhavy
010b9547d3 audio-converter: optimize endian conversion
Optimize LE<->BE conversion by adding a dedicated fast path instead of
using the generic converter. Implement transform_ip function in order to do the
endian swap in place.

This saves buffer allocation for the intermediate format, can be done in place
and also performs the conversion in one step instead of unpack-convert-pack.

For all bit widths the naive algorithm is implemented, which provides the best
performance when compiled with -O3. ORC was considered but eventually removed
as it requires a dedicated function for in-place conversion (due to the
"restrict" parameters).

A more complex algorithm for the 24-bit conversion with unrolled loop and
32-bit processing is implemented in the #if 0 section. It performs better if
compiled with -O2. With -O3 however the naive algorithm performs better.

https://bugzilla.gnome.org/show_bug.cgi?id=773073
2016-11-28 17:24:17 +02:00
Sebastian Dröge
da981c85a1 rawparse: Whitespace cleanup 2016-11-28 14:26:17 +02:00
Garima Gaur
b2b8e77566 subtitleoverlay: Fix caps memory leak when failing to get sinkpad from subtitle renderer
https://bugzilla.gnome.org/show_bug.cgi?id=775224
2016-11-28 13:56:33 +02:00
Sebastian Dröge
a4f1d4a265 rawbaseparse: Fix output buffer size trimming
For frame->buffer, baseparse is doing that automatically for us. For
frame->output_buffer it doesn't and assumes that the subclass is already
doing that. Consistency!
2016-11-27 12:40:53 +02:00
Sebastian Dröge
0c79a06dd1 rawparse: Properly align raw audio/video output buffers
That is, aligned to the basic type for audio and to 32 bytes for video.
Fixes crashes if the raw buffers are passed to SIMD processing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=774428
2016-11-27 11:45:33 +02:00
Matthew Waters
2fdccfd64f typefind: bounds check windows ico detection
Fixes out of bounds read

https://bugzilla.gnome.org/show_bug.cgi?id=774902
2016-11-23 21:37:27 +11:00
Reynaldo H. Verdejo Pinochet
7e14875458 typefind: add typefinder for Apple/iTunes itc artwork files
Avoids audio/mpeg false-positive described at:

https://bugzilla.gnome.org/show_bug.cgi?id=773172
2016-11-21 10:53:13 -08:00
Jan Schmidt
8a20b06e0b playsink: warn if a custom sink is set that has no 'sink' pad 2016-11-17 00:43:58 +11:00
Wonchul Lee
08ee940de2 playbin3: remove dead code
It never reach into this code path, custom_combiner always not null
here.

https://bugzilla.gnome.org/show_bug.cgi?id=774454
2016-11-16 00:17:18 +11:00
Seungha Yang
364a45267e decodebin3: Clear saw_eos flag of DecodebinInputStream by FLUSH event
Likewise how GstPad is doing, saw_eos flag of DecodebinInputStream
must be cleared by FLUSH event.

https://bugzilla.gnome.org/show_bug.cgi?id=774343
2016-11-15 21:38:27 +11:00
Wonchul Lee
8b95d17f75 playbin3: Fix deadlock when adding multiple parsebin
https://bugzilla.gnome.org/show_bug.cgi?id=773131
2016-11-15 20:37:00 +11:00
Thibault Saunier
5bdb38995f meson: Fix build when orc is disabled
Making sure not to use the orc_dep variable in case
orc has been explicitely disabled.
2016-11-14 17:26:02 -03:00
Scott D Phillips
ff8d49a4c8 Use intermediate guint when handling GstVideoMultiviewFlags
The underlying integer type of the enum GstVideoMultiviewFlags is
implementation defined and may not have the same size as guint.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:51:30 +02:00
Joris Valette
658ee6f0db videorate: Add fixed rate property
https://bugzilla.gnome.org/show_bug.cgi?id=699077
2016-11-04 14:01:54 -03:00
Sebastian Dröge
7528e34fd3 meson: Add pbtypes plugin 2016-11-02 11:03:42 +02:00
Jan Schmidt
2c786edb99 pbtypes: Add a stub plugin that owns the plugins-base dynamic types
https://bugzilla.gnome.org/show_bug.cgi?id=750079
2016-11-02 11:24:11 +11:00
Changbok Chea
14ce96a459 urisourcebin: Fix adaptive demuxer's property checking and buffering setting
- Add adaptive demuxer's 'connection-speed' property checking
- Set adaptive demuxer q2 buffering property via urisrc use_buffering value

https://bugzilla.gnome.org/show_bug.cgi?id=772550
2016-11-02 11:23:44 +11:00
Seungha Yang
6dbfbead61 urisourcebin: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-11-01 20:06:43 +02:00
Stian Selnes
22ccb687fa videotestsrc: Make snow deterministic
Deterministic generation of snow and smpte is important for tests so
that it's not affected by other videotestsrc elements in current or
possibly previous tests.

https://bugzilla.gnome.org/show_bug.cgi?id=773102
2016-11-01 20:05:18 +02:00
Petr Kulhavy
ca7e31f80d audioconvert: optimize mask calculation
find_suitable_mask() had complexity O(n^2) on the number of bits.
For common case like 2-channel audio the mask was calculated in about 4k loop
cycles.

Optimize both n_bits_set() and find_suitable_mask() to O(n) where n is the
number of bits set in the mask.

https://bugzilla.gnome.org/show_bug.cgi?id=772864
2016-11-01 20:02:14 +02:00
hoonhee.lee
1820c18b0f parsebin: Rename variables include 'decode' to 'parse'
https://bugzilla.gnome.org/show_bug.cgi?id=772832
2016-11-01 20:01:20 +02:00
Wonchul Lee
dc7fd9c1f1 urisourcebin: Fix GST_TYPE_URI_SOURCE_BIN macro typo
https://bugzilla.gnome.org/show_bug.cgi?id=772445
2016-11-01 20:00:27 +02:00
Wonchul Lee
7c9626a3f4 urisourcebin: fix to log event pointer
https://bugzilla.gnome.org/show_bug.cgi?id=772445
2016-11-01 20:00:27 +02:00
Wonchul Lee
9e8c0d224b urisourcebin: Make use of adaptive demuxer variable
https://bugzilla.gnome.org/show_bug.cgi?id=772445
2016-11-01 20:00:27 +02:00
Tim-Philipp Müller
7d8cc8a2e6 rawparse: pass flow returns upstream
rawvideoparse wouldn't error out on not-negotiated,
but would just keep on going, because it didn't pass
the flow return value back to the parent class and
thus upstream, so the source wouldnt' stop streaming.
2016-10-29 11:31:28 +01:00
Graham Leggett
98ea3e4647 decodebin3: Fix assertion failure when unreffing NULL stream caps
GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object != NULL' failed

https://bugzilla.gnome.org/show_bug.cgi?id=773441
2016-10-25 12:43:22 +03:00
Seungha Yang
5f2c0c8ea7 decodebin3: More SELECTION_LOCK when linking to slot
Since there can be multiple parsebin in a decodebin3,
linking parsebin with MultiQueueSlot should be protected also.

https://bugzilla.gnome.org/show_bug.cgi?id=772855
2016-10-14 08:29:46 +02:00
Edward Hervey
8485a8d786 playback: GstStreamType is a flag
Therefor don't use equality
2016-10-13 11:42:28 +02:00
Edward Hervey
acc3a9d242 playback: decodebin3 and parsebin are streams-aware
Elements within can add/remove pads at anytime without complying
with the fallback system.

https://bugzilla.gnome.org/show_bug.cgi?id=772741
2016-10-12 15:05:55 +02:00
Wonchul Lee
778ffac86a parsebin: re-use existing compare_factories utils func
https://bugzilla.gnome.org/show_bug.cgi?id=772676
2016-10-11 16:08:27 +01:00
Arun Raghavan
4de66632d7 meson: Enable Orc in build
Top-level meson.build code updated from gst-plugins-good.
2016-10-03 11:01:24 +05:30
Edward Hervey
262b9bfd07 playbin3: Remove fallback properties/signals
These can all be used via the GstStream API

https://bugzilla.gnome.org/show_bug.cgi?id=769079
2016-09-27 10:11:56 +01:00
Sebastian Dröge
0c151f6bb2 streamsynchronizer: Correctly calculate group start times in reverse playback mode
We have to calculate from the segment.stop, not the segment.start, as
playback goes from stop to start. This fix works around another race
condition in streamsynchronizer in my testcase.

See https://bugzilla.gnome.org/show_bug.cgi?id=771479
2016-09-20 15:13:52 -04:00
Sebastian Dröge
031f256584 audiotestsrc: Fix segment boundary checking for reverse playback 2016-09-17 07:19:14 -04:00
Sebastian Dröge
cf18fae9de audiotestsrc: Don't adjust segment time in seek handler
basesrc already did that very well for us, adjusting it again on top of
that just breaks various non-standard seeks.
2016-09-14 16:51:30 +02:00
Sebastian Dröge
d5e8b7df6c playback: Use new gst_bin_set_suppressed_flags() API instead of worrying about the flags in multiple places 2016-09-12 18:37:21 +02:00
Sebastian Dröge
32aebd7baf playback: Mark internal functions as G_GNUC_INTERNAL 2016-09-01 13:07:07 +03:00
Wonchul Lee
0cc3f199ca playbackutils: Move compare_factories_func
Move _decode_bin_compare_factories_func function to playbackutils

https://bugzilla.gnome.org/show_bug.cgi?id=770692
2016-09-01 13:06:51 +03:00
Josep Torra
970ea49d30 decodebin: forward sticky events on multiqueue
When connecting a demuxer through a multiqueue ensure to copy sticky
events in order to allow the following factory being properly
checked that it is functional.

https://bugzilla.gnome.org/show_bug.cgi?id=769580
2016-08-25 11:22:46 +02:00
Matej Knopp
89554f665b parsebin: do not set global tags to stream
https://bugzilla.gnome.org/show_bug.cgi?id=770053
2016-08-21 15:51:34 +01:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Sebastian Dröge
2ebbd1c9fa videorate: Implement basic support for reverse playback
This is enough for making it work in GES, but it's unclear if all the various
property combinations are working correctly. It's an improvement over what was
there before in any case, which was to just drop all buffers if rate < 0.0.

https://bugzilla.gnome.org/show_bug.cgi?id=769624
2016-08-19 15:57:01 +03:00
Luis de Bethencourt
685bb8edb3 rawvideoparse: fix typo in comment
Small typo in the comment explaining the code fixed by the previous commit.
Fixing it.
2016-08-19 12:25:48 +01:00
Sebastian Dröge
d594d4df6c rawvideoparse: Revert last commit and actually remember the physically last plane
Instead of just always taking the last one as before.
2016-08-19 14:19:38 +03:00
Luis de Bethencourt
99e2745636 rawvideoparse: remove unused assignment
Value in last_plane will be overwritten before used, remove unused
asignment.

Fixes commit 91cf5ac69f
CID 1371462
2016-08-19 11:57:35 +01:00
Carlos Rafael Giani
e5b70d384c rawvideoparse: Compute plane offsets & strides if no custom ones are set
This is useful to ensure that the offsets and strides are computed if
only width, height, format etc. in the property config are set.

https://bugzilla.gnome.org/show_bug.cgi?id=769797
2016-08-18 09:21:16 +03:00
Tim-Philipp Müller
d2e5361927 playbin3: add "element-setup" signal
Allows configuration of plugged elements.

https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-08-08 20:04:58 +01:00
Guillaume Desmottes
f66e6839c5 decodebin3: don't leak alternate inputs
Fix leaks (including parsebin elements) with this pipeline:
playbin3
uri=http://127.0.0.1:8079/defaults/exMPD_BIP_TC1/exMPD_BIP_TC1.mpd

https://bugzilla.gnome.org/show_bug.cgi?id=769270
2016-08-04 11:18:05 +02:00
Guillaume Desmottes
487ef12fd1 decodebin3: fix output->decoder_{sink,src} leak
output->decoder_sink and output->decoder_src are both going to be
replaced in the 2 branches of the following 'if'.

https://bugzilla.gnome.org/show_bug.cgi?id=769270
2016-08-03 17:49:45 +02:00
Guillaume Desmottes
acbaa83450 decodebin3: fix tag list leak
https://bugzilla.gnome.org/show_bug.cgi?id=769270
2016-08-03 17:49:45 +02:00
Guillaume Desmottes
0b77ede079 decodebin3: consume select-streams event
https://bugzilla.gnome.org/show_bug.cgi?id=769270
2016-08-03 17:49:45 +02:00
Guillaume Desmottes
ba74c06721 decodebin3: fix collection ref handling
gst_stream_collection_add_stream() consumes the collection reference
passed to it but gst_stream_collection_get_stream() is (transfer none).

Fix this pipeline:

playbin3
uri=http://127.0.0.1:8079/defaults/exMPD_BIP_TC1/exMPD_BIP_TC1.mpd

https://bugzilla.gnome.org/show_bug.cgi?id=769270
2016-08-03 17:40:05 +02:00
Guillaume Desmottes
500e4117bb decodebin3: handle full removal of streams
Fix the
validate.file.playback.disable_subtitle_track_while_paused.* validate
scenarios when using playbin3.

https://bugzilla.gnome.org/show_bug.cgi?id=769298
2016-08-03 17:37:30 +02:00
Sebastian Dröge
4a0b3da3ae rawaudioparse: Use G_GINT64_MODIFIER for portability
https://bugzilla.gnome.org/show_bug.cgi?id=769295
2016-07-29 10:49:26 +03:00
Sebastian Dröge
e04d992ddc unalignedaudioparse: Fix element factory name of inner parser 2016-07-29 10:07:23 +03:00
Tim-Philipp Müller
43524d637c parsebin: maintain original order when creating fallback stream collection 2016-07-26 15:23:15 +01:00
Carlos Rafael Giani
3dfcc79207 rawparse: Remove old parser code and wrap new parsers in old elements
https://bugzilla.gnome.org/show_bug.cgi?id=767011
2016-07-26 13:44:39 +03:00
Carlos Rafael Giani
d508525119 rawparse: Add new raw audio and video parser elements
The new rawaudioparse and rawvideoparse elements are based on GstBaseParse
and completely replace audioparse and videoparse

https://bugzilla.gnome.org/show_bug.cgi?id=767011
2016-07-26 13:44:39 +03:00
Jan Schmidt
828cb0d86a decodebin: Send stream-group-done to unblock downstream
When processing EOS for a pad, send a stream-group-done
for the pad in case downstream is waiting for more
data on this stream before it can process related
streams from the group.

https://bugzilla.gnome.org/show_bug.cgi?id=768995
2016-07-25 19:56:17 +10:00
Guillaume Desmottes
c1f37edfd9 playbin3: fix collection leak
The collection referenced owned by playbin3 was not released when it was
destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=769080
2016-07-25 09:02:53 +02:00
Guillaume Desmottes
2c0a4d20d4 decodebin3: fix collection refcounting
My collection leak fix 83f30627cd
introduced a crash in this scenario: audiotestsrc ! decodebin3 ! fakesink

The reference handling of collection in decodebin3 wasn't very clear and
my attempt to fix the leak introduced a regression where we went one
reference short in some other scenarios.

Fixing this by:
- Giving a strong reference to DecodebinInput making things clearer
- Fixing get_merged_collection() which was sometimes returning an
  existing reference and sometimes a new one.

https://bugzilla.gnome.org/show_bug.cgi?id=769080
2016-07-25 09:02:53 +02:00
Tim-Philipp Müller
e1eed66eb8 docs: urisourcebin: fix typo 2016-07-22 14:42:31 +01:00
Jan Schmidt
e68c85e5a5 playback: Flesh out docs a bit for new elements
Add some more text to the docs for urisourcebin,
parsebin, decodebin3 and playbin3, including a warning
that they are unstable API for now
2016-07-22 23:21:36 +10:00
Tim-Philipp Müller
f25eee6f4b docs: add playbin3, decodebin3, parsebin, urisourcebin to docs
Docs still need some fleshing out though.
2016-07-22 12:52:12 +01:00
Wim Taymans
c1cb395f66 audioresample: after a reset, recalculate the ouput size
After we reset the resampler, there is no history anymore in the resampler
and the previously calculated output size is no longer valid.
Recalculate the new output size after a reset to make sure we don't try
to convert too much.
2016-07-19 18:20:57 +02:00
Tim-Philipp Müller
92786741df subparse: fix some leaks
Fixes check-valgrind for subparse test.
2016-07-19 13:26:06 +01:00
Guillaume Desmottes
6c58f5ee2f decodebin3: actually check result of accept caps query
We were just checking if the query was handled, not its result.

Also fix a leak as gst_pad_query() was not consuming the query.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
2016-07-18 14:54:35 +01:00
Guillaume Desmottes
9834782afa playbin3: fix stream leak
The stream returned by gst_message_streams_selected_get_stream() is
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
2016-07-18 13:58:39 +01:00
Guillaume Desmottes
83f30627cd decodebin3: fix collection leak
The collection owned by GstDecodebin3 has to be unreffed when disposing.

gst_event_new_stream_collection() doesn't consume the collection passed
to it so no need to give it an extra ref.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
2016-07-18 13:58:33 +01:00
Guillaume Desmottes
c1db195ba5 decodebin3: fix stream leaks
MultiQueueSlot owns a ref on the active stream so it should release it
when being freed.

DecodebinInputStream owns ref on the active and pending stream so they
should be dropped when being freed.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
2016-07-18 13:57:44 +01:00
Guillaume Desmottes
e2263673d1 decodebin3: fix event leaks
Returning GST_PAD_PROBE_HANDLED means we are taking care of unreffing
the probe info.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
2016-07-18 13:57:44 +01:00
Guillaume Desmottes
51055f1924 decodebin3: fix caps leaks
gst_stream_get_caps() returns a reffed caps.

The caps passed to gst_query_set_caps_result() are not transfered.

The caps in gst_parse_pad_stream_start_event() was either acquired
using gst_pad_get_current_caps() which returns a new ref or
explicitly reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
2016-07-18 13:57:10 +01:00
Guillaume Desmottes
c1d55f29a1 playbin3: fix leaks of collection returned by message parse API
gst_message_parse_stream_collection() and
gst_message_parse_streams_selected() actually return a reffed
GstStreamCollection.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
2016-07-15 16:43:07 +01:00
Víctor Manuel Jáquez Leal
c646c62a02 subparse: don't reset allowed tags
When a discont buffer is processed, the state is re-initialized, which
nullifies the allowed_tags.

The problem is when a subrip string with tags is processed and allowed_tags is
NULL. The function subrip_unescape_formatting() calls g_strjoinv with a
str_array as NULL, leading to a GLib-CRITICAL.

This patch removes the allowed_tags resetting, in parser_state_init(), but
move it into gst_sub_parse_format_autodetect().

https://bugzilla.gnome.org/show_bug.cgi?id=768525
2016-07-07 19:38:07 +02:00
Edward Hervey
4b6e43fa5b parsebin: Fix authors and description 2016-06-30 17:28:02 +02:00
Edward Hervey
5baae6df6f playback: Remove uridecodebin3
This was committed by mistake. The solution forward is to use the
appropriate combination of urisourcebin and decodebin3
2016-06-30 17:27:53 +02:00
Edward Hervey
d514e79bee playback: New elements
With contributions from Jan Schmidt <jan@centricular.com>

* decodebin3 and playbin3 have the same purpose as the decodebin and
playbin elements, except make usage of more 1.x features and the new
GstStream API. This allows them to be more memory/cpu efficient.

* parsebin is a new element that demuxers/depayloads/parses an incoming
stream and exposes elementary streams. It is used by decodebin3.
It also automatically creates GstStream and GstStreamCollection for
elements that don't natively create them and sends the corresponding
events and messages

* Any application using playbin can use playbin3 by setting the env
variable USE_PLAYBIN3=1 without reconfiguration/recompilation.
2016-06-30 14:15:47 +02:00
Sebastian Dröge
5de9d5809b audioconvert: Handle fallback channel mask for mono correctly
It's 0 and no mask should be set for mono at all.

https://bugzilla.gnome.org/show_bug.cgi?id=757472
2016-06-29 18:14:51 +02:00
Sebastian Dröge
06ea25ade3 playsink: Don't send another step event to the audio-sink if we got step-done from there
Otherwise we would end up with a deadlock as the audio-sink emits step-done
from its streaming thread.
2016-06-27 20:55:00 +03:00
Sebastian Dröge
88d8f81fcc playsink: Force STEP events on the video-sink for GST_FORMAT_BUFFERS
It does not make much sense for audio sinks.
2016-06-27 20:55:00 +03:00
Guillaume Desmottes
afdb7d3f32 opusenc, subtitleoverlay: use MAY_BE_LEAKED flag
Flag caps that are cached locally and will never be freed.

https://bugzilla.gnome.org/show_bug.cgi?id=767155
2016-06-02 13:11:11 +01:00
Sebastian Dröge
17d04998c0 decodebin: Create a new decode element with the parser/convert capsfilter if there is a multiqueue after the parser
https://bugzilla.gnome.org/show_bug.cgi?id=767102
2016-06-02 10:50:58 +03:00
Guillaume Desmottes
92343b6f20 playbin: fix suburidecodebin leak
We take a ref before removing which was never freeded.
The element is still alive anyway because the group has its own ref as
well.

Fix a leak with the 'test_suburi_error_wrongproto' test.

https://bugzilla.gnome.org/show_bug.cgi?id=766515
2016-05-17 09:55:51 +03:00
Tim-Philipp Müller
7c2cabd407 playbin: add "element-setup" signal
Allows configuration of plugged elements.

https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-05-16 09:23:45 +01:00
Carlos Rafael Giani
f6e6264711 rawparse: Add unaligned raw audio parsing to audioparse and add new element
This helps in cases where raw audio data is being delivered, but the
buffers do not come in sample aligned sizes. The new unalignedaudioparse
bin can be autoplugged and configures an internal audioparse element to
align the data. audioparse itself gets support for audio/x-unaligned-raw
input caps; the output caps then contain the same information, except that
the name is changed to audio/x-raw (since audioparse aligns the data).
This ensures that souphttpsrc ! audioparse still works.

https://bugzilla.gnome.org/show_bug.cgi?id=689460
2016-05-15 13:19:48 +03:00
Sebastian Dröge
46e808a300 multihandlesink: Warn if trying to change the state from the streaming thread
Instead of silently returning GST_STATE_CHANGE_FAILURE.
2016-05-05 13:17:53 +03:00
Alessandro Decina
fe4e9bb02c decodebin: an element can negotiate before we block it
When we initialize an element in decodebin, we 1) set it to PAUSED and
push sticky events on its sinkpad to trigger negotiation 2) block its
src pad(s) to detect CAPS events. We can't block before 1) as that
would lead to a deadlock.

It's possible (and common) tho that an element configures its srcpad
during 1) and before 2). Therefore before this change we would
typically block and expose an element's pad only once the element
output its first buffer, triggering sticky events to be resent. One
consequence of this behaviour is that it sometimes broke
renegotiation.

With this change now we consider a pad ready to be exposed when it's
->blocked or has fixed caps (which were set before we could block it).

https://bugzilla.gnome.org/show_bug.cgi?id=765456
2016-05-04 10:13:44 +03:00
Sebastian Dröge
7ba7c58f99 smartencoder: Only accept TIME segments for real
... and don't try to push pending data without ever having received a SEGMENT
event before EOS

https://bugzilla.gnome.org/show_bug.cgi?id=765541
2016-04-25 17:17:00 +03:00
Vivia Nikolaidou
2b53646715 decodebin: Always add a multiqueue in single-stream use-buffering pipelines
If we are configured to use buffering and there is no demuxer in the chain, we
still want a multiqueue, otherwise we will ignore the use-buffering property.
In that case, we will insert a multiqueue after the parser or decoder - not
elsewhere, otherwise we won't have timestamps.

https://bugzilla.gnome.org/show_bug.cgi?id=764948
2016-04-19 10:19:07 +03:00
Vincent Penquerc'h
d1ecd3cfa7 subparse: fix build with GCC 4.6.3
gstsubparse.c: In function ‘parse_subrip’:
gstsubparse.c:988:7: error: ignoring return value of ‘strtol’, declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors

https://bugzilla.gnome.org/show_bug.cgi?id=765042
2016-04-15 13:33:41 +01:00
Vivia Nikolaidou
9d96959dde decodebin: Rename misleading variable is_parser_converter into is_parser
In that place, the variable isn't checking whether the element is a
converter, only if it is a parser.

https://bugzilla.gnome.org/show_bug.cgi?id=764948
2016-04-12 17:34:18 +03:00
Jan Schmidt
2dd399356f subtitleoverlay: Don't complain when stream-start is the first event.
When blocking the subtitle pad, it's expected that stream-start
is the first event, and that it can precede caps arriving on the
peer pad - in fact the caps can only have arrived on the peer
pad when it was pre-primed with sticky events previously.

Instead, just pass the stream-start and don't block, because
stream-start is sticky anyway.
2016-04-06 21:03:19 +10:00
Jan Schmidt
c27df799bf subparse: WebVTT Cue identifiers are optional
Don't require a cue identifier preceding the time range line
when parsing WebVTT. We could also store the CueID, but it's
not using anywhere, so just ignore it for now.
2016-04-06 21:00:10 +10:00
Sebastian Dröge
6788003912 videorate: Don't fill up the segment with duplicate buffers if drop_only==TRUE 2016-04-03 11:40:50 +03:00
Sebastian Dröge
eda44c640e videorate: Remove dead code
We never get into this code path at all if drop_only==TRUE.
2016-04-03 11:38:28 +03:00
Frédéric Bertolus
2626c02149 videorate: avoid useless buffer copy in drop-only mode
Make writable the buffer before pushing it lead to a buffer copy. It's
because a reference is keep for the previous buffer.
The previous buffer reference is only need to duplicate the buffer. In
drop-only mode, the previous buffer is release just after pushing the
buffer so a copy is done but it's useless.

https://bugzilla.gnome.org/show_bug.cgi?id=764319
2016-04-03 11:37:52 +03:00
Jan Schmidt
1851777b94 subparse: Add more parsing guards
Insert extra checks for the validity of the incoming
data when parsing subrip/webvtt content and debug log
output for invalid content.

Should fix Coverity warnings.
2016-03-29 22:19:47 +11:00
Luis de Bethencourt
01778c5ac9 subparse: add missing break between formats
A break is missing at the end of case GST_SUB_PARSE_FORMAT_LRC or it will
fallthrough to WebVTT. This fixes commit fd2a14144a.
2016-03-29 11:27:40 +02:00
Wim Taymans
f8e4c801eb audioresample: remove last ORC remains 2016-03-28 13:25:55 +02:00
Wim Taymans
524ea147cc audio-resampler: improve filter construction
Remove some unused variables from the inner product functions.
Make filter coefficients by interpolating if required.
Rename some fields.
Try hard to not recalculate filters when just chaging the rate.
Add more proprties to audioresample.
2016-03-28 13:25:52 +02:00
Wim Taymans
ed747492ef audio-resampler: add reset function
Add a function to reset the audio-resampler.
Use new function in audio-converter
Use the new functions in gstaudioresample and fixup drain functions.
2016-03-28 13:25:51 +02:00
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