Commit graph

9725 commits

Author SHA1 Message Date
Mathieu Duponchelle 6ed7ddebf9 rtspsrc: use the correct segment seqnum 2019-02-04 13:14:37 +00:00
Mathieu Duponchelle a6d681ad09 rtpjitterbuffer: use the correct segment seqnum 2019-02-04 13:14:37 +00:00
Mathieu Duponchelle 5e92f7d208 rtpsession: use the correct segment seqnum 2019-02-04 13:14:37 +00:00
Thibault Saunier bc8af2cca5 flvdemux: Do not error out if the first added and chained pad is not linked
And let it the oportunity to get its other pad linked

Example:

```
$ gst-launch-1.0 uridecodebin uri=file:///home/thiblahute/gst-validate.save/gst-integration-testsuites/testsuites/../medias/defaults/flv/819290236.flv caps=audio/x-raw expose-all-streams=FALSE ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstFlvDemux:flvdemux0: Internal data stream error.
Additional debug info:
../subprojects/gst-plugins-good/gst/flv/gstflvdemux.c(2760): gst_flv_demux_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstFlvDemux:flvdemux0:
streaming stopped, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
```
2019-02-02 18:36:09 +00:00
Christopher Snowhill 818428ce9c webmmux: allow resolutions above 4096
Modify the caps string to allow width and height greater than 4096.
There is no need to restrict it since the matroska format allows the
width and height values to be up to eight bytes long, and this also
applies to the webm subset of the format.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/550
2019-02-02 15:40:53 +00:00
Nicolas Dufresne 6d3859bf70 rtph265depay; Fix handling of marker on aggregated packet
When multiple nals are aggrgated, the marker bit should be associated only
with the last NAL of the packet. Otherwise we may break rendering in with
AU alignment.
2019-01-31 19:30:14 +00:00
Nicolas Dufresne 98251f0158 rtph264depay: Fix handling or marker on STAP-A
Only forward the marker for the last NAL of the STAP-A. Otherwise each NAL
endup being assumed to be a full frame which may break rendering.

Fixes 557
2019-01-31 19:30:14 +00:00
Vincent Penquerc'h a329a3a2c6 deinterleave: Allow switching between 1 channel configs
regardless of whether they're positioned, since positioning
with a 1 channel stream doesn't change anything.
2019-01-28 23:23:41 +00:00
Patrick Radizi d3662bae00 rtspsrc: send GstRTSPSrcTimeout message on timeout
The GstRTSPSrcTimeout message is sent by the rtspsrc when it receives
the on-timeout signal from rtpsession. This can be used by an
application for error handling.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/499
2019-01-14 08:15:23 +00:00
Sebastian Dröge ab8100e664 flvdemux: Handle the encoder metadata the same as metadatacreator
And store it in our ENCODER tag.
2019-01-13 13:22:41 +00:00
Sebastian Dröge c28a9d5d9c flvmux: Add encoder metadata to the header
And also add a property for setting this. By default it has the same
value as the metadatacreator metadata.

Various software is using encoder instead of metadatacreator, others are
using them both for different purposes. As such it's useful to have
support for setting both here.
2019-01-13 13:22:41 +00:00
Jan Alexander Steffens (heftig) 06b2bbd8c7 rtph265pay: Only mark the last fragment of an AU
Commit e721071dca removed the check for
the end of fragmentation. As a result, all fragments of an AU's last
NALU were marked.
2019-01-09 15:36:40 +00:00
Jan Alexander Steffens (heftig) 798f320ba7 rtph264pay: Only mark the last fragment of an AU
Commit 4add820cce removed the check for
the end of fragmentation. As a result, all fragments of an AU's last
NALU were marked.

Potential fix for https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/540
2019-01-09 15:36:40 +00:00
Sebastian Dröge 3537c4d217 splitmuxsrc: Refactor part preparation code and remove "prepared" signal from reader helper object
We don't need a special signal anymore but can directly work with
async-done
2019-01-09 13:35:58 +02:00
Sebastian Dröge 99bb6f44ba splitmuxsrc: Implement state change asynchronously instead of blocking
Blocking in change_state() is a recipe for disaster, even more so if
we wait for another thread that also calls into various element API and
could then lead to deadlocks on e.g. the state lock.
2019-01-09 13:35:58 +02:00
Sebastian Dröge ec931601a6 qtdemux: Split CEA608 buffers correctly so that each output buffer represents a single frame 2019-01-02 10:29:46 +00:00
Sebastian Dröge aa65ea85f9 qtdemux: Refactor buffer pushing into its own function 2019-01-02 10:29:46 +00:00
Sebastian Dröge d471be4f3a qtdemux: Extract CEA608 framerate from the (first) video stream
EA608 closed caption tracks are a bit special in that each sample
can contain CCs for multiple frames, and CCs can be omitted and have to
be inferred from the duration of the sample then.

