Commit graph

4475 commits

Author SHA1 Message Date
Jan Schmidt 94da76d301 urisourcebin: Fix buffering message aggregation.
Add locking, and handle EOS properly now that urisourcebin
uses custom events in place of real EOS events, so we
need to manually remove buffering messages and potentially
post 100% in that situation
2017-03-18 02:03:47 +11:00
Jan Schmidt 8cb57a4fe8 urisourcebin: Store slot info on the queue object too
The buffering message handling tries to look up the
slot info on the queue itself.
2017-03-18 02:03:47 +11:00
Jan Schmidt 97001a886a videotestsrc: Publish multiview-mode info in the caps
Don't allow downstream to accidentally pretend that
the output is anything than a mono or single-eye
left/right view.

https://bugzilla.gnome.org/show_bug.cgi?id=776172
2017-03-18 02:03:47 +11:00
Olivier Crête c1acb1c1fb multifdsink: Remove GValueArray from the doc
It's been a GstStructure for a long time. Also fix
a typo in the name of one of the fields.
2017-03-14 16:30:46 -04:00
Thibault Saunier 099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Nicolas Dufresne fb7d9e26ff Fix plugin filenames to match pugin names
- libgstencodebin.so is now libgstencoding.so
 - libgstximage.so is now libgstximagesink.so (meson only)

https://bugzilla.gnome.org/show_bug.cgi?id=779344
2017-03-08 20:04:17 -05:00
Jan Schmidt 4e911760d2 urisourcebin: Shrink queue2 max-size-time buffering
The expanded 4 second buffering was making radio streams that are
being delivered at real-time speeds too slow. We might need
a better plan for matching the queue2 size to incoming bitrate
in the absence of tag information or timestamping.

In uridecodebin, it used tags on the output of decodebin to
adjust the queue2 buffering, but urisourcebin doesn't have that
view - decodebin is downstream from us.
2017-03-09 01:42:14 +11:00
Sebastian Dröge 903a8863ce playbin3/urisourcebin: Enable buffering by default
This only has effect on network streams in these elements, and by
enabling it by default we get the same behaviour as in playbin2.
2017-03-07 14:59:36 +02:00
Sebastian Dröge 6eef6bd1f5 rawbaseparse: Assert that frame size is > 0
We would later divide by zero otherwise, and generally won't do the
right thing.

CID 1401383
2017-02-28 15:51:00 +02:00
Sebastian Dröge 9a62892428 rawaudioparse: Fix potential NULL pointer dereference
CID 1364606
2017-02-28 15:26:36 +02:00
Sebastian Dröge 033057cf74 decodebin3: Fix potential NULL pointer dereference on slot deactivation
CID 1363331
2017-02-28 15:17:24 +02:00
Sebastian Dröge bd9fd89d61 urisourcebin: Fix inverted check for an existing slot
CID 1363330
2017-02-28 15:15:31 +02:00
Sebastian Dröge f41198db9d decodebin3: Handle stream-start events without group id correctly
CID 1363327
2017-02-28 15:13:49 +02:00
Tim-Philipp Müller 14f04c3b69 rawparse: fix linking for audio/video libs
Broke build in gnome continuous
2017-02-25 19:20:19 +00:00
Sebastian Dröge 8d4a98d2ae rawparse: Fix meson build 2017-02-25 15:14:07 +02:00
Sebastian Dröge 38ec8f396f rawparse: Move to gst-plugins-base
https://bugzilla.gnome.org/show_bug.cgi?id=774544
2017-02-25 14:48:40 +02:00
Sebastian Dröge 498ee680fe Merge branch 'rawparse-moved-plugin' 2017-02-25 14:32:33 +02:00
Sebastian Dröge 49ac382b47 video-converter: Implement multi-threaded scaling/conversion
This adds a property to select the maximum number of threads to use for
conversion and scaling. During processing, each plane is split into
an equal number of consecutive lines that are then processed by each
thread.

During tests, this gave up to 1.8x speedup with 2 threads and up to 3.2x
speedup with 4 threads when converting e.g. 1080p to 4k in v210.

https://bugzilla.gnome.org/show_bug.cgi?id=778974
2017-02-23 21:55:29 +02:00
Sebastian Dröge 4cde35553f rawbaseparse: Drop incomplete frames at EOS
See https://bugzilla.gnome.org/show_bug.cgi?id=773666

