Commit graph

10267 commits

Author SHA1 Message Date
Zeid Bekli
3211c65a5e rtpL16depay: unref buffer on error
gst_rtp_L16_depay_process to unref buffer on wrong payload size or
reorder failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/702>
2020-08-24 19:43:15 +00:00
Sebastian Dröge
85a6e95c7d rtputils: Don't call NULL GstMeta transform function
It's optional and if it does not exist then no transformation is
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/701>
2020-08-18 10:27:52 +03:00
Julian Bouzas
91972c91aa rtp: Do not register rtpreddec and rtpredenc twice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/699>
2020-08-13 15:27:25 -04:00
Sebastian Dröge
e4ce9887cd rtpmanager: Improve readability of "stats" docs by making the fields an actual list
Otherwise they end up all in the same line one after another.

Also add docs for the "avg-jitter" stats field of the jitterbuffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/698>
2020-08-13 07:24:17 +00:00
Vivia Nikolaidou
c95cc6a015 flvmux: Return NEED_DATA when we drop a buffer
When we are dropping a buffer in find_best_pad (e.g. waiting for a
keyframe, or skipping backwards timestamp), return
GST_AGGREGATOR_FLOW_NEED_DATA to make sure we have enough data at the
next run. Otherwise, a stream that accidentally fell behind (e.g.
relinking race, or just waiting for a keyframe) will never get the
opportunity to catch up to the other one, because the other one will
always keep advancing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/696>
2020-08-10 20:36:51 +03:00
Vivia Nikolaidou
75f6ca8a11 flvmux: Return NEED_DATA when no best pad is found
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/696>
2020-08-10 20:20:04 +03:00
Vivia Nikolaidou
59aab55e71 flvmux: Fix possible crash on GST_ITERATOR_RESYNC
Wrong pointer type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/696>
2020-08-10 20:18:30 +03:00
Sebastian Dröge
e9a0307b94 rtph26[45]pay: Change default aggregate-mode to "none" for backwards compatibility
We didn't aggregate at all in previous versions and there are apparently
various RTP implementations that don't handle aggregation well at all.

As part of this also document that for RTSP it is recommended to keep it
set to "none" while for WebRTC it should be set to "zero-latency".

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/749

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/692>
2020-08-08 10:08:31 +03:00
Jan Alexander Steffens (heftig)
28a616f693 splitmuxsink: Make sure flushing doesn't block
* Trying to disconnect a stream from a running splitmuxsink by flushing
  it results in the FLUSH_START blocking in the stream queue's
  gst_pad_pause_task because the flush did not unblock
  complete_or_wait_on_out, so add a check for ctx->flushing there.

* Add a GST_SPLITMUX_BROADCAST_INPUT so check_completed_gop notices
  flushing changed and the incoming push is unblocked.

* Pass the FLUSH_STOP along to the muxer without waiting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/687>
2020-08-04 15:15:27 +00:00
Vivia Nikolaidou
af9e66d7a5 imagefreeze: Wait until we have a clock
Otherwise it can happen that it tries to get the clock in PAUSED state
in live mode, which does not exist.

Thanks to Sebastian Dröge for helping debugging.

Fixes #775

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/691>
2020-08-04 17:28:39 +03:00
Tim-Philipp Müller
a27e171bfa qtdemux: extract bit depth from codec data for ALAC
The info in the sound sample description might not be
accurate if it's an older version atom.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/771

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/686>
2020-07-31 11:05:02 +01:00
Jordan Petridis
516db3f1d0 auparse: fix compiler warnings
GCC 10 was complaining like following. It really is complaining about default cases returning
with potentially unitialized *desval, but those cases in the switch should never be hit.