As such we take the framerate from the (first) video track here for
CEA608 as there must be one CC byte pair for every video frame
according to the spec.

For CEA708 all is fine and there is one sample per frame.
2019-01-02 10:29:46 +00:00
Seungha Yang 022fbe9a46 matroskademux: Don't leak allocated index memory
Don't forget to free returned memory from _search_pos()
2018-12-26 20:31:10 +09:00
Tim-Philipp Müller f480261815 audiofx: add stereo element which was moved from -bad to build
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/457
2018-12-25 16:10:49 +01:00
Tim-Philipp Müller d0a5e9d8b0 Move stereo plugin from -bad
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/457
2018-12-25 13:07:23 +01:00
Philippe Normand ce96d6dcd4 qtdemux: Offset correction for track language code parsing
The duration field being a uint64, is stored in 8 bytes, not 4. So the offset of
the following field, language code, needs to be updated accordingly so that the
parsed language code is not garbage.
2018-12-22 20:05:34 +01:00
Juan Navarro 5dfd12b64c rtspsrc: Accept NULL for "port-range" property
The documentation of "port-range" implies that passing NULL should be
valid, but currently it is not. Without this check, the sscanf() call
will crash.
2018-12-21 10:59:22 +01:00
Mathieu Duponchelle f52e16ceb8 Revert "rtpbin: receive bundle support"
This reverts commit dcd3ce9751.

This functionality was implemented for gstopenwebrtc, but it
turned out this was not actually needed for webrtc bundling
support, as shown in webrtcbin. It also doesn't correspond
to any standards.

This is an API break, but nothing should actually depend on
this, at least not for its initial purpose.

Changes in rtpbin.c were reverted manually, to preserve some
refactoring that had occurred in the original commit.

Fixes #537
2018-12-20 13:25:10 +00:00
Nicolas Dufresne 05059ce16b rtph264pay/rtph265pay: Fix use after free
We can't assume a buffer that has been pushed in the adapter is still
valid. This fixes a use after free detect when running test on jenkins.
2018-12-19 13:54:57 -05:00
Nicolas Dufresne d397cf6d1f rtph265pay: Don't wait for next nal when input is aligned
This is the same as what was done on rtph264pay in the patch
d5d28055c1
2018-12-18 13:39:54 -05:00
Nicolas Dufresne 0524e6f8cd rtph265depay: Drain on EOS event 2018-12-18 13:39:54 -05:00
Nicolas Dufresne 65b01d5f02 rtph265depay: Factor out the code that push
This will be needed to implement draining on EOS.
2018-12-18 13:39:53 -05:00
Nicolas Dufresne e694e2752a rtph264depay: Drain on EOS event 2018-12-18 13:39:46 -05:00
Nicolas Dufresne d12128f527 rtph264depay: Factor out the code that push
This will be needed to implement draining on EOS.
2018-12-18 13:39:46 -05:00
Nicolas Dufresne 5e8cab71ea rtph26xpay: Remove unused IS_ACCESS_UNIT macro
This macro is not longer used. It was secretly checking if that nal was
a slice, and confusingly name to that one may think it was checking if
the nal is an AUD.
2018-12-18 13:39:46 -05:00
Nicolas Dufresne 0a6e5e439c rtph265pay: Fix reading timestamps from adapter
The code was reading the timestamp from the adapter before pushing the
new buffer into it. As a side effect, if the adapter was empty, we'd end
up using an older timestamp. In alignment=au, it means that all
timestamp was likely one frame in the past, while in alignment=nal, with
multiple slices per frame, the first slice would have the timestamp of
the previous one.
2018-12-18 13:30:05 -05:00
Nicolas Dufresne ff2e5b94b9 rtph265pay: Forward the marker bit as buffer flag
We have a buffer flag to represent the marker bit (when present).
Forward this bit by setting the buffer flag accordingly.
2018-12-18 13:30:05 -05:00
Nicolas Dufresne e721071dca rtph265pay: Properly set the marker bit
The marker bit is used for efficient decoding. The assumption that
it should be set on the AUD is wrong, since the AUD is conceptually
starts the frame, while the marker is to indicate the end.

