Commit graph

9650 commits

Author SHA1 Message Date
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
Miguel Paris
53f03d4cc1 rtpsource: properly compare buffer PTSs 2018-11-30 10:55:26 +00:00
Miguel Paris
57829c3352 rtpsource: retain_rtcp_packet: warning if invalid running_time 2018-11-30 10:55:26 +00:00
Miguel Paris
36f55b03e8 rtpsession: properly set the running_time for rtcp packet info 2018-11-30 10:55:26 +00:00
Nicolas Dufresne
d637567ab3 rtpssrcdemux: Rename confusingly name lock macros
This is an extra internal recurisve lock use to avoid having to take
both sink pad streams lock all the time. This patch renamed it
INTERLNAL_STREAM_LOCK/UNLOCK() to avoid confusion with possible upstream
GST_PAD API.
2018-11-29 15:34:47 -05:00
Nicolas Dufresne
40daf6322d rtpssrcdemux: Hold on internal stream lock while pushing sticky
This reverts "6f3734c305 rtpssrcdemux: Only forward stick events while
holding the sinkpad stream lock" and actually hold on the internal
stream lock. This prevents in some needed case having a second
streaming thread poping in and messing up event ordering.
2018-11-29 15:33:57 -05:00
Matej Knopp
e9495c55f4 matroskademux: fix handling of MS ACM audio
Pass riff codec-data as strf, not strd, which is where
gst_riff_create_audio_caps() expects the WAVEFORMATEXTENSIBLE
data.

https://bugzilla.gnome.org/show_bug.cgi?id=757583
Fixes #234
2018-11-28 11:55:14 +00:00
Jordan Petridis
515ada7e22
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:52:16 +02:00
Thibault Saunier
2e0a45d7df aspectcropration: Fix potential unref of NULL pointer 2018-11-26 08:11:57 -03:00
Thibault Saunier
eb2b58cc0b aspectcropratio: Set caps from the streaming thread on property changes
Otherwise it might lead to deadlocks

See https://gitlab.gnome.org/GNOME/pitivi/issues/2259

Closes #518
2018-11-26 07:14:09 -03:00
Nicolas Dufresne
21378d83c2 rtpssrcdemux: Forward serialized events to all pads
While forwarding serialized event, we use gst_pad_forward() function.
In the forward callback (GstPadForwardFunction) we always return
TRUE. Returning true there will stop the dispatching procedure. As a
side effect, only one events is receiving the events. This breaks
when sending EOS from the applicaiton, it also breaks the latency
tracer.
2018-11-24 13:01:25 +00:00
Alicia Boya García
753b7c17f3 matroskademux: Defer seeks received before GST_MATROSKA_READ_STATE_DATA
This patch enables matroskademux to receive seeks before it reaches
GST_MATROSKA_READ_STATE_DATA.

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/514

This also enables receiving seeks in the element READY state.

When such a seek is received, it is stored to be later handled when
GST_MATROSKA_READ_STATE_DATA is reached.
2018-11-15 08:01:29 +00:00
Linus Svensson
8fc8b7ee33 rtpsession: Implement reset
Reset RTPSession when rtpsession changes state from PAUSED to READY.
Without this change, a stored last_rtptime in RTPSource could interfere
with RTP timestamp generation in RTCP Sender Report.

Fixes #510
2018-11-13 12:30:35 +00:00
Mathieu Duponchelle
fd560bcb27 rtpfunnel: Stop using G_DECLARE_FINAL_TYPE
Fixes #516
2018-11-13 00:37:11 +01:00
Matthew Waters
40fc8aea8f matroska: implement preliminary support for the bitrate query
Return the size / total duration as a ballpark estimate.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:07:18 +00:00
Matthew Waters
8a7074f748 isomp4: add preliminary support for the bitrate query
Return the upstream size over the duration as a first estimate.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:07:18 +00:00
Sebastian Dröge
87202cc03d rtpbin: Sink jitterbuffer/storage before passing as parameters to signals
Otherwise signal handlers from bindings will take ownership of them as
they are still floating, and we won't own a reference inside rtpbin
anymore.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/515
2018-11-07 09:11:16 +00:00
Olivier Crête
fea0d0b1a4 flvmux: Force timestamps to always be increasing
https://bugzilla.gnome.org/show_bug.cgi?id=796382
2018-11-05 18:17:01 -05:00
Seungha Yang
5d542030db qtdemux: Ignore corrupted CTTS box
If ctts (CompositionOffsetBox) has larger sample_offset
(offset between PTS and DTS) than (2 * duration) of the stream,
assume the ctts box to be corrupted and ignore the box.

