Commit graph

4519 commits

Author SHA1 Message Date
Seungha Yang 7a236e2302 playbin3: Delay linking text output until video stream is shown
We are not sure that which stream's collection arrives first
when there are multiple parsebins such as adaptive streaming.

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Satya Prakash Gupta 3cc824c9ce encodebin: fix possible pad ref leak in error code path
https://bugzilla.gnome.org/show_bug.cgi?id=785065
2017-07-19 09:07:27 +01:00
Edward Hervey 6ccba23752 playbin3: We only care about source pads going away 2017-07-18 13:05:06 +02:00
Edward Hervey 651a0fe312 decodebin3: use lock macro where applicable 2017-07-18 13:05:06 +02:00
Thibault Saunier 4b3798fedc decodebin3: Protect fields related to streams handling with the SELECTION_LOCK
Fields related to stream handling (input_streams,
output_streams, slots, guint slot_id) where used totally unprotected
until know.

This lead to several races, especially playing back RTSP streams.

To protect those fields, the OBJECT_LOCK can not be used as we sometimes
need to be able to post message on the bus while holding it.

decodebin3 already has a lock to manage stream selection, and in the end
it makes sense to protect all the stream management fields with the same
lock which is why we reuse the SELECTION_LOCK here.

https://bugzilla.gnome.org/show_bug.cgi?id=784012
2017-07-18 13:05:06 +02:00
Edward Hervey 1188345886 decodebin3: Protect dbin->collection usage
Use the selection lock to protect dbin->collection access

https://bugzilla.gnome.org/show_bug.cgi?id=784012
2017-07-18 11:25:53 +02:00
Tim-Philipp Müller 88fea7c511 adder: fix docs typo 2017-07-14 13:48:53 +01:00
Tim-Philipp Müller cb5a2dcfbb adder: document caps negotiation raciness and workaround
https://bugzilla.gnome.org/show_bug.cgi?id=777915
2017-07-14 13:40:07 +01:00
Seungha Yang 60cae68c4e decodebin3: Push EOS to output stream if they are all drained
decodebin3 checks input streams and pushes EOS if all input streams
are EOSed. If not, fake EOS is pushed to the corresponding slot.

When adaptivedemux is used with multi-track configuration,
adaptivedemux never ever push EOS to non-selected track
because streaming thread for the slot stops with not-linked flow return.
So, decodebin3 should generate EOS itself to finish playback.

https://bugzilla.gnome.org/show_bug.cgi?id=777735
2017-07-13 07:32:42 +02:00
Seungha Yang fc67a689af urisourcebin: Push EOS if slot is still eos state
linked input of slot can be old input, so urisourcebin should check
eos state to figure out whether it's new one or not.
If not, urisourcebin never ever forwards EOS to downstream at the end
of presentation, because the old input is still there without removal

https://bugzilla.gnome.org/show_bug.cgi?id=777735
2017-07-13 07:32:42 +02:00
Seungha Yang 06cf7440ce decodebin3: Don't send duplicated stream-start event
group-id in stream-start event might be updated in
parse_chain_output_probe (). This cause duplicated stream-start
twice with identical stream-id and seq-num, but only group-id is
different. Although there is no change, stream-start event will
be followed by the first buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=771088
2017-07-12 15:55:26 +02:00
Aaron Boxer 12c69c4cdf typefind: Detect JPEG2000 codestreams
https://bugzilla.gnome.org/show_bug.cgi?id=783625
2017-07-10 10:00:41 +03:00
Mathieu Duponchelle bfba213437 uridecodebin: aggregate topology messages
This makes it possible for GstDiscoverer to work with sources that
have multiple source pads and hence will trigger the creation of multiple
decodebin instances such as rtspsrc.

Based on the work of Vineeth TM <vineeth.tm@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=754178
2017-07-03 20:08:55 -04:00
Jimmy Ohn ca18b1f8fd encodebin: Simplify the are_raw_caps function
Remove unnecessary if statement in are_raw_caps function.
we can use result returned by gst_caps_can_intersect quite simple.