This would ideally be solved in baseparse but that requires further
thought at this point, and in the meantime it would be good to have
rawbaseparse not assert on this but handle it gracefully instead.
2017-02-18 20:18:50 +02:00
Heekyoung Seo 0889d89407 typefindfunctions: prevent unsigned int overflow
https://bugzilla.gnome.org/show_bug.cgi?id=778432
2017-02-14 12:22:37 +02:00
Stefan Sauer 66148a770c adder: ensure the discont flag is correct
Previously it happened that reused buffer caused the discont to be on the wrong
buffers.
2017-02-10 21:41:29 +01:00
Seungha Yang 6b5617c2a7 decodebin3: Fix crash caused by slot double freeing
Probe for MultiQueue source pad might receive EOS twice,
the first is fake-eos and the other is actual EOS.
And the slot can be freed with fake-eos/EOS if the slot has no input.

Since slot freeing is async, double free can be possible.
So, decodebin3 needs to remove the probe also with slot freeing.

https://bugzilla.gnome.org/show_bug.cgi?id=777530
2017-01-31 17:16:16 +01:00
Seungha Yang e6ee68a34f decodebin3: Fix list leak on handle_stream_switch()
Free no more used list variables

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Seungha Yang 44bc10219c decodebin3: Change requested_selection to have its own memory for stream-id
"requested_selection" list might be generated by select-streams event.
And memory of stream-id(s) in select-streams is independent from that of stream-collection.

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Seungha Yang 30fe123fdb decodebin3: Change return types of stream_in_{list,collection}
Change return types of functions to get memory address of stream-id.

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Seungha Yang 10fe0497b2 playback: Fix leak on select_streams
Since gst_event_parse_select_streams() returns newly allocated
memory for stream-id(s), it should be freed explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Tim-Philipp Müller f9d110f596 videorate: fix LATENCY query
The latency query originally had a fallthrough to the default
label at the end as fallback, but that got messed up when the
DURATION and POSITION queries were added, so it then fell through
to the duration query handler instead. Restore original behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=699077
2017-01-24 01:04:53 +00:00
Tim-Philipp Müller d6c0e9072b videorate: fix duration and position query handling
Duration query would return TRUE and duration=-1. This
worked in the unit test because the unit test implementation
was a bit broken.

Both queries need to access rate with a lock.

Fix broken duration query test as well. It relied on broken
behaviour by the videorate query handler, and also it was
implemented as a downstream query rather than an upstream
query. And we must return HANDLED from the probe so that the
query we intercept actually returns TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=699077
2017-01-24 01:04:39 +00:00
Sebastian Dröge d894c19db6 samiparse: Check that the string has a non-zero length before overwriting the last byte with '\0'
https://bugzilla.gnome.org/show_bug.cgi?id=777502
2017-01-20 08:03:33 +02:00
Jan Schmidt 54bf104274 decodebin: Don't leak blocked pad references on errors
When the decodebin state change fails because of an error
message, we might not go through PAUSED->READY. Don't leak
a ref to decodebin pads due to pad blocking in that case.

This is because we return ASYNC going to PAUSED, and if
we fail before reaching PAUSED the only transition we'll
see is READY->NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=775893
2017-01-18 13:09:06 +02:00
Carl Karsten 99f4899491 videotestsrc: Add options to make ball pattern based on system time, and invert each second.
This adds some extra options that affect pattern=ball mode, allowing the
animation to be synced to running time or wall-time clock for comparing
sync across different instances / pipelines / machines.

Also added is the ability to invert the rendering colours every second,
and some different ball motion patterns.

https://bugzilla.gnome.org/show_bug.cgi?id=740557
2017-01-18 09:52:50 +11:00
Jan Schmidt 5076520502 urisourcebin: Preserve seqnum on EOS events
When converting EOS to/from our custom fake EOS event,
preserve any seqnum on the original event.
2017-01-12 22:28:50 +11:00
Edward Hervey 90e86b8638 urisourcebin: Avoid races when setting up typefind
The state of urisourcebin (and all elements contained within) can
change at any point in time, including when setting up the typefind
element.

In order to avoid ending up with typefind starting without being fully
connected, lock the state and connect to the 'have-type' signal.
2017-01-12 10:51:34 +01:00
Jan Schmidt ef8f0cdd9d urisourcebin: Drop fake EOS if the pad got relinked
If our pad got relinked in since the fake-EOS was sent to the
pad, then drop the fake-EOS event.

CID: 1398546
2017-01-11 23:18:47 +11:00
Arun Raghavan a2c2b22176 urisourcebin: Drop some dead code
The ret == GST_STATE_CHANGE_FAILURE is handled in the previous for loop
already.