https://bugzilla.gnome.org/show_bug.cgi?id=797262
2018-11-01 16:03:12 +02:00
Sebastian Dröge
a03d29420b scaletempo: Implement SEGMENT query
https://bugzilla.gnome.org/show_bug.cgi?id=797313
2018-10-28 17:52:18 +00:00
Sebastian Dröge
2415d517f1 wavparse: Implement SEGMENT query
https://bugzilla.gnome.org/show_bug.cgi?id=797313
2018-10-28 17:52:18 +00:00
Olivier Crête
486044063a dtmfsrc: Declare output as interleaved
This element doesn't support planar audio yet.
2018-10-28 17:12:59 +00:00
Olivier Crête
cc69c876fe rtpsession: Allow changing the SDES at runtime
Make it possible to modify the SDES in a packet at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=763502
2018-10-28 12:10:36 +00:00
Alicia Boya García
5fcb7f715a qtmux: round to nearest when computing mehd and tkhd duration
This fixes a bug where in some files mehd.fragment_duration is one unit
less than the actual duration of the fragmented movie, as explained below:

mehd.fragment_duration is computed by scaling the end timestamp of
the last frame of the movie in (in nanoseconds) by the movie timescale.

In some situations, the end timestamp is innacurate due to lossy conversion to
fixed point required by GstBuffer upstream.

Take for instance a movie with 3 frames at exactly 3 fps.

$ gst-launch-1.0 -v videotestsrc num-buffers=3 \
  ! video/x-raw, framerate="(fraction)3/1" \
  ! x264enc \
  ! fakesink silent=false

dts: 999:59:59.333333334,  pts: 1000:00:00.000000000, duration: 0:00:00.333333333
dts: 999:59:59.666666667,  pts: 1000:00:00.666666666, duration: 0:00:00.333333334
dts: 1000:00:00.000000000, pts: 1000:00:00.333333333, duration: 0:00:00.333333333

The end timestamp is calculated by qtmux in this way:

end timestamp = last frame DTS + last frame DUR - first frame DTS =
  = 1000:00:00.000000000 + 0:00:00.333333333 - 999:59:59.333333334 =
  = 0:00:00.999999999

qtmux needs to round this timestamp to the declared movie timescale, which can
ameliorate this distortion, but it's important that round-neareast is used;
otherwise it would backfire badly.

Take for example a movie with a timescale of 30 units/s.

0.999999999 s * 30 units/s = 29.999999970 units

A round-floor (as it was done before this patch) would set fragment_duration to
29 units, amplifying the original distorsion from 1 nanosecond up to 33
milliseconds less than the correct value. The greatest distortion would occur
in the case where timescale = framerate, where an entire frame duration would
be subtracted.

Also, rounding is added to tkhd duration computation too, which
potentially has the same problem.

https://bugzilla.gnome.org/show_bug.cgi?id=793959
2018-10-27 13:12:56 +01:00
Marc Leeman
827d70daee udpsrc: print information about bind_error socket error
In some cases, a bind error occurs during operation. Printing
the information about the problem is critical for finding the
conflict

