Commit graph

9986 commits

Author SHA1 Message Date
Sebastian Dröge
c4f6ce789d avimux: Add support for >2 raw audio channels
For this case write a WAVEFORMATEXTENSIBLE header and also reorder the
raw audio channels to the AVI channel order if needed.
2020-01-19 12:09:38 +00:00
Sebastian Dröge
451fc5c112 wavenc: Fix writing of the channel mask with >2 channels
The channel position is an enum but the conversion code assumed it's a
mask. Convert accordingly.
2020-01-13 19:50:06 +00:00
Kristofer Björkström
9c86414279 rtph265pay: TID for NALU type 48 was always set to 7
A typo bug: | instead of & resulted in TID alwasy being set to 7
for the aggregated NALU of type 48
2020-01-13 15:41:30 +01:00
Sebastian Dröge
c17d5e36ad imagefreeze: Add support for replacing the output buffer
By default imagefreeze will still reject new buffers after the first one
and immediately return GST_FLOW_EOS but the new allow-replace property
allows to change this.

Whenever updating the buffer we now also keep track of the configured
caps of the buffer and from the source pad task negotiate correctly
based on the potentially updated caps.

Only the very first time negotiation of a framerate with downstream is
performed, afterwards only the caps themselves apart from the framerate
are updated.
2020-01-11 08:04:43 +00:00
Alicia Boya García
8dd42666e3 qtdemux: Fix race on pad reconnection
Elements emitting frames through several srcpads should use a
flow combiner to aggregate the chain returns and therefore only return
GST_FLOW_NOT_LINKED to upstream when all the downstream pads have
received GST_FLOW_NOT_LINKED.

In addition to that, in order to handle pads being relinked downstream,
the flow combiner should be reset in response to RECONFIGURE events.
This ensures that a both srcpads process a chain operation before a
GST_FLOW_NOT_LINKED can be propagated upstream (which would usually stop
the pipeline).

Otherwise, in a configuration with two srcpads, only one linked at a
time, after the relink the element could chain data through the now
unlinked pad and the flow combiner would resolve as GST_FLOW_NOT_LINKED
(stopping the pipeline) just because the now linked pad has not been
chained yet to update the flow combiner.

This patch adds handling of RECONFIGURE events to qtdemux. Also, since
this event handling causes the flow combiner to be used from a thread
other than the qtdemux streaming thread, usages of the flow combiner
has been guarded by the object lock.
2020-01-09 18:43:02 +00:00
Seungha Yang
8445685a21 splitmuxsink: Fix assertion failure on set_property()
GValue might have null object.

(gst-inspect-1.0:10304): GStreamer-CRITICAL ...
    gst_object_ref_sink: assertion 'object != NULL' failed
2020-01-07 01:24:01 +09:00
Daniel Molkentin
bb1ce82e39 videocrop: allow properties to be animated by GstController 2020-01-03 15:16:02 +01:00
Aaron Boxer
09d4514814 rtspsrc: improved handling of control concatenation with base
Also, `control_url` variable has been renamed to `control_path`,
as it is actually a path.
2019-12-30 16:52:45 +00:00
Aaron Boxer
ed6b5a3a63 rtspsrc: append aggregate control string to base URL before query string
Appending control string to end of query changes meaning of query string
Fixes #650
2019-12-30 16:52:45 +00:00
Niels De Graef
acab06b2e8 alpha: Cleanup using G_DECLARE_FINAL_TYPE
We started depending on GLib 2.44, so we can clean up all the GObject
boilerplate macros.
2019-12-28 04:05:13 +00:00
Stéphane Cerveau
b928517f1e good: use of g_value_dup_string
Use helper method to get string from GValue.
2019-12-20 09:30:26 +00:00
Havard Graff
8b96d8ee8d rtpbin: fix shutdown crash in rtpbin
The key is to make sure the jitterbuffer is set to NULL *before* the
ptdemux.

The race that existed would basically happen when ptdemux had reached
READY, and the jitterbuffer would then push a buffer, triggering a new
pad with a new payloadtype being added and ghosted to the rtpbin itself.

However, the srcpad of the ptdemux would now be inactive, and all the
sticky-event pushed on it would be swallowed, not allowing any to reach
the ghost-pad. Then the buffer in-flight would come to the ghostpad,
and we would assert that a buffer arrived before the necessary
events.

By simply re-ordering the state-changes, we ensure that there will be
no buffer racing into the ptdemux while its state is being changed,
and the problem disappears completely.