https://bugzilla.gnome.org/show_bug.cgi?id=784312
2017-06-29 15:51:53 -04:00
Mark Nauwelaerts dac113a867 subparse: ensure serialized sending of segment event at proper time 2017-06-25 22:25:40 +02:00
Thibault Saunier 7e94d2824f urisourcebin: Call do_async_done when source state change returns NO_PREROLL
Otherwise for RTSP streams for example, the pipeline will never go to
PLAYING as it will be missing an ASYNC_DONE message.

https://bugzilla.gnome.org/show_bug.cgi?id=780099
2017-06-15 14:35:06 -04:00
Nicolas Dufresne cc28e7cce0 rawvideoparse: Fix missing VideoMeta
The base class is trying to align the processed data, but it endup
removing the GstVideoMeta. That caused wrong result. Instead, just copy
from the process function with the appropriate alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=781204
2017-06-12 15:55:31 -04:00
Sebastian Dröge 66929f8970 urisourcebin: Use downloadbuffer element
And only set low-percent/high-percent if not using downloadbuffer, just
like in old uridecodebin. using the watermark based buffering causes
playback to hang never finish buffering with downloadbuffer.
2017-06-12 10:24:43 +03:00
Arun Raghavan 25e0b77bbe encodebin: Don't try rate adjustment before the first buffer
With both audiorate and videorate, it seems more sensible to apply rate
adjustments after the first buffer appears. For example, with v4l2src,
there is often a small delay before the first video buffer turns up, and
this can cause a stuttery start because of videorate trying to ensure a
perfect stream.
2017-06-08 12:35:23 +05:30
Arun Raghavan 08525d825d encodebin: Don't set audiorate property before NULL check 2017-06-08 12:34:24 +05:30
Wim Taymans 16b8851440 audioconvert: resize output buffer to correct size
If we are using a downstream bufferpool we need to set the size of the
buffer to our output size.
2017-06-02 09:44:19 +02:00
Sebastian Dröge d5069d27ef Revert "decodebin2: Set a time limit on "upstream" multiqueues"
This reverts commit 07dc9ba071. It causes
timeouts in validate because queues run full before prerolling.
2017-05-31 12:30:40 +03:00
Edward Hervey 07dc9ba071 decodebin2: Set a time limit on "upstream" multiqueues
Those multiqueue are the ones dealing with adaptive demuxers. They should
have a time limit set so that they don't end up buffering too much data.

They would previously be set with no limits at all, which would cause them
to grow indefinitely until downstream blocks.
2017-05-31 10:27:19 +03:00
Olivier Crête 4fdb5ab675 videotestsrc: Protect videoinfo with object lock
The videoinfo is set in the streaming thread, but can be read by any
thread from the various queries, so protect it with the object lock.
2017-05-23 08:54:25 +02:00
Guillaume Desmottes 36b7e5890f videorate: stop copying buffers in drop-only mode
gst_video_rate_flush_prev() ensures that the pushed buffer is writable
by calling gst_buffer_make_writable() on videorate->prevbuf.

In drop-only mode we always push buffers directly when they are received
from GstBaseTransform (gst_video_rate_transform_ip()) and do not keep them
around. GstBaseTransform already ensures that those buffers are
writable so there is no need to do it twice.

This change saves us from copying buffers in drop-only mode as we no longer
calls gst_buffer_make_writable() with a buffer having a refcount of 2
(one ref owned by GstBaseTransform and one in videorate->prevbuf).

https://bugzilla.gnome.org/show_bug.cgi?id=780767
2017-05-20 16:35:53 +02:00
Guillaume Desmottes 2c2d2a444c videorate: factor out gst_video_rate_push_buffer()
No semantic change, just factor out this function from
gst_video_rate_flush_prev().

I'm about to use it to change the 'drop-only' code path.

https://bugzilla.gnome.org/show_bug.cgi?id=780767
2017-05-20 16:35:53 +02:00
Sebastian Dröge efbda07cfa urisourcebin: Unref query with gst_query_unref()
Not gst_object_unref().
2017-05-18 11:03:07 +03:00
Nicolas Dufresne 8e6c6266d7 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 13:42:07 -04:00
Vincent Penquerc'h b97cbe678f decodebin2: fix use after free from demuxer flush pad probe
In some cases, we could get a flush-stop event after the chain structure
containing the demuxer was freed.