https://bugzilla.gnome.org/show_bug.cgi?id=797340
2018-10-27 13:12:53 +01:00
Johan Bjäreholt
e736f29376 matroska-demux: Fix caps memleak
https://bugzilla.gnome.org/show_bug.cgi?id=797326
2018-10-27 10:48:38 +01:00
Johan Bjäreholt
abfc7da345 matroska-ids: Fix uninitialized memory in contexts
https://bugzilla.gnome.org/show_bug.cgi?id=797327
2018-10-24 09:54:20 +01:00
Sebastian Dröge
01a2119ad0 qtmux: Add property for providing a threshold after which we create an edit list for gaps at the start
https://bugzilla.gnome.org/show_bug.cgi?id=797290
2018-10-22 12:29:23 +01:00
Sebastian Dröge
324f8c7f3c qtmux: Correctly set tkhd width/height to the display size
It was previously set to the display aspect ratio, e.g. 4x3, 16x9, etc.
but should be set to the display size.

This is a regression from e655d47dfc
(1.5.1) and was correct before that.

https://bugzilla.gnome.org/show_bug.cgi?id=797318
2018-10-22 12:23:05 +01:00
Seungha Yang
7bce030be3 qtdemux: Fix build with GLib versions < 2.54
g_ptr_array_find_with_equal_func was introduced in glib 2.54
which is a higher version than our minimum required one.

https://bugzilla.gnome.org/show_bug.cgi?id=797239
2018-10-20 12:38:32 +01:00
Seungha Yang
05bd25ea35 qtdemux: Don't switch active streams and old streams ...
... before the old streams is not exposed yet for MSS stream.

In case of DASH, newly configured streams will be exposed
whenever demux got moov without delay.
Meanwhile, since there is no moov box in MSS stream,
the caps will act like moov. Then, there is delay for exposing new pads
until demux got the first moof.

So, following scenario is possible only for MSS but not for DASH,
STREAM-START -> CAPS -> (configure stream but NOT EXPOSED YET)
-> STREAM-START-> CAPS (configure stream again).

In above scenario, we can reuse old stream without any stream reconfigure.

https://bugzilla.gnome.org/show_bug.cgi?id=797239
2018-10-19 14:44:43 +02:00
Seungha Yang
b2876ad8a4 qtdemux: Use GPtrArray to store QtDemuxStream structure
GPtrArray has less overhead than linked list and the length also
can be auto updated by using it.

https://bugzilla.gnome.org/show_bug.cgi?id=797239
2018-10-19 14:44:43 +02:00
Seungha Yang
1600323119 qtdemux: Make QtDemuxStream refcounted structure
This a prework for porting GPtrArray.
Refcounting will help the use of g_ptr_array_new_with_free_func()
with QtDemuxStream structure

https://bugzilla.gnome.org/show_bug.cgi?id=797239
2018-10-19 14:44:43 +02:00
Seungha Yang
72123e3da3 qtdemux: Make function foreach method friendly
https://bugzilla.gnome.org/show_bug.cgi?id=797239
2018-10-19 14:44:43 +02:00
Olivier Crête
20d5f92b28 qtdemux: Only set width/height in caps if they're non-0
If they are not valid, then let a downstream parser complete them.

https://bugzilla.gnome.org/show_bug.cgi?id=796878
2018-10-19 14:19:27 +02:00
Wim Taymans
7db251f214 avidemux: fix misleading debug line 2018-10-18 15:50:19 +02:00
Philippe Normand
56669205eb qtdemux: Avoid warning when reporting about decryptors
https://bugzilla.gnome.org/show_bug.cgi?id=796652
2018-10-17 15:51:32 +01:00
Tim-Philipp Müller
cac9aab107 meson: Replace empty configuration_data() with copy keyword
Use 'copy' keyword to avoid meson warning message.
Note that 'copy' keyword in configure_file() is available
since meson 0.47.0

https://bugzilla.gnome.org/show_bug.cgi?id=797298
2018-10-17 14:15:33 +01:00
Vivia Nikolaidou
af0e30d545 splitmuxsink: Do not hardcode frames_of_daily_jam
Apart from the obvious drawbacks of hardcoding, the drawback here was
that, if we subtracted 2 frames (instead of 2.6) from the target running
time, we'd request the next keyframe a bit too far into the future,
which would make our files split at the wrong position.

https://bugzilla.gnome.org/show_bug.cgi?id=797293
2018-10-16 16:06:47 +03:00