Notice also that there is not point in disconnecting the signals on the
ptdemux before this point, since we need the push-thread to settle
down before we can do this in a non-racy way.
2019-12-20 08:27:07 +00:00
Aaron Boxer
4155c59cc4 rtspsrc: avoid seek DISCONT when only rate changes in same direction
Not setting DISCONT avoids a noticable delay when seeking
with only rate changing, in the same direction as current
rate.
2019-12-19 05:54:38 +00:00
Olivier Crête
9db1d740e8 rtspsrc: Remove deprecated GTimeVal
GTimeVal won't work past 2038
2019-12-18 19:48:34 +00:00
Sebastian Dröge
04806a75bd avimux: Add support for S24LE and S32LE raw audio
avidemux already handles this correctly.
2019-12-18 11:16:30 +00:00
Sebastian Dröge
4dbaff424f avimux: Allow muxing v210 video into AVI
avidemux already handles this.
2019-12-18 10:20:25 +00:00
Vivia Nikolaidou
7cbc351e05 flvdemux: Don't replace video codec data when we receive a PAR
Receiving a pixel-aspect-ratio should trigger a caps change, but not
replace the existing video codec tag
2019-12-16 21:51:38 +00:00
Mathieu Duponchelle
5766731bd4 qtmux: protect access to GstElement.sinkpads 2019-12-16 14:17:38 +00:00
Mathieu Duponchelle
e2462005fb qtmux: port to GstAggregator 2019-12-16 14:17:38 +00:00
Joakim Johansson
4d7d577496 gstrtspsrc: Add missing lock on free set_get_param_q
Otherwise is it possible to get a crash in gst_rtspsrc_set_parameter.
2019-12-16 13:13:00 +01:00
Sebastian Dröge
9f6ed9ec72 splitmuxsink: Increment fragment_id even if no fragment location was provided
Applications might handle locations and generally configuration of the
sink by themselves instead of having splitmuxsink set the location on
the sink. Nonetheless it makes sense to increment the fragment_id that
is passed to the signal so that applications know which fragment is
requested.
2019-12-13 22:59:55 +00:00
Jan Alexander Steffens (heftig)
9e0eb77810
flvmux: Use the last DTS for the metadata timestamp
This avoids creating a timestamp regression during a stream.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/429
2019-12-12 11:09:31 +01:00
Mathieu Duponchelle
625eb00c06 qtdemux: send GAP events for lagging audio and video streams too
The logic is taken straight from matroskademux, see
77403d0afe
2019-12-11 19:59:13 +00:00
Seungha Yang
5009cad220 flvmux: Use thread-safe gmtime_r if available
gmtime on *nix is not thread-safe.
2019-12-10 23:48:35 +09:00
Stéphane Cerveau
b44d37a338 splitmuxsink: provides a start-index property
Allow to change the fragment-id start index.
2019-12-05 14:58:40 +00:00
Tim-Philipp Müller
1df530eaa7 rtpjpegdepay: outputs framed jpeg
Add parsed=true to output caps, as we always output
whole frames, timestamped and all. Means also that
the output can be decoded by avdec_mjpeg wihout
plugging an extra parser (which has no rank).
2019-12-04 13:02:54 +00:00
Jan Alexander Steffens (heftig)
06600b2cd9
flvmux: Correct metadata handling in file and stream mode
In file mode, only push one onMetaData at the start of the stream.

In stream mode, always push complete onMetaData. They get replaced, not
merged.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/418
2019-12-03 14:01:19 +01:00
Jan Alexander Steffens (heftig)
6fdb6ece6e
flvmux: Don't calculate duration in streamable mode
There's no header to rewrite, so the duration is left unused.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/418
2019-12-03 14:01:14 +01:00
Havard Graff
a7c887b197 rtpL16depay: don't crash if data is not modulo channels*width 2019-12-03 00:02:48 +00:00
Havard Graff
690c15bd78 rtpopuspay: use baseclass allocator for buffers
That way we get some of the meta -> rtp-extension goodies.
2019-12-02 13:05:12 +01:00
Havard Graff
f997859913 rtpsession: add locking for clear-pt-map
...or it will segfault from time to time...
2019-11-29 14:23:49 +01:00
Linus Svensson
08060dd97b matroskamux: Add property to set DateUTC
Add a property that makes it possible for an application to set the
DateUTC header field in matroska files. This is useful for live feeds,
where the DateUTC header can be set to a UTC timestamp, matching the
beginning of the file.