https://bugzilla.gnome.org/show_bug.cgi?id=782095
2017-05-03 17:37:12 +01:00
Sebastian Dröge 0be4504b10 Revert "videorate: In reverse playback mode, don't output the first buffer with ts=segment.stop"
This reverts commit e6736e9925.

This one is for after 1.12.0 and shouldn't have been merged yet.
2017-05-02 14:32:02 +03:00
Sebastian Dröge e6736e9925 videorate: In reverse playback mode, don't output the first buffer with ts=segment.stop
Instead go backwards before segment.stop based on the framerate or the
next buffers end timestamp. Otherwise the first buffer will usually be
dropped because outside the segment.

https://bugzilla.gnome.org/show_bug.cgi?id=781899
2017-05-02 14:05:39 +03:00
Tim-Philipp Müller 6a3640f367 playbin: minor docs fix
The "frame" property is no more, it's "sample" these days.
2017-04-28 15:54:04 +01:00
Tim-Philipp Müller 4246198fb3 No need for newlines in debug log statements 2017-04-12 09:58:49 +01:00
Sebastian Dröge 711504aad1 volume: Store volume as a double for consistency with the property type
And the potential increased precision, which shouldn't matter much here.

https://bugzilla.gnome.org/show_bug.cgi?id=781149
2017-04-11 11:17:18 +03:00
Vincent Penquerc'h 9c8e700b91 encodebin: fix list leak when requesting a new pad
https://bugzilla.gnome.org/show_bug.cgi?id=780769
2017-03-31 16:14:50 +01:00
Jan Schmidt 546a99026b urisourcebin: Set removed flag when removing buffering msg
Forgot to set the flag, resulting in a missed check for
sending 100% in some cases. Spotted by Coverity.

CID: 1403263
2017-03-27 23:00:34 +11:00
Vincent Penquerc'h 1ad791792c rawvideoparse: fix assert on large width/height in caps
https://bugzilla.gnome.org/show_bug.cgi?id=776446
2017-03-27 11:27:19 +01:00
Jan Schmidt 0bb82827f7 typefind: Expand the search range for HLS detection
HLS files can have arbitrary extra tags in them, and
those can be quite long lines. We need to search
further than 256 bytes sometimes just to get past the
first few lines of the file. Make the limit 4KB,
which matches a typical input block size and should
hopefully cover every crazy input.

https://bugzilla.gnome.org/show_bug.cgi?id=780559
2017-03-27 13:01:39 +11:00
Nicolas Dufresne d81a6da702 rawvideoparse: Rename frame-stride in to frame-size
The term stride is confusing here, since the stride is always use
to signal the pixel row size of an image (including padding). Also
a frame may have a single stride, which adds to the confusion. This
patch uses frame-size, which simply indicate the frame size in the
case the images have some padding in between.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Nicolas Dufresne 2b4a173e89 rawvideoparse: Use GstValueArray for strides and offsets
This allow using those property through gst-launch-1.0. This type
gained a deserilizer recently. The syntax is: <val1, val2, ...>.
Note that we also use the type int instead of uint to avoid having
to cast when specifying the values. The deserilizers assume
int by default.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Haihua Hu 6749e81ce2 streamsynchronizer: every stream need keep their own send_gap_event flag
When a clip has video audio and subtitle, if need send gap event
to audio and subtitle, we should make sure all has been sent, so
need every stream keep one send_gap_event.

https://bugzilla.gnome.org/show_bug.cgi?id=780429
2017-03-23 12:55:57 +02:00
Jan Schmidt a0f870a215 urisourcebin: Mention which queue is being linked in debug output 2017-03-23 00:21:44 +11:00
Seungha Yang 587c417d89 urisourcebin: Fix typefind list leak
https://bugzilla.gnome.org/show_bug.cgi?id=780257
2017-03-20 11:57:11 +02:00
Jan Schmidt 0b6a933e01 decodebin: Close a small race posting 100% buffering
When posting 100% buffering due to removing the last
buffering element, we still need to hold the posting
lock as well, to avoid any race with other elements
that might post a buffering message at that exact
moment
2017-03-18 02:03:47 +11:00
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