```
 ../subprojects/gst-plugins-good/gst/auparse/gstauparse.c: In function 'gst_au_parse_chain':
../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:481:37: error: 'timestamp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  481 |       GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:482:36: error: 'duration' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  482 |       GST_BUFFER_DURATION (outbuf) = duration;
../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:480:34: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  480 |       GST_BUFFER_OFFSET (outbuf) = offset;
cc1: all warnings being treated as errors
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/671>
2020-07-29 19:21:31 +03:00
George Kiagiadakis
d997a8d48b rtspsrc: drop stream-start message posted by the internal udp sink(s)
See #1368

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/685>
2020-07-29 14:06:55 +03:00
Hosang Lee
f8e686078d qtdemux: create correct pad names in encrypted streams
Refer to "original-media-type" when setting stream's subtype
for encrypted streams in mss mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/628>
2020-07-28 11:41:51 +00:00
Thibault Saunier
18aeb5bac1 matroskamux: Do caps renegotiation when it only adds fields
Matroskamux can accept caps renegotiation if the new caps is a
superset of the old one, meaning upstream added new info to
the caps.

Same logic as a5f22f03aa in qtmux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/678>
2020-07-28 07:35:37 +00:00
Tim-Philipp Müller
10f07e84a5 rtpfunnel: protect internal srccaps with lock
These are modified from sink pad event handlers, so
could be accessed from multiple threads at the same
time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/681>
2020-07-28 07:08:04 +00:00
Havard Graff
f5fc34ae83 rtpfunnel: copy caps before sending them in a caps-event
Reason being we don't want downstream to own a ref to our
internal caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/681>
2020-07-28 07:08:04 +00:00
Mathieu Duponchelle
aa34c29d3b rtpmanager: fix various documentation issues
Improper naming of properties, improper links, misc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/684>
2020-07-27 13:51:15 +00:00
Stéphane Cerveau
c943be8b25 qtdemux: add Dolby Vision fourcc
This identifiers are registered in the MPEG-RA and defined
to be used by the Dolby Vision AVC/HEVC streams.

This is a first step to present the stream to the decoder.
Additional box parsing of DOVIConfigurationBox is necessary
to complete the media presentation with proper Dolby Vision
enhancements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/658>
2020-07-21 15:53:52 +00:00
Luke Yelavich
1e39fe66ad imagefreeze: Copy GstCapsFeatures to caps for source pad
Allows using imagefreeze with buffers in GLMemory. The following pipeline
works.

gst-launch-1.0 filesrc location=image.jpg ! jpegdec ! glupload ! \
imagefreeze ! glcolorconvert ! glimagesinkelement

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/594>
2020-07-20 21:12:09 +00:00
Tim-Philipp Müller
913e17e19e rtpmanager: fix "redefinition of typedef RTPTWCCManager" compiler warning
G_DECLARE_FINAL_TYPE includes this typedef as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/675>
2020-07-20 18:20:59 +01:00
Olivier Crête
7effe918d1 rtp*pay: Allocate using the base class for audio codecs
This is required to add RTP header extensions from the
meta automatically.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/674>
2020-07-17 16:53:40 -04:00
Ognyan Tonchev
adb044c9ed rtspsrc: Fix segfault with illegal free
set_get_param_q is not a pointer so it is illegal to call g_queue_free_full().
Freeing the requests by popping them from the queue instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/669>
2020-07-15 13:19:38 +00:00
Justin Chadwell
738f32d5d0 qtdemux: fix allocation explosion with stsd entries
Previously, the user input for stsd entries is trusted completely, and
so a maliciously crafted file could choose the length of the stsd
entries arbitrarily and cause qtdemux to try to allocate up to 2GB of
memory (half of a 32 bit max int).

This patch fixes this by sanity checking the stsd input against the
size of the entire stsd atom.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/670>
2020-07-15 12:10:45 +00:00
Justin Chadwell
e6f66f4681 qtdemux: fix crashes when input stream contained no stsd entries
During trak parsing, we need to check for the existence of stsd_entries,
otherwise, we end up with a NULL pointer to them. It is entirely
possible for the stsd to exist, but for it to have no entries, which the
previous checks did not take into account.

This patch adds a simply check to ensure that all files that do not
contain a stsd entry are deemed corrupt, and adds a test case to prevent
a regression.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/670>
2020-07-15 12:10:45 +00:00
Sebastian Dröge
54bc0157b5 qtmux: Don't lock object lock twice in prefill mode
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/762

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/663>
2020-07-07 12:36:01 +03:00
Tim-Philipp Müller
31ff328727 meson: add update-orc-dist target
Add target to update backup orc -dist.[ch] files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/662>
2020-07-04 15:04:59 +01:00
Nirbheek Chauhan
c7f8c8d4ef deinterlace: Disable nasm support on x32
The assembly assumes pointers are 64-bit, so just disable it.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/660>
2020-07-02 07:53:14 +05:30
Nirbheek Chauhan
3fe4626e3c deinterlace: Fix build on x32
Need to pass `-f elfx32` to nasm in that case.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/757

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/657>
2020-07-01 19:43:41 +00:00
Jan Schmidt
7ae40045ba matroska-mux: Wait for caps on sparse streams
Don't set sparse streams to non-waiting at the collectpads
level until after capa arrive, as we need caps on all
pads before the file headers get written, or else the
subtitle track will be silently absent in the final file.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/724

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/656>
2020-07-01 19:24:49 +01:00
Jan Schmidt
ed5e935fb7 matroska-mux: Warn on late caps arrival
As well as warning when caps change after the headers
were already written, make sure to warn if the *first* caos
arrive late too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/656>
2020-07-01 16:13:27 +10:00
Sebastian Dröge
e589a950c3 imagefreeze: Return TRUE from the LATENCY query handling
We always answer it successfully no matter what.

The default return value in the function is FALSE even if the code below
sets it again to FALSE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/654>
2020-06-30 18:37:06 +03:00
Sebastian Dröge
8345caf6e0 imagefreeze: Add a live mode
Previously imagefreeze would always operate as non-live element and
output frames as fast as possible according to the configured segment
(via SEEK events) and the negotiated framerate from start to stop or the
other way around.

With the new live mode (enabled via the is-live property) it would only
output frames in PLAYING. Frames would be output according to the
negotiated framerate unless it would be too late, in which case it would
jump ahead and skip over the requirement amount of frames.

This makes it possible to actually use imagefreeze in live pipelines
without having to manually ensure somehow that it would start outputting
at the current running time and without still risking to fall behind
without recovery.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/653>
2020-06-29 12:07:14 +03:00
Sebastian Dröge
06b29a4aef imagefreeze: Correctly answer the LATENCY query
We never run as a live element, even if upstream is live, and never
output any buffers with latency but immediately generate buffers as
fast as we can according to the negotiated framerate.

Passing the query upstream would proxy whatever mode of operation
upstream has, which has nothing to do with how we produce buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/653>
2020-06-28 22:26:23 +03:00
Tim-Philipp Müller
4f555ecf8e splitmuxsink: flesh out docs for format-location* signals
Make explicit that the returned strings need to be g_free()-able.

Fixes #753

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/652>
2020-06-26 18:31:10 +00:00
Havard Graff
57eebe8b05 rtpstats: guard against division by zero
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/646>
2020-06-26 15:29:25 +00:00
Havard Graff
e45cc475bd rtptwcc: fix pruning of ack'ed twcc-packets
Fixes #750

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/645>
2020-06-26 12:53:07 +01:00
Sebastian Dröge
13331e051f splitmuxsink: Add new properties for setting muxer/sink presets
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/644>
2020-06-25 17:53:00 +03:00
Mathieu Duponchelle
8d464c8361 autodetect: mark filter-caps property as DOC_SHOW_DEFAULT
When generating the cache we inspect the base class through
an instance of one of its subclasses. We don't want potential
assignments in subclasses initialization to leak into the
base class documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/641>
2020-06-24 17:04:51 +02:00
Mathieu Duponchelle
f97430f6e9 docs: mark GstIirEqualizer as plugin API 2020-06-23 19:04:03 +02:00
Mathieu Duponchelle
c897fe2b73 docs: mark more types as plugin API 2020-06-23 10:25:55 -04:00
He Junyan
15fac84f63 deinterlace: Add the missing ORC_RESTRICT define.
ORC_RESTRICT may not be defined in yadif.c and cause build error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/637>
2020-06-21 20:11:06 +08:00
Seungha Yang
9122bfdfb7 meson: deinterlace: Check host cpu type for asm build
Add host cpu type check as we would enable asm only for x86_64

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/636>
2020-06-19 20:28:14 +09:00
Jan Schmidt
5c68e06b00 qtdemux: Split tag reading functions out
Move some code out of the enormous qtdemux.c into a separate
qtdemux_tags helper, and make some structs available via qtdemux.h
to accommodate that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/634>
2020-06-18 14:41:27 +00:00
Jan Schmidt
0ddfc5020f qtdemux: Move some tree parsing files out to a separate file.
Reduce a tiny bit of the bulk of qtdemux.c by moving some
agnostic helper functions out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/634>
2020-06-18 14:41:27 +00:00
Jan Schmidt
e2d75939bb qtdemux: Factor out svmi parsing. Fix bounds checking.
Move the SVMI stereoscopic atom parsing out to a helper
function to shrink qtdemux_parse_trak a bit.

Add a bounds check that the received atom is large enough
before parsing it.

Add a note to the atom parser that svmi comes from the
MPEG-A spec 23000-11.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/634>
2020-06-18 14:41:27 +00:00
Seungha Yang
8b4f18d53b rtspsrc: Don't return TRUE for unhandled query
Expected return value for unhandled query is FALSE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/629>
2020-06-16 19:35:30 +09:00
Vivia Nikolaidou
536ff4776f deinterlace: Add yadif ASM optimisations
Measured to be about 3.4x faster than C

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/621>
2020-06-16 12:53:25 +03:00
Vivia Nikolaidou
ef78014d15 deinterlace: Fix invalid read in yadif
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/621>
2020-06-12 13:21:02 +03:00
Sebastian Dröge
556e7ab210 flvdemux: Change a GST_ERROR_OBJECT() back to GST_DEBUG_OBJECT()
It was accidentally changed in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/436

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/624>
2020-06-12 09:52:56 +03:00
Jordan Petridis
3e2420361a Use gst_element_class_set_metadata when passing dynamic strings
gst_element_class_set_metadata is meant to only be used with
static or inlined strings, which isn't the case for the 2 elements
here resulting in use-after-free later on.

https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c#gst_element_class_set_static_metadata

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/622>
2020-06-11 20:39:33 +03:00
Sebastian Dröge
f8196e06d5 Revert "rtpjitterbuffer: Avoid deadlock on flush"
This reverts commit 54810bf44f

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/620>
2020-06-10 16:31:06 +00:00
U. Artie Eoff
bf0842aa0c rtpjitterbuffer: g_queue_clear_full introduced in glib 2.60
Define g_queue_clear_full if glib < 2.60.

Fixes #747

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/619>
2020-06-09 13:09:20 -07:00
Thibault Saunier
29a661d4a4 rtpsession: Make internal-ssrc as show default for doc 2020-06-09 11:45:13 -04:00
Nicolas Dufresne
5b2ad31583 rtptimerqueue: Fix leak on timer collision
While the caller should make sure this does not happen, make sure timer
collision are not silently ignored and leaked.

Fixes #726

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/616>
2020-06-08 17:54:53 -04:00
Nicolas Dufresne
b4f421e9aa rtpjitterbuffer: Keep JBUF lock while processing timers
Until now, do_expected_timeout() was shortly dropping the JBUF_LOCK in order
to push RTX event event without causing deadlock. As a side effect, some
CPU hung would happen as the timerqueue would get filled while looping over
the due timers. To mitigate this, we were processing the lost timer first and
placing into a queue the remainign to be processed later.

In the gap caused by an unlock, we could endup receiving one of the seqnum
present in the pending timers. In that case, the timer would not be found and
a new one was created. When we then update the expected timer, the seqnum
would already exist and the updated timer would be lost.

In this patch we remove the unlock from do_expected_timeout() and place all
pending RTX event into a queue (instead of pending timer). Then, as soon as
we have selected a timer to wait (or if there is no timer to wait for) we send
all the upstream RTX events. As we no longer unlock, we no longer need to pop
more then one timer from the queue, and we do so with the lock held, which
blocks any new colliding timers from being created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/616>
2020-06-08 17:54:53 -04:00
Edward Hervey
54810bf44f rtpjitterbuffer: Avoid deadlock on flush
When a GST_EVENT_FLUSH_START reaches the jitterbuffer, there is a chance that
our task is currently blocking waiting for a timer.

There was two problems:
* That wait wasn't checking for flushing situations
* The flushing handling wasn't waking up that conditional (to check whether it
should abort)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/608>
2020-06-08 13:34:26 +02:00
Mathieu Duponchelle
f63299ff2f plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:42:25 +02:00
Sebastian Dröge
e527eb3e4c rtpbin: Initialize uninitialized variable correctly
`last_out` would be used uninitialized if the element has no `set-active`
signal. Initialize it to -1 as that's what the "default" value is
further below.

CID 1455443

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/727

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/613>
2020-06-05 11:49:17 +03:00
Thibault Saunier
6f0f41fef0 doc: Fix wrong link to GString in rtpjitterbuffer 2020-06-03 22:44:09 -04:00
Mathieu Duponchelle
37c619f995 plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-03 22:44:09 -04:00
Sebastian Dröge
b94b9988fa rtspsrc: Use the correct type for storing the max-rtcp-rtp-time-diff property
It's an integer property and rtpbin also expects an integer. Passing it
as a GstClockTime (guint64) to g_object_set() will cause problems, and
on big endian MIPS apparently causes crashes.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/737

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/605>
2020-05-27 22:33:31 +03:00
Thibault Saunier
3fdae346ca rtspsrc: Error out when failling to receive message response
And let it rety twice.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/717

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/601>
2020-05-25 20:13:06 -04:00
Sebastian Dröge
2c278bb2ab flvdemux: Send gap events if one of the streams falls behind the other by more than 3s
Same mechanism and threshold as in other demuxers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/597>
2020-05-20 18:46:41 +00:00
Sebastian Dröge
0bb9880b36 flvdemux: Remove unused audio_linked/video_linked booleans
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/597>
2020-05-20 18:46:41 +00:00
Edward Hervey
5dd3643d94 flvdemux: Answer bitrate queries from upstream
If upstream (such as queue2 in urisourcebin) asks for our bitrate, check if we
have stored audio/video bitrates, and use them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/596>
2020-05-20 16:51:47 +03:00
Edward Hervey
e8282661b6 flvdemux: Handle empty metadata strings
g_utf8_validate() errors out on empty string. But empty strings are valid,
so only check if they're not

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/596>
2020-05-20 10:48:06 +02:00
Edward Hervey
9f5f906515 flvdemux: Set ACCEPT_TEMPLATE flag on sinkpad
A demuxer can accept any caps matching its sinkpad template caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/596>
2020-05-20 10:48:06 +02:00
Jan Schmidt
d8f0deadc3 deinterlace: Split out NULL checks in yadif
Separate out explicit NULL checks for fields we depend on so
that coverity can hopefully verify dependencies better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/585>
2020-05-09 03:09:03 +10:00
Jan Schmidt
1106eb16b6 deinterlace: Handle NV12/NV21 for the greedyl mode.
Don't fall back on the default interpolate_scanline function, which
blindly tries to copy from the next field, which can be NULL in
mixed progressive/interlaced streams

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/585>
2020-05-09 03:07:33 +10:00
Vivia Nikolaidou
82dc670f1f deinterlace: Support packed formats for YADIF
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/444>
2020-05-06 17:08:06 +00:00
Vivia Nikolaidou
5fce46f5ef deinterlace: Call the planar functions for the Y plane of nv12/nv21
In some algorithms (like yadif), the Y plane has to be handled different
than the UV plane. Therefore, the planar_y functions are now called for
the Y plane, and the nv12/nv21 functions are handling only the UV/VU
planes respectively.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/444>
2020-05-06 17:08:06 +00:00
Jan Schmidt
e9ee7ab0af deinterlace: Add C implementation of YADIF
Import the YADIF deinterlacer from ffmpeg and modify
it to match the simple deinterlace scanlines structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/444>
2020-05-06 17:08:06 +00:00
Jan Schmidt
1c1bc56a3b deinterlace: Allow for 5 fields for interpolation
Add an extra field to the simple deinterlace implementation,
so that methods can potentially use 5 fields - the current
field, and 2 before and 2 after.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/444>
2020-05-06 17:08:06 +00:00
Jan Schmidt
5468988223 deinterlace: Force renegotiation when changing mode
Switching the deinterlacing mode on-the-fly from disabled to
auto used to work, but was broken by commit #1f21747c some
years ago.

Force re-negotiation with downstream when the mode or
fields properties are changed, otherwise deinterlace
never switches out of the passthrough mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/584>
2020-05-07 01:31:59 +10:00
Sebastian Dröge
e5feaa76ed imagefreeze: Handle flushing correctly
First of all get rid of the atomic seeking boolean, which was only ever
set and never read. Replace it with a flushing boolean that is used in
the loop function to distinguish no buffer because of flushing and no
buffer because of an error as otherwise we could end up in a
GST_FLOW_ERROR case during flushing.

Also only reset the state of imagefreeze in flush-stop when all
processing is stopped instead of doing it as part of flush-start.

And last, get a reference to the imagefreeze buffer in the loop function
in the very beginning and work from that as otherwise it could in theory
be replaced or set to NULL in the meantime as we release and re-take the
mutex a couple of times during the loop function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/580>
2020-05-06 08:06:33 +00:00
Edward Hervey
756f390f56 videbox: Use MIN instead of CLAMP for uint
an unsigned int is always positive.

CID #206207
CID #206208
CID #206209
CID #206210
CID #206211

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/583>
2020-05-06 06:49:09 +00:00
Edward Hervey
619457ae26 avidemux: Avoid potential double-free
stream->name was being freed (without being NULL-ed) before we were certain it
would be set again.

CID #1456071

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/582>
2020-05-06 04:36:46 +00:00
Edward Hervey
518d192dc5 deinterlace: Don't leak frame in error case
CID #1455494

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/581>
2020-05-05 17:30:48 +02:00
Edward Hervey
cfb9a5d53a slitmuxsrc: Properly stop the loop if not part reader is present
Previously this would end up in a refcounting loop of hell.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/578>
2020-05-05 15:32:58 +02:00
Vivia Nikolaidou
6a38961561 flvmux: Add skip-backwards-streams property
Backwards timestamps confuse librtmp, even if they're only backwards
relative to the other stream. If the timestamp of a stream is going
backwards related to the other stream, this property allows the muxer to
skip a few buffers until it reaches the timestamp of the other stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/572>
2020-04-27 16:18:34 +03:00
Vivia Nikolaidou
b0855113c6 flvmux: Allow requesting streamable pads after header is written
Allows us to request pads after writing header for streamable flv's.

For non-streamable it doesn't make sense to request a new pad after
writing the header, because the headers have been written already and we
can't add the new stream. But for streamable, any clients that connect
after the new pad has been added will be able to see both streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/572>
2020-04-27 14:11:10 +03:00
Olivier Crête
3ae1bae2a3 qtdemux: Add 'mp3 ' fourcc that VLC seems to produce now
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/574>
2020-04-22 15:32:31 -04:00
Sebastian Dröge
7b22397cf5 rtpjitterbuffer: Properly free internal packets queue in finalize()
As we override the GLib item with our own structure, we cannot use any
function from GList or GQueue that would try to free the RTPJitterBufferItem.
In this patch, we move away from g_queue_new() which forces using
g_queue_free(). This this function could use g_slice_free() if there is any items
left in the queue. Passing the wrong size to GSLice may cause data corruption
and crash.

A better approach would be to use a proper intrusive linked list
implementation but that's left as an exercise for the next person
running into crashes caused by this.

Be ware that this regression was introduced 6 years ago in the following
commit [0], the call to flush() looked useless, as there was a g_queue_free()
afterward.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

[0] 479c7642fd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/573>
2020-04-22 10:28:30 -04:00
Seungha Yang
ca48f5265e splitmuxsink: Enhancement for timecode based split
The calculated threshold for timecode might be varying depending on
"max-size-timecode" and framerate.
For instance, with framerate 29.97 (30000/1001) and
"max-size-timecode=00:02:00;02", every fragment will have identical
number of frames 3598. However, when "max-size-timecode=00:02:00;00",
calculated next keyframe via gst_video_time_code_add_interval()
can be different per fragment, but this is the nature of timecode.
To compensate such timecode drift, we should keep track of expected
timecode of next fragment based on observed timecode.
2020-04-20 21:39:49 +09:00
Seungha Yang
fe73c3b0f3 splitmuxsink: Post error when requested timecode interval is invalid
In case we cannot rely on max-size-timecode for split decision,
post error instead of crashing
2020-04-19 20:23:32 +09:00
Havard Graff
981d0c02de rtpjitterbuffer: don't use RTX packets in rate-calc and reset-logic
The problem was this:

Due to the highly irregular arrival of RTX-packet the max-misorder variable
could be pushed very low. (-10).

If you then at some point get a big in the sequence-numbers (62 in the
test) you end up sending RTX-requests for some of those packets, and then
if the sender answers those requests, you are going to get a bunch of
RTX-packets arriving. (-13 and then 5 more packets in the test)

Now, if max-misorder is pushed very low at this point, these RTX-packets
will trigger the handle_big_gap_buffer() logic, and because they arriving
so neatly in order, (as they would, since they have been requested like
that), the gst_rtp_jitter_buffer_reset() will be called, and two things
will happen:
1. priv->next_seqnum will be set to the first RTX packet
2. the 5 RTX-packet will be pushed into the chain() function

However, at this point, these RTX-packets are no longer valid, the
jitterbuffer has already pushed lost-events for these, so they will now
be dropped on the floor, and never make it to the waiting loop-function.

And, since we now have a priv->next_seqnum that will never arrive
in the loop-function, the jitterbuffer is now stalled forever, and will
not push out another buffer.

The proposed fixes:
1. Don't use RTX in calculation of the packet-rate.
2. Don't use RTX in large-gap logic, as they are likely to be dropped.
2020-04-16 17:06:31 +02:00
Sebastian Dröge
d75ea5b340 splitmuxsink: Do split-at-running-time splitting based on the time of the start of the GOP
If the start of the GOP is >= the requested running time, put it into a
new fragment. That is, split-at-running-time would always ensure that a
split happens as early as possible after the given running time.

Previously it was comparing against the current incoming timestamp,
which does not tell us what we actually want to know as it has no direct
relation to the GOP start/end.
2020-04-15 17:52:41 +03:00
Sebastian Dröge
0ab0f92cac splitmuxsink: Fix off-by-one in running time comparison for split-at-running-time
If we get a keyframe exactly at the requested running time we would only
split on the next keyframe afterwards due to wrong usage of > vs. >=.
2020-04-15 13:33:17 +03:00
Thibault Saunier
fd7ecac793 rtspsrc: Properly set segments seqnums after seeks 2020-04-09 14:03:04 -04:00
Vivia Nikolaidou
9189cdcb1d flvdemux: Don't write an empty string as a tag
To stop warnings like:

GStreamer-WARNING **: 19:47:48.186: Trying to set empty string on
taglist field 'encoder'. Please file a bug.
2020-04-08 20:22:51 +03:00
Thibault Saunier
00539e1277 rtspsrc: Avoid stack overflow recursing waiting for response
Instead of recursing, simply implement a loop with gotos, the same
way it was done before 8121752887

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/710
2020-04-08 09:49:49 -04:00
Sebastian Dröge
cf3fbf57bf qtmux: Add property for enforcing the creation of chunks in single-stream files
This is disabled by default as it unnecessarily creates bigger headers
but it is something that is required by some applications and most
notably the Apple ProRes spec.
2020-04-06 16:25:59 +03:00
Jan Schmidt
a3933ea53d flvmux: Fix invalid padlist accesses.
Request pads can released at any time, so make sure to hold
the object lock when iterating the element sinkpads list where
that's safe, or to use other safe pad iteration patterns in
other places.

When choosing a best pad, return a reference to the pad to make sure it
stays alive for output in the aggregator srcpad task.

Should fix a spurious valgrind error in the CI flvmux tests and some
other potential problems if the request sink pads are released while
the element is running..

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/714
2020-04-05 11:50:43 +00:00
Vivia Nikolaidou
5817c659e6 qtmux: Add option to create a timecode trak in non-mov flavors
Even if timecode trak is officially unsupported in non-mov flavors,
some software still supports it, e.g. Final Cut Pro X:

https://developer.apple.com/library/archive/technotes/tn2174/_index.html

The user might still expect to see the timecode information in the
non-mov file despite it being officially unsupported , because other
software e.g. QuickTime will create a timecode trak even in mp4 files.
Furthermore, software that supports timecode trak in non-mov flavors
will also display the file duration in "timecode units" instead of real
clock time, which is not necessarily the same for 29.97 fps and friends.
This might confuse users, who see a different duration for the same
framerate and amount of frames depending on whether the container is mp4
or mov.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/512
2020-04-03 18:19:38 +00:00
Sebastian Dröge
db69f02dd8 rtpLXXdepay: Set the UNPOSITIONED flag on the audio-info when configuring an unpositioned layout
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/688
2020-04-03 17:57:23 +00:00
Kristofer Björkström
586fc57e55 rtpjpeg: Use gst_memory_map() instead of gst_buffer_map()
gst_buffer_map () results in memcopying when a GstBuffer contains
more than one GstMemory.
This has quite an impact on performance on systems with limited amount
of resources. With this patch the whole GstBuffer will not be mapped at
once, instead each individual GstMemory will be iterated and mapped
separately.
2020-04-03 17:01:24 +02:00
Kristofer Björkström
54b6ee0c55 buffermemory: keep track of buffer size and current offset
Added the possibility to get current offset and the total size of the
buffer.
2020-04-03 17:01:24 +02:00
Havard Graff
d9aaa15a30 rtpopuspay: make depay ! pay work
There is a use-case for a server to re-payload opus going through it.

Problem was that the payloader requires channels in the caps, but
this is not something the depayloader can parse out of the stream, meaning
caps-negotiation would fail.

Removing the requirement of channels in the template-caps fixes this.
2020-04-03 09:04:32 +00:00
Seungha Yang
599066726f splitmuxsink: Don't send too many force key unit event
splitmuxsink should requst keyframe depending on configured
threshold and previously requested time in order to avoid too many
keyframe request.
2020-04-03 15:00:37 +09:00
Jan Schmidt
78eaa7c6ed matroska: Check the return value of gst_segment_do_seek()
gst_segment_do_seek() can fail.
2020-04-02 05:23:17 +00:00
Sebastian Dröge
f757fbe0f7 qtdemux: Send instant-rate-change event if requested in the SEEK event
Handle an instant rate change seek immediately by reflecting
it downstream as an instant-rate-change event, and do no
further seek handling.
2020-04-02 05:23:17 +00:00
Sebastian Dröge
5d0657d4ae matroska-demux: Send instant-rate-change event if requested in the SEEK event
Short-circuit instant rate change events by generating
a downstream instant-rate-change event and doing no further
seek processing.
2020-04-02 05:23:17 +00:00
Seungha Yang
cb8c83e799 matroska: Update for video-hdr struct change
See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594
2020-04-01 05:19:24 +00:00
Aaron Boxer
3b65663846 rtpbin: make warning messages more meaningful 2020-03-31 15:51:27 -04:00
Nicolas Pernas Maradei
ce0fb9bd29 rtpsession: rename RTCP thread
RTP session starts a new thread for RTCP and names it
"rtpsession-rtcp-thread" which happens to be longer than the maximum 16B
allowed by pthread_setname_np and causes the naming to fail.
See docs for more details.

This commit simply shortens the thread's name so it can actually be set.
2020-03-31 13:34:07 +02:00
Havard Graff
3368ed44a3 rtpjitterbuffer: create specific API for appending buffers, events etc
To avoid specifying a bunch of mystic variables.
2020-03-31 10:02:57 +00:00
Havard Graff
818b38ebdd rtpjitterbuffer: fix waiting timer/queue code
Changing the types from boolean to guint due to the ++ operand used on
them, and only call JBUF_SIGNAL_QUEUE after settling down,
or else you end up signaling the waiting code in chain() for every buffer
pushed out.
2020-03-30 22:32:21 +02:00
Sebastian Dröge
d427b9bddf qtmux: Error out instead of crashing if reserved-max-duration is 0 or no samples could be created in prefill mode 2020-03-27 10:35:04 +00:00
Jan Schmidt
00a08c69ac splitmuxsrc: Fix some deadlock conditions and a crash
When switching the splitmuxsrc state back to NULL quickly, it
can encounter deadlocks shutting down the part readers that
are still starting up, or encounter a crash if the splitmuxsrc
cleaned up the parts before the async callback could run.

Taking the state lock to post async-start / async-done messages can
deadlock if the state change function is trying to shut down the
element, so use some finer grained locks for that.
2020-03-26 14:44:54 -04:00
Seungha Yang
a40eacabb4 splitmuxsink: Split fragment only if queued time is larger than threshold
The queued time includes the duration of the last queued frame
(i.e., new keyframe) so the condition check should not be inclusive.
Note that the new fragment will be cut excluding the last frame
and therefore if the condition is inclusive way,
the fragment might have one frame shorter duration for all keyframe
stream such as jpeg or all-inter video streams.
2020-03-25 13:22:31 +00:00
Seungha Yang
6256fc67e4 splitmuxsink: Don't need to trace next timecode for split decision
Since the commit 94bb76b6b9, splitmuxsink
will split fragments based on queued time and the threshold of that.
So don't need to store the next timecode for split decision.
2020-03-25 13:22:31 +00:00
Seungha Yang
0acd5d9f8b splitmuxsink: Mark some split decision related properties as MUTABLE_READY
The change of various criteria for split decision while muxing is on progress
wouldn't work well as expected.
2020-03-24 22:09:48 +09:00
Seungha Yang
94bb76b6b9 splitmuxsink: Take account queued time and max-size-timecode for split decision
Not only the requested keyframe time, the queued size should be
a criterion for the split decision of timecode based mode
(same as max-size-time based split case).
2020-03-24 22:04:21 +09:00
Xavier Claessens
6e1758d509 Fix usage of C99
It's 2020, way too early for that, let's stick to C89 for now.
2020-03-23 21:32:04 -04:00
Havard Graff
a710bda1ab rtptimerqueue: remove ->num from the timer
This concept was only used by the "multi"-lost timer, and since that
one is not around any longer, the "num" concept is superfluous.
2020-03-20 13:17:20 +00:00
Havard Graff
f1ff80ced0 rtpjitterbuffer: remove the concept of "already-lost"
This is a concept that only applies when a buffer arrives in the chain
function, and it has already been scheduled as part of a "multi"-lost
timer.

However, "multi"-lost timers are now a thing of the past, making this
whole concept superflous, and this buffer is now simply counted as "late",
having already been pushed out (albeit as a lost-event).
2020-03-20 13:17:20 +00:00
Havard Graff
5dacf366c0 rtpjitterbuffer: immediately insert a lost-event on multiple lost packets
There is a problem with the code today, where a single timer will
be scheduled for a series of lost packets, and then if the first packet
in that series arrives, it will cause a rescheduling of that timer, going
from a "multi"-timer to a single-timer, causing a lot of the packets
in that timer to be unaccounted for, and creating a situation in where
the jitterbuffer will never again push out another packet.

This patch solves the problem by instead of scheduling those lost packets
as another timer, it instead asks to have that lost-event pushed straight
out.

This very much goes with the intent of the code here: These packets are
so desperately late that no cure exists, and we might as well get the
lost-event out of the way and get on with it.

This change has some interesting knock-on effect being presented in
later commits. It completely removes the concept of "already-lost", so
that is why that test has been disabled in this commit, to be
removed later.
2020-03-20 13:17:20 +00:00
Havard Graff
2fa7e6a6d4 rtpjitterbuffer: refactor lost_timeout code
Split it up in code related to the timer, (do_lost_timeout) and code
to insert a lost-item/event and update private jitterbuffer-variables.
2020-03-20 13:17:20 +00:00
Seungha Yang
4f443c81cf qtmux: Fix build warning
gstqtmux.c(644): warning C4133: '=':
  incompatible types - from 'gboolean (__cdecl *)(GstAggregator *,GstAggregatorPad *,GstEvent *)'
  to 'GstFlowReturn (__cdecl *)(GstAggregator *,GstAggregatorPad *,GstEvent *)'
2020-03-19 19:20:05 +00:00
Jan Schmidt
c5181c23a4 splitmuxsink: Reset cleanly for reuse
Reset the splitmuxsink completely when changing states so that
it can be reused.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1241
2020-03-19 15:37:14 +00:00
Zebediah Figura
71bb53a648 mpegaudioparse: Use a constant bit rate to convert between time and bytes if possible.
This should result in no worse accuracy than the base parse element, and may
result in better accuracy. In particular, the number of bytes processed at any
given point, as accumulated by baseparse, can be only accurate to
(1 / # of frames) bytes per second, and if we try to seek immediately after
pausing the pipeline to a large offset, this small inaccuracy can propagate to
something noticeable.

The use case that prompted this patch is a 45-minute MPEG-1 layer 3 file, which
has a constant bit rate but no seek tables. Trying to seek the pipeline
immediately after pauisng it, without the ACCURATE flag, to a location 41
minutes in, yields a location that is, even with <https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/374>,
still audibly incorrect. This patch yields a much closer position, no longer
audibly incorrect, and likely within a frame of the most correct position.
2020-03-19 14:02:44 +00:00
Mathieu Duponchelle
56e5243f03 qtmux: fix renegotiation check
By the time sink_event is called, the pad's current caps have
already been updated. To address this, implement sink_event_pre_queue,
and check if the pad can be renegotiated there.

Fixes #707
2020-03-19 23:34:52 +11:00
Seungha Yang
18e09de0a2 splitmuxsink: Decouple keyframe request and the decision for fragmentation
Split the decision for keyframe request and fragmentation in order to
ensure periodic keyframe request.
2020-03-19 10:17:21 +00:00
Stian Selnes
81a87c26f9 rtpvp8pay, rtpvp9pay: fix caps leak in set_caps() 2020-03-12 16:49:58 +00:00
Edward Hervey
5a893f2a95 videomixer: Don't leak peer caps 2020-03-12 11:22:56 +01:00
Thibault Saunier
21bc0d527b imagesequencesrc: Cleanup and add some features
* Implement the GstURIHandlerInterface
* Rework the locking
* Implement backward seeking handling
* Generate documentation
2020-03-11 15:11:54 +00:00
Fabian Orccon
7511999083 Add an imagesequencesrc element to stream sequence of images
See: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/121
2020-03-11 15:11:54 +00:00
yychao
7f89085251 qtdemux: Add support for AC4
The caps received from qtdemux for AC-4 content are audio/x-gst-fourcc-ac_4

Based on patch by: Savinderjit Kaur

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/413
2020-03-10 15:28:01 +00:00
Matthew Waters
dacdc74043 imagefreeze: handle reconfigure events on the srcpad 2020-03-10 21:22:20 +11:00
Matthew Waters
07a8a1c484 imagefreeze: properly ignore setting caps failures
Ignore the return value of gst_pad_set_caps() so that setcaps will set a
framerate that is usable.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/705
2020-03-10 21:22:03 +11:00
Matthew Waters
28f49e1fd5 imagefreeze: don't fail sending sticky events downstream
They will be repropagated anyway.
2020-03-10 21:08:45 +11:00
Markus Ebner
5dcbb6b0d8 videocrop: Add support for Y41B and Y42B 2020-03-10 08:24:56 +00:00
Markus Ebner
b562235283 videocrop: Add support for Y444
- Refactored the planar transform method to support all video formats
  that are stored planar, independent of the used subsampling
- Added support for Y444
2020-03-10 08:24:56 +00:00
Markus Ebner
4a9e5bbf8b videocrop: Use G_VALUE_INIT to initialize GValues 2020-03-10 08:24:56 +00:00
Ognyan Tonchev
a78a74bff0 rtph26x: Use gst_memory_map() instead of gst_buffer_map() in avc mode
gst_buffer_map () results in memcopying when a GstBuffer contains
more than one GstMemory and when AVC (length-prefixed) alignment is used.
This has quite an impact on performance on systems with limited amount of
resources. With this patch the whole GstBuffer will not be mapped at once,
instead each individual GstMemory will be iterated and mapped separately.
2020-03-06 10:44:16 +00:00
Havard Graff
4046970b01 rtptwcc: make RTPTWCCManager a GObject 2020-03-04 16:48:04 +01:00
Havard Graff
026223cde2 rtpjitterbuffer: fix stalling when resetting timers
When calling gst_rtp_jitter_buffer_reset you pass in a seqnum.

This is considered the starting-point for a new stream.

However, the old behavior would unref this buffer, basically lying to
the thread that is pushing out buffers saying that it can expect
this buffer, when it would never arrive. The resulting effect being no
more buffer pushed out of the jitterbuffer, and it would buffer
incoming data indefinitely.

By instead inserting the buffer in the gap_packets queue, the _reset()
function will take responsibility for using that as the first buffer
of the new stream.

Fixes #703
2020-03-04 12:55:52 +01:00
Jan Schmidt
f490c38416 splitmux: Avoid negative DTS
In order to concatenate fragments, splitmuxsrc offsets
the start of each fragment PTS to 0 to align it with the
previous file. This means that DTS can go negative for
the first fragment, with really bad results.

Add a fixed offset to outgoing timestamp ranges to
avoid that.
2020-03-04 05:42:21 +00:00
Jan Schmidt
54f68ff36b qtmux: Remove warning in the log for mono video
Vanilla mono video was generating a spurious warning into the debug log
that's just misleading. Handle mono caps explicitly to avoid the warning.
2020-03-04 04:14:40 +00:00
Guillaume Desmottes
d43ad6e029 deinterlace: add alternate support
In this mode each field is carried using its own buffer.
Allow deinterlace to negotiate caps with the Interlaced feature and
adjust the algorithm fetching lines.

Fix #620
2020-03-03 17:15:00 +00:00
Guillaume Desmottes
b3d96e06c6 deinterlace: add wrapper to get field lines from history
No semantic change so far, will be used to implement alternate support.
2020-03-03 17:15:00 +00:00
Guillaume Desmottes
f0eb1419f6 deinterlace: stop checking line index boundaries
The LINE2() macro already prevents out of bound indexes using CLAMP_HI()
and CLAMP_LOW().
2020-03-03 17:15:00 +00:00
Guillaume Desmottes
cca8008779 deinterlace: fix video info on output frames
Output frames used to have their interlace mode set to the same one as
the input. This breaks their field and comp heights when deinterlacing
an alternate stream.
2020-03-03 17:15:00 +00:00
Guillaume Desmottes
6dde6038cc deinterlace: use output caps to compute buffer size
In interlace-mode=alternate the input buffers have half the size of the
output ones as each field has its own buffer.
2020-03-03 17:15:00 +00:00
Jennifer Berringer
3287f1cb3f flacparse: fix broken reordering of flac metadata
Each FLAC metadata block starts with a flag denoting whether it is the
last metadata block. The existing flacparse code moves any existing
VORBISCOMMENT block to immediately follow the STREAMINFO block without
changing any block's last-metadata-block flag. If no VORBISCOMMENT block
exists, it created one with the last-metadata-block flag set to true.
This results in gstflacdec sometimes giving bad headers to libflac when
trying to play perfectly valid FLAC files depending on the file's
metadata ordering. Depending on the contents of the other metadata
blocks, current versions of libflac may or may not return
FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER when given this broken
metadata. This is most noticeable with files that have a large cover art
image attached where VORBISCOMMENT is the very last metadata block with
no PADDING afterwards.

This patch changes that behavior so that:

1. For FLAC files that already have a VORBISCOMMENT block, the metadata
   order is preserved.
2. For FLAC files that do not have a VORBISCOMMENT block, the generated
   dummy VORBISCOMMENT is placed immediately after STREAMINFO and
   inherits the last-metadata-block flag from STREAMINFO.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/484
2020-03-03 08:03:32 +00:00
Sebastian Dröge
885d330ee6 qtdemux: Try to infer useful header values for raw audio if the sound sample descriptions contain zero values 2020-02-28 13:52:40 +00:00
Sebastian Dröge
9e9af6711d qtdemux: Also use the enda atom for determining endianess of in32, fl32 and fl64 formats
Previously it was only used for in24.
2020-02-28 13:52:40 +00:00
Sebastian Dröge
67be373221 qtdemux: Fix up header information for various fixed-format raw audio formats
Sometimes the headers contain useless, wrong or zero values for e.g. the
sample size with these formats. There's only a single valid value for
them so let's set these instead.
2020-02-28 13:52:40 +00:00
Sebastian Dröge
2c5f6e508c qtdemux: Don't print "unhandled type" warnings for various other raw audio fourccs 2020-02-28 13:52:40 +00:00