Needs gstreamer!323

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/481
2019-11-25 14:01:48 +01:00
Linus Svensson
0690bd1b21 matroskamux: Use nanosecond precision for DateUTC
DateUTC is specified with nanosecond precision in matroska, make use of
that.
2019-11-22 16:30:50 +01:00
Jan Alexander Steffens (heftig)
1e7d2e2bbd
matroskamux: Pass the right size to gst_collect_pads_add_pad
We were lucky that GstMatroskamuxPad is larger than GstMatroskaPad.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/393
2019-11-19 14:57:11 +01:00
aogun
a6e28ca268 aacparse: fix wrong offset of adts channel 2019-11-18 01:06:41 +00:00
Seungha Yang
a441779d39 splitmuxsink: Don't take lock during posting message
An application might try to access splitmuxsink from sync message handler
by g_object_{get,set} which takes lock also. In general, we don't
take lock around message handler.
2019-11-18 00:08:36 +00:00
Niels De Graef
7cf4ab6229 Don't pass default GLib marshallers for signals
By passing `NULL` to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-11-17 15:32:30 +00:00
Nicolas Dufresne
db187eec19 rtpjitterbuffer: Check the exit condition after executing timers
The do_expected_timeout() function may release the JBUF_LOCK, so we need
to check if nothing wanted the timer thread to exit after this call.
The side effect was that we may endup going back into waiting for a timer
which will cause arbitrary delay on tear down (or deadlock when test
clock is used).

Fixes #653
2019-11-14 17:52:16 -05:00
Nicolas Dufresne
fd6cd6f545 rtpjitterbuffer: Check exit condition immediately after JBUF_WAIT
JBUF_WAIT_QUEUE drops the JBUF_LOCK, which means the stop condition
for the chain function may have changed (change_state to NULL). Check
this immediately after the wait so that we don't delay shutting down.
2019-11-14 17:51:31 -05:00
Nicolas Dufresne
e66a4b64b3 videocrop: Also update the coordinate when in-place
This update is needed when the output caps is not changed (e.g. we are
moving a viewport around).

Fixes #669
2019-11-12 17:28:22 -05:00
Nicolas Dufresne
98a5726eba videocrop: Don't always re-run the allocation query
When in-place, running an allocation is not useful since videocrop
is not implicated in the allocation. So only force the allocation
query for the case it was in passthrough. This is needed since the
change in the crop region will likely pull us out of this mode. For the
case we where neither in passthrough or in-place, the allocation query
is already ran by the baseclass, so nothing special is needed.

This fixes performance issues when changing the crop region per frame.
This was reproduced using videocrop2-test.
2019-11-11 16:05:24 -05:00
Nicolas Dufresne
e09b4e9cde videocrop: Cleanup spurious assignment
These are just writing the same thing a second time.
2019-11-11 14:09:47 -05:00
Stéphane Cerveau
9dc1a32d5a splitmuxsink: add fakesink support
fakesink does not support "location" property and was generating
a warning.
2019-11-07 12:28:58 +01:00
Sergey Nazaryev
b4b79a211f multiudpsink: don't lose scope_id 2019-11-05 23:50:11 +00:00
Havard Graff
87457a862d rtpjitterbuffer: make sure not to drop packets based on skew
One of the jitterbuffers functions is to try and make sense of weird
network behavior.

It is quite unhelpful for the jitterbuffer to start dropping packets
itself when what you are trying to achieve is better network resilience.

In the case of a skew, this could often mean the sender has restarted
in some fashion, and then dropping the very first buffer of this "new"
stream could often mean missing valuable information, like in the case
of video and I-frames.

This patch simply reverts back to the old behavior, prior to 8d955fc32b
and includes the simplest test I could write to demonstrate the behavior,
where a single packet arrives "perfectly", then a 50ms gap happens,
and then two more packets arrive in perfect order after that.

# Conflicts:
#	tests/check/elements/rtpjitterbuffer.c
2019-11-02 23:05:32 +00:00
Patricia Muscalu
203ad39d53 qtmux: Fix memory leak while pushing fragmented data
The memory leak occurs in the case when the buffer has been
added to the fragment_buffers array of the current pad and
never been sent because of the push failure of the previous
buffers: moof or mdat header or fragmented buffer(s).
2019-10-24 10:21:11 +00:00
Edward Hervey
8e1c224fbc good: Avoid usage of deprecated API
GTimeval and related functions are now deprecated in glib.
Replacement APIs have been present since 2.26
2019-10-16 07:46:58 +00:00
Tim-Philipp Müller
c9a47c0c8d Remove autotools build system 2019-10-14 11:04:18 +01:00
Aaron Boxer
46989dca96 documentation: fix a number of typos 2019-10-05 22:38:11 +00:00
Simon Arnling Bååth
8173596ed2 gstrtpjitterbuffer: Custom messages when dropping packets
This commit adds custom element messages for when gstrtpjitterbuffer
drops an incoming rtp packets due to for example arriving too late.
Applications can listen to these messages on the bus which enables
actions to be taken when packets are dropped due to for example high
network jitter.

Two properties has been added, one to enable posting drop messages and
one to set a minimum time between each message to enable throttling the
posting of messages as high drop rates.
2019-10-04 20:31:56 +00:00