CID: 1398544
2017-01-11 17:14:46 +05:30
Seungha Yang 1eedb4ea91 urisourcebin: Clear pad from pending list if it was linked
If not, the other slots might try to link the pad again.
This can happen when the demuxer has multiple src pads
and their caps are identical

https://bugzilla.gnome.org/show_bug.cgi?id=777121
2017-01-11 20:19:45 +11:00
Seungha Yang 7bd7b2209a urisourcebin: Configure typefind element for non-streaming uri
To ensure configuring adaptivedemux if needed,
setup typefind element even if uri is not matched to streaming protocol.

https://bugzilla.gnome.org/show_bug.cgi?id=776458
2017-01-11 00:26:27 +11:00
Seungha Yang 5d0628ff52 urisourcebin: Use GList for typefind elements
We need typefind elements per source element's srcpad

https://bugzilla.gnome.org/show_bug.cgi?id=776458
2017-01-11 00:26:27 +11:00
Seungha Yang 46c6e92abd urisourcebin: Remove unused signal handler variable
Remove never used handler id

https://bugzilla.gnome.org/show_bug.cgi?id=776458
2017-01-11 00:26:27 +11:00
Seungha Yang 87f21a925c urisourcebin: Clear EOS state with stream-start/flush-stop event
The EOS state marker should cleared on stream-start or flush-stop

https://bugzilla.gnome.org/show_bug.cgi?id=777009
2017-01-09 22:38:14 +11:00
Seungha Yang c10e7c5011 urisourcebin: Never push actual EOS event to slot
Due to the special nature of adaptivedemux, reconfigure happens
frequently with seek/track-change.
In very exceptional cases, the following sequence is possible:
  * EOS event is pushed to queue element and still buffers are queued
  * During draining remaining buffers, reconfiguration downstream
happens due to track switch.
  * The queue gets a not-linked flow return from downstream
  * Because the sinkpad is EOS, the queue registers an
    error on the bus, causing the pipeline to fail.

Avoid the sinkpad getting marked EOS in the first place, by using a
custom event in place of EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=777009
2017-01-09 22:31:46 +11:00
Thibault Saunier fe0e51914a encodebin: Fix stream_group_free when creating it went bad
Avoiding trying to use NULL pointers
2017-01-04 11:43:08 -03:00
Mark Nauwelaerts 28f4e7db12 playsink: do not link to audio or video filter using padname
... as a sinkpad need not be called "sink", and it is not the case
for e.g. timeoverlay (and friends).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=776623
2017-01-04 15:09:00 +01:00
Tim-Philipp Müller ad53caf059 multihandlesink: fix some property descriptions 2017-01-04 13:44:53 +00:00
Jan Schmidt c2a91d2cfd playback: Fix a small race on decodebin/parsebin shutdown.
When shutting down decodebin2 and parsebin, they set their
output pads to flushing, and there is a very small window
where elements might send a sticky event such as a tag event
(which silently fails due to flushing) and then sends a buffer,
and the buffer will return GST_FLOW_ERROR because it can't
forward sticky events. The element will then send an error
message on the bus. This can also happen when elements send EOS
just as shutdown is happening. Since we're about to destroy all
the elements inside parsebin and decodebin anyway, just discard
error messages from them.

A nicer but more difficult fix for GStreamer 2.0 is to make
all event pushing / handling in core return a GstFlowReturn
like buffers do, so we can report a FLUSHING state cleanly.
2017-01-03 02:27:51 +11:00
Tim-Philipp Müller b00bba5d43 encodebin: fix queue property types when setting 2017-01-02 12:56:04 +00:00
Song Bing 01f467f6a4 encodebin: allow more buffers in output queue for better performance
https://bugzilla.gnome.org/show_bug.cgi?id=744191
2017-01-02 12:56:04 +00:00
Arun Raghavan e112a78826 audioconvert: Relocate a NULL check before accessing converter
CID 1396745
2017-01-02 17:56:36 +05:30
Carlos Rafael Giani a257a177c3 audiotestsrc: Fix incorrect start of tick waveform
Make sure ticks start with an accumulator value of 0 by incrementing it
after filling in samples instead of before and by resetting the accumulator
every time a tick begins. This prevents it from being discontinuous at the
beginning of the tick.

https://bugzilla.gnome.org/show_bug.cgi?id=774050
2016-12-23 16:51:07 +00:00
Nicola Murino 07646dd11b tcpclientsrc: add timeout property
https://bugzilla.gnome.org/show_bug.cgi?id=749567
2016-12-21 10:05:49 +02:00