So properly set the marker bit as soon as we know we are ending an
AU and also whenever upstream have set the GST_BUFFER_FLAG_MARKER
flag.
2018-12-18 13:30:05 -05:00
Nicolas Dufresne 1f72131781 rtph264pay: Fix reading timestamps from adapter
The code was reading the timestamp from the adapter before pushing the
new buffer into it. As a side effect, if the adapter was empty, we'd end
up using an older timestamp. In alignment=au, it means that all
timestamp was likely one frame in the past, while in alignment=nal, with
multiple slices per frame, the first slice would have the timestamp of
the previous one.
2018-12-18 13:30:05 -05:00
Nicolas Dufresne 4add820cce rtph264pay: Properly set the marker bit
The marker bit is used for efficient decoding. The assumption that
it should be set on the AUD is wrong, since the AUD is conceptually
starts the frame, while the marker is to indicate the end.

So properly set the marker bit as soon as we know we are ending an
AU and also whenever upstream have set the GST_BUFFER_FLAG_MARKER
flag.
2018-12-18 13:30:05 -05:00
Nicolas Dufresne e4f38c986e rtph264depay: Forward the marker bit as buffer flag
We have a buffer flag to represent the marker bit (when present).
Forward this bit by setting the buffer flag accordingly.
2018-12-18 13:30:05 -05:00
Nicolas Dufresne 13278fbcf5 rtph264pay: Protect against use of reserved NAL types
Don't allow external encoder to use one of the reserved NAL type
implicated in NAL aggreation. These out-of-spec NAL types, if passed
from the outside world will lead to an invalid RTP payload being
created.
2018-12-18 13:30:05 -05:00
Sebastian Dröge 4f7ef56c53 isomp4: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
For the demuxer we have to select line offset 0 for the time being as
this information is not passed over MOV.
2018-12-15 21:31:20 +00:00
Olivier Crête d857522237 rtpjitterbuffer: Run all timers immediately on EOS
When the EOS event is received, run all timers immediately and avoid
pushing the EOS downstream before this has been run. This ensures that
the lost packet statistics are accurate.
2018-12-14 12:10:16 +00:00
Nicolas Dufresne 3de2c28fc1 rtpjitterbuffer: Stop waiting after EOS
After EOS is received, it is pointless to wait for further events,
specially waiting on timers. This patches fixes two cases where we could
wait instead of returning GST_FLOW_EOS and trigger a spin of the loop
function when EOS is queued, regardless if this EOS is the queue head or
not.
2018-12-14 12:10:16 +00:00
Jochen Henneberg 7824e87c5b flacparse: On sink caps change restart parser
Draining the parser is not enough here, on caps change we need to
reset it so it is ready to accept new caps.
2018-12-14 09:22:33 +00:00
Jochen Henneberg 9b6dcc7f1b rtpgstdepay: Update pad caps if inline caps change
If the inlined caps change while using the same CV we need to update the
source pad caps.
2018-12-14 09:22:33 +00:00
Sebastian Dröge c50be8f146 qtdemux: Put framerate into the closedcaption caps if it can be calculated from the stream
Using the same calculation used for video streams.
2018-12-06 16:05:50 +00:00
Sebastian Dröge 830e7dc14b qtmux: Set timescale of closedcaption tracks to the one of the main video track 2018-12-06 16:05:50 +00:00
Maciej Wolny ec655de288 Remove duplicate declarations
This causes 'redefinition of typedef ...' errors on GCC 4.5.3
2018-12-04 11:13:02 +00:00
Alicia Boya García 38b553dda7 qtdemux: set need_segment after a second moov
stream.segment should be updated with the values of the current edit
list, also when a new `moov` is received. Unfortunately this was not
being the case because of an early return.

As a consequence of this bugs, no end of movie clipping was being
performed on the new moov and no segment event was being emitted.

When performing stream switching (e.g. in MSE) the new moov may have a
different edit list. This is often the case when switching between
baseline H.264 (which lacks B-frames) and more demanding profiles. For
this reason it's important to emit a new segment in order to be able
to get matching stream times.
2018-11-30 20:44:57 +00:00
Alicia Boya García 26cc201c8a qtdemux: Initialize QtDemuxStream.segment in its constructor
This patch moves the initialization of QtDemuxStream.segment from
gst_qtdemux_add_stream() to _create_stream(). This ensures the segment
is always initialized when the stream is created.

Otherwise the segment format is left as GST_FORMAT_UNDEFINED in the case
were a track is reparsed and qtdemux_reuse_and_configure_stream() is
called instead of gst_qtdemux_add_stream(). (See
qtdemux_expose_streams() in the non streams-aware case.)
2018-11-30 20:44:57 +00:00
Miguel Paris 48a4fd4e50 rtpsession: properly handle rtcp_feedback_retention_window
- Consider GST_CLOCK_TIME_NONE as not to be used.
- Complete "rtcp-feedback-retention-window" property getter/setter
  implementation.
2018-11-30 10:55:26 +00:00
Miguel Paris 458741e4b2 rtpsource: properly prune RTCP packets out of feedback_retention_window
Closes #522
2018-11-30 10:55:26 +00:00