Commit graph

671 commits

Author SHA1 Message Date
Sebastian Dröge
284dd5443f qtdemux: Add support for version 1 cslg boxes
They use 64 bit fields instead of 32 bit.

Also parse offset as a signed integer (in both versions) and clamp it to
a positive value as negative values don't really interest us here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1294>
2021-11-12 17:51:03 +00:00
Sebastian Dröge
7f105a919a qtdemux: Don't free cslg data that we don't own on corrupt files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1294>
2021-11-12 17:51:03 +00:00
Nirbheek Chauhan
5d3009b7f8 audio-resampler: Fix segfault when we can't output any frames
Sometimes the resampler has enough space to store all the incoming
samples without outputting anything. When this happens,
gst_audio_resampler_get_out_frames() returns 0.

In that case, the resampler should consume samples and just return.
Otherwise, we get a segfault when gst_audio_resampler_resample() tries
to resample into a NULL 'out' pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1343>
2021-11-12 16:12:27 +00:00
Rafał Dzięgiel
41385ab6f7 matroska: Ref index table when updating track info
Track index table array was being lost during track info update.
Ref it over to updated info, so it can be used for finding
nearest seek points.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1203>
2021-11-12 12:28:40 +00:00
Rafał Dzięgiel
478f94edc7 matroska: Use g_array_unref everywhere
Instead of using g_array_free which is not thread safe use g_array_unref instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1203>
2021-11-12 12:28:40 +00:00
Tim-Philipp Müller
972615cf22 docs: fix unnecessary ampersand, < and > escaping in code blocks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1340>
2021-11-12 11:39:19 +00:00
Mathieu Duponchelle
792fb05cec st2022-1-fecdec: fix packet trimming
g_sequence_remove_range's end iter is exclusive, so if one
wants to remove that item as well, it should be called with
the next iter.

This could in theory fix an issue where:

* The sequence isn't entirely trimmed, with an old item lingering

* Following FEC packets are immediately discarded because they
  arrived later than corresponding media packets, long enough for
  seqnums to wrap around

* We now try to reconstruct a media packet with a completely obsolete
  FEC packet, chaos ensues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1341>
2021-11-12 08:15:28 +00:00
Matthew Waters
d2fd5f1534 qmlsink: support caps changes better
We need to hold onto the last buffer until the next buffer arrives.
Before, if a caps change comes we would remove the currently rendering
buffer.  if Qt asks use to render something, we would render the dummy
black texture.

Fixes a period of black output when upstream is e.g. changing resolution
as in hls adaptive bitrate scenarios.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1338>
2021-11-12 07:17:17 +00:00
James Cowgill
1e27ea63af v4l2: Record buffer states in pool to fix dequeue race
The `gst_v4l2_buffer_pool_dqbuf` function contains this ominous comment:

    /* get our GstBuffer with that index from the pool, if the buffer was
     * outstanding we have a serious problem.
     */
    outbuf = pool->buffers[group->buffer.index];

Unfortunately it is common for buffers in _output_ buffer pools to be
both queued and outstanding at the same time. This can happen if the
upstream element keeps a reference to the buffer, or in an encoder
element itself when it keeps a reference to the input buffer for each
frame.

Since the current code doesn't handle this case properly we can end up
with crashes in other elements such as:

    (gst-launch-1.0:32559): CRITICAL **: 17:33:35.740: gst_video_frame_map_id: assertion 'GST_IS_BUFFER (buffer)' failed

and:

    (gst-launch-1.0:231): GStreamer-CRITICAL **: 00:16:20.882: write map requested on non-writable buffer

Both these crashes are caused by a race condition related to releasing
the same buffer twice from two different threads. If a buffer is queued
and outstanding this situation is possible:

**Thread 1**
- Calls `gst_buffer_unref` decrementing the reference count to zero.
- The core GstBufferPool object marks the buffer non-outstanding.
- Calls the V4L2 release buffer function.
- If the buffer is _not_ queued:
  - Release it back to the free pool (containing non-queued buffers).

**Thread 2**
- Dequeues the queued output buffer.
  - Marks the buffer as not queued.
- If the buffer is _not_ outstanding:
  - Calls the V4L2 release buffer function.
  - Release it back to the free pool (containing non-queued buffers).

If both of these threads run at exactly the same time there is a small
window where the buffer is marked both not outstanding and not queued
but before it has been released. In this case the buffer will be freed
twice causing the above crashes.

Unfortunately the variable recording whether a buffer is outstanding is
part of the core `GstBuffer` object and is managed by `GstBufferPool` so
it's not as straightforward as adding a mutex. Instead we can fix this
by additionally recording the buffer state in `GstV4l2BufferPool`, and
handle "internal" and "external" buffer release separately so we can
detect when a buffer becomes not outstanding.

In the new solution:
- The "external" buffer pool release and the "dqbuf" functions
  atomically update the buffer state and determine if a buffer is still
  queued or outstanding.
- Subsequent code and a new
  `gst_v4l2_buffer_pool_complete_release_buffer` function can proceed to
  release (or not) a buffer knowing that it's not racing with another
  thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1010>
2021-11-11 22:30:31 +00:00
Xavier Claessens
ffcf697c2d gst-python: Add option to disable python plugin
It is not always needed, at least Ubuntu package it separately and don't
install it by default. Also when doing a static build there is an
unavoidable warning otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1337>
2021-11-10 13:38:04 -05:00
Timo Wischer
8e7ce64a6e avtp: crf: Process also local CRF streams
Without this patch locally generated CRF streams will be ignored.
Therefore the same network interface could not be CRF talker and
CRF listener.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1074>
2021-11-10 16:53:04 +00:00
Olivier Crête
27808444ea webrtc janus rust: Update extra dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
5ab09323cd webrtc multiparty rust: Upgrade all other deps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
c592f75cdd webrtc sendrecv rust: Upgrade all other deps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
26e8624c9b webrtc multiparty rust: Port to bindings 0.17 version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
93032b2ecc webrtc sendrecv rust: Port to bindings 0.17 version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Jiri Uncovsky
9abac91c96 glcontext/egl: add missing unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1328>
2021-11-10 15:27:45 +00:00
Matthew Waters
71dd47516c rtpbin: separate out the two fec decoder locations
The pipeline flow for receiving looks like this:

rtpsession ! rtpssrcdemux ! session_fec_decoder ! rtpjitterbuffer ! \
  rtpptdemux ! stream_fec_decoder ! ...

There are two places where a fec decoder could be placed.
1. As requested from the 'request-fec-decoder' signal: after rtpptdemux
   for each ssrc/pt produced
2. after rtpssrcdemux but before rtpjitterbuffer: added for the
   rtpst2022-1-fecenc/dec elements,

However, there was some cross-contamination of the elements involved and
the request-fec-decoder signal was also being used to request the fec
decoder for the session_fec_decoder which would then be cached and
re-used for subsequent fec decoder requests.  This would cause the same
element to be attempted to be linked to multiple elements in different
places in the pipeline.  This would fail and cause all kinds of havoc
usually resulting in a not-linked error being returned upstream and an
error message being posted by the source.

Fix by not using the request-fec-decoder signal for requesting the
session_fec_decoder and instead solely rely on the added properties for
that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1300>
2021-11-10 10:38:26 +00:00
Jean Felder
bd91286a3b id3tag: Map GST_TAG_MUSICBRAINZ_RELEASETRACKID
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1331>
2021-11-10 01:33:33 +00:00
Jean Felder
aaf72b9ff4 id3tag: Map GST_TAG_MUSICBRAINZ_RELEASEGROUPID
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1331>
2021-11-10 01:33:33 +00:00
Jean Felder
b1c74609e8 id3tag: Remove trailing whitespace
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1331>
2021-11-10 01:33:33 +00:00
Zhao, Gang
6cad2a7150 qtdemux: Fix can not demux Opus track made by qtmux
Opus stream info is read from dOps box [1]. The offset of dOps box in Opus box is different in mp4a version 1 and 0 [2]. Calculate the offset of dOps box according to mp4a version.

[1] https://opus-codec.org/docs/opus_in_isobmff.html

[2] subprojects/gst-plugins-good/gst/isomp4/atoms.c:sample_entry_mp4a_copy_data:2146

Fixed: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/918
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1329>
2021-11-09 17:57:49 +00:00
Ralf Sippl
0c9d9d90d9 docs: app-dev: events: seeking: use CLOCK_TIME_NONE instead of -1 and fix parameter names
to match the parameter names in the gst_element_seek() declaration.

Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/34/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1324>
2021-11-09 17:46:31 +00:00
wuchang li
7ac662f19d docs: installing-on-macos: flesh out instructions what to download
Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/106/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1324>
2021-11-09 17:46:31 +00:00
Tyler Compton
ebb61c5e24 plugin-development: basics-boilerplate: Remove unneeded meson.build edit step
Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/157/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1324>
2021-11-09 17:46:31 +00:00
Teh Yule Kim
c66b10b5cb docs: installing-on-windows: mention packages to download
Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/158/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1324>
2021-11-09 17:46:31 +00:00
Teh Yule Kim
bda72282dd docs: tutorials: add link to Rust version of the tutorials
Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/159/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1324>
2021-11-09 17:46:31 +00:00
fjmax
5c9fe1dc3c docs: tutorials: playback-3: flesh out build instructions
Add information about how to compile this file. The code in this
tutorial also requires `gstreamer-audio-1.0`, so we cannot use
the commands from the previous tutorial.

Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/164/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1324>
2021-11-09 17:46:31 +00:00
wngecn
bcff6abafd docs: plugin-dev: basics-boilerplate: fix typo in variable name
Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/166/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1324>
2021-11-09 17:46:31 +00:00
Timo Wischer
36006c61e9 avtpsrc: Use correct size for provided buffers
Without this patch the following pipeline would send packets containing
garbage in the data section.
$ gst-launch-1.0 avtpsrc ! avtpsink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1077>
2021-11-09 16:59:10 +00:00
Guillaume Desmottes
9b809d4cc3 appsrc: log when segment changes
We were logging when it does not change but not when it does, which is
confusing when reading logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1327>
2021-11-09 16:19:05 +00:00
Timo Wischer
de95d3a1c4 avtp: crfsync: Warn when CRF package not yet received
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1075>
2021-11-09 15:36:25 +01:00
Haihua Hu
a66124a79c v4l2bufferpool: set video alignment of video meta
need apply video alignment info on video meta, downstream
element can get buffer alignment from video meta

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1326>
2021-11-09 13:32:46 +00:00
Timo Wischer
214691b972 test: avtp: crf: Check for rounding errors
on average period calculation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1073>
2021-11-09 10:59:00 +00:00
Timo Wischer
5a25eb61b7 avtp: crf: Use double for average period calculation
to also support CRF intervals like every 1,333,333ns 64 events

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1073>
2021-11-09 10:59:00 +00:00
Timo Wischer
6a576938ac tests: avtp: crf: Test for timestamp_interval > 1
in case of CRF AVTPDUs with single CRF timestamp.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1076>
2021-11-09 09:07:01 +01:00
Timo Wischer
5a9e9895ab avtp: crf: Properly handling one timestamp per PDU
The average_period should always represent the time between two
events. The specification defines the event time as the time
between audio samples, video frame sync, video line sync, etc.
In case of one timestamp per PDU the timestamp_interval identifies
the amount of events between the timestamp of one PDU and the
timestamp of the next PDU.
As described in IEEE 1722-2016 chapter
"10.4.12 timestamp_interval field" timestamp_interval shall be
nonzero.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1076>
2021-11-09 09:07:01 +01:00
Thomas Klausner
49449dfa41 shm: NetBSD build fix
shm_unlink() and friends live in librt on NetBSD. Adapt build system.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1323>
2021-11-08 21:14:42 +00:00
Sebastian Dröge
79c4275ed4 bin: Don't check twice for adding a bin to itself or removing it from itself
This is already covered by a `g_return_val_if_fail()` in the calling
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1320>
2021-11-08 20:31:44 +00:00
Sebastian Dröge
ddfd778c19 bin: Switch g_warning()s to GST_WARNING_OBJECT()s when adding/removing an element to a bin fails
The failure conditions can be overidden by subclasses, and a boolean
return value is provided to the caller whether adding/removing the child
element has actually worked. The caller can then handle this
accordingly but flooding stderr with this is not very useful.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1320>
2021-11-08 20:31:44 +00:00
Zhao, Gang
5ac1a12927 vpxdec: Skip check of key frame when open GOP
Valid stream [1] might has no key frame.

Fixed: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/890

[1] https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/vp90-2-16-intra-only.webm

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1316>
2021-11-08 19:42:47 +00:00
Tim-Philipp Müller
fb4be45e6f gst-integration-tests: medias: update git module to latest commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1184>
2021-11-08 18:59:58 +00:00
Joe Todd
a0df14f36b osxaudio: Increase max channels to 64
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1059>
2021-11-08 18:09:52 +00:00
Nicolas Dufresne
d4bcff7dab gstinfo: Fix leak in generate_backtrace_trace
Spotted by Laurent Pinchart.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/901>
2021-11-08 17:22:06 +00:00
Martin Reboredo
2546cef4be aom: Set fixed_qp_offsets to a deactivated value
aom only uses fixed_qp_offsets with the
Constant Quality (Q) Rate Control mode,
previously this was locking any usage
with another Rate Control mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1198>
2021-11-08 16:42:17 +00:00
Thibault Saunier
a2460a8adc meson:ges: Fix typo adding ges gir to libs list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1322>
2021-11-08 11:10:11 -03:00
Nirbheek Chauhan
557d385d6c gst-ptp-helper: Do not disable multicast loopback
Otherwise we cannot run gst-ptp-helper if the PTP master is on the
same device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1306>
2021-11-08 07:27:08 +00:00
Thibault Saunier
9413fb7ea2 tests:ges: Take TIMEOUT_FACTOR into account
This env var is set in the CI so we grow the timeout as required
(when running in valgrind for example).

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/jobs/15449209

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1315>
2021-11-05 17:00:25 +00:00
Antonio Ospite
7deee582d2 magicleap: update lumin_rt libraries names to the latest official version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1314>
2021-11-05 16:21:34 +00:00
He Junyan
0345188aaa codecs: h264dec: Calculate the latency by its bump mode.
The current latency calculation just uses the num_reorder_frames,
which is not very precise. We should consider the bump mode of the
DPB, the faster it bumps, the lower latency we will have.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1046>
2021-11-05 14:40:42 +00:00
Thibault Saunier
d0c5778669 doc: Update nvdec documentation
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/870

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1309>
2021-11-05 13:26:33 +00:00
Sanchayan Maity
3f49b21b80 imagefreeze: Only set caps if they do not match current caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1311>
2021-11-05 15:34:47 +05:30
Seungha Yang
21d7bd09ce h264parse: Don't insert extra AUD if exists in bitstream already
AUD nalu in packetized format is completely valid and therefore we should not
assume that we should insert AUD for packetized -> bytestream
conversion.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/862
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1296>
2021-11-04 16:32:55 +00:00
Seungha Yang
aa1d97b0fb tests: h264parse: Add test for AUD insertion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1296>
2021-11-04 16:32:54 +00:00
Sebastian Dröge
d2f66106a8 v4l2: Support bools for setting extra-controls
They're just mapped to 0 / 1 and can already be set as integers, but
being able to set them as booleans seems useful.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1308>
2021-11-04 15:21:40 +00:00
Seungha Yang
8eee442715 wasapi2ringbuffer: Fix client object leak
Check whether ringbuffer is holding client object already since
open_device() may be called multiple times

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1307>
2021-11-04 12:41:32 +00:00
Sebastian Dröge
f9a97efbe1 webrtcbin: Clear errors from finding codec preferences before the next iteration
The media is just skipped and the error is not propagated to the caller,
so keeping it around here would cause assertions a bit later when trying
to set a new error over the old one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1291>
2021-11-04 10:51:15 +00:00
Sebastian Dröge
30153f1591 webrtcbin: Move addition of attributes to the caps after making sure they're not empty or any
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1291>
2021-11-04 10:51:15 +00:00
Sebastian Dröge
d628ccf0e5 webrtcbin: Don't require fixed caps when querying caps for a transceiver pad to match it with a media
Upstream caps might for example be
  application/x-rtp,media=audio,encoding-name={OPUS, X-GST-OPUS-DRAFT-SPITTKA-00, multiopus}
and while that is not fixed caps it is enough to match it with a media.

Only caps structures that have the correct structure name and that have
the media and encoding-name field are preserved, but if both are present
then these caps are used as "codec preferences".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1291>
2021-11-04 10:51:15 +00:00
Marcin Kolny
a46ab2ced2 typefind: fix reading file extension from URI
Currently reading extension relies on the fact that everything after the
last"." character is a file extension. Whereas that works fine for most
of the cases, it breaks when the URI contains a query part.

E.g.: `http://url.com/file.mp4?param=value` returns `mp4?param=value`
instead of `mp4`.

In this commit we use URI parser to read the path of the URI (in the example
above, that is `/file.mp4`) and read extension from that path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1305>
2021-11-04 09:30:31 +00:00
Tim-Philipp Müller
a7b376011b Back to development 2021-11-03 19:31:23 +00:00
Tim-Philipp Müller
f513c289b0 Release 1.19.3 2021-11-03 15:43:43 +00:00
Tim-Philipp Müller
d51b091cd9 Update ChangeLogs for 1.19.3 2021-11-03 15:43:32 +00:00
Sebastian Dröge
dac82a8932 multifilesink: Make minimum distance between keyframes in next-file=key-frame mode configurable
Previously this was hardcoded to 10s, which is not necessarily the
desired behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1292>
2021-11-02 20:21:10 +00:00
Erlend Eriksen
0805ffdce9 qtmux: Fix deadlock in gst_qt_mux_prepare_moov_recovery
Regression from 5766731bd4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1288>
2021-11-02 19:26:57 +00:00
Matthias Clasen
ffa363edf7 egl: handle configless contexts
With EGL_KHR_no_config_context, EGL contexts may just not
have an EGLConfig to give you. Deal with it.

Fixes: #858
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1289>
2021-11-02 18:00:41 +00:00
Seungha Yang
cf871f990a examples: win32-videooverlay-playbin: Add a repeat option
... in order to test pipeline/element reuse cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1275>
2021-11-02 16:55:50 +00:00
Nicolas Dufresne
aedd5f0dd1 codecs: mpeg2: Drain before a new_sequence get signalled
The decoder may need to re-allocate the output buffer, it is easier if all
pictured have been outputed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
2021-11-02 16:16:29 +00:00
Daniel Almeida
f9958eda8e v4l2codecs: gstv4l2codecsmpeg2dec: implement a render delay
The v4l2 backend support delayed output for performance reasons.
It is then possible to use render delays to queue multiple requests
simultaneously, thus increasing performance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
2021-11-02 16:16:29 +00:00
Daniel Almeida
a8decde6d3 codecs: gstmpeg2decoder: add support for render delay
Some decoding APIs support delayed output for performance reasons.
One example would be to request decoding for multiple frames and
then query for the oldest frame in the output queue.
This also increases throughput for transcoding and improves seek
performance when supported by the underlying backend.

Introduce support in the mpeg2 base class, so that backends that
support render delays can actually implement it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
2021-11-02 16:16:29 +00:00
Daniel Almeida
477b824f8e v4l2codecs: Implement a MPEG2 V4L2 decoder element
Implement a MPEG2 V4L2 decoder element based on the previous h264
implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
2021-11-02 16:16:29 +00:00
Daniel Almeida
4fe6bc1afe v4l2codecs: mpeg2: update to the new uAPI
The mpeg2 stateless api has undergone changes as it is being
destage. Update the v4l2-controls header to match.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
2021-11-02 16:16:29 +00:00
Daniel Almeida
f6e17ea294 sys: va: GstVaMpeg2Dec: use slice sc_offset and size
Seeing as how GstMpeg2Slice will now record the start code offset
as well as its size with the above field taken into account, the
manual computation in this class is not needed.

Remove it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
2021-11-02 16:16:29 +00:00
Daniel Almeida
946be1a85a codecs: GstMpeg2Slice: add field for sc_offset and size
Downstream might need the start code offset when decoding.

Previously this computation would be scattered in multiple sites. This
is error prone, so move it to the base class. Subclasses can access
slice->sc_offset directly without computing the address themselves
knowing that the size will also take the start code into account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
2021-11-02 16:16:29 +00:00
James Cowgill
8b932c105f v4l2codecs: Handle allocator creation failure
If `VIDIOC_REQBUFS` doesn't return enough buffers the allocator creation
function can fail and return `NULL`. Handle this by generating an error
and returning instead of segfaulting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1220>
2021-11-02 15:25:48 +00:00
James Cowgill
3846b0563a v4l2codecs: Fix segfault when destroying non-detached allocator
The GstV4l2CodecAllocator dispose function clears `self->decoder` but
the finalize function then tries to use it if the allocator has no been
detached yet.

Fix by detaching in the dispose function before we clear
`self->decoder`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1220>
2021-11-02 15:25:48 +00:00
Guillaume Desmottes
1aab0e49f6 re-add gst-plugins-rs.wrap
It's been lost during the monorepo migration.

Note that building Rust plugins as a subproject is currently broken,
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/171
but I'm going to fix that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1290>
2021-11-02 10:15:42 +01:00
Julian Bouzas
bc358e5827 alphacombine: use the same allocation query data for both decoders
This allows downstream elements to set allocation query parameters for both
decoders, which should be always the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1277>
2021-11-01 12:55:00 -04:00
Nirbheek Chauhan
b8d6fd905e applemedia: Add ARGB64_BE, RGBA64_LE support to vtenc/vtdec
We can add this now that ARGB64_BE videoconvert support was added in:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1247

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
fed69c48b6 vtenc: Add FieldDetail properties for interlaced input
Standard interlace handling:
* If we have interlace-mode=interleaved and the field order, we just
  set it when creating the session
* If we have interlace-mode=(interleaved|mixed) and no field order, we
  set the field order on the first buffer

The encoder session does not support changing the FieldDetail after it
has started encoding frames, so we cannot support mixed streams
correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
29a32703a5 vtenc: Add a property to forcibly ignore alpha values
This PropertyKey is not documented in any headers anywhere, so we need
to define it ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
4e37f99975 vtenc: Set colorimetry information
It looks like VideoToolbox doesn't support all our colorimetries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
0f0e68080c applemedia: Add ProRes support to vtenc and vtdec
For vtdec, we continue to prefer NV12; else we pick whatever
downstream wants. In the special case where we're decoding 10-bit or
12-bit ProRes formats, we will prefer AYUV64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
db638134e7 vtenc: Improve error reporting in chain function
Otherwise it is quite difficult to figure out why the chain function
failed. Also assert not reached for case statements that should not be
hit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
d7f6f8172a vtdec: Remove dead code in switch statement
We never advertise these formats, so these cases will never be hit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Piotrek Brzeziński
6aa80270dd mediatype-video-raw: add ARGB64_LE/BE and variants
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1286>
2021-10-31 22:28:23 +00:00
Sebastian Dröge
577cdcafe0 video: Fix order of new video formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1282>
2021-10-31 06:38:36 +00:00
Sebastian Dröge
ee18b8c0c0 base: Fix some annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1281>
2021-10-30 15:50:30 +03:00
Tim-Philipp Müller
ea8dc0c737 Couple more g_memdup() -> g_memdup2() fixes
Fixes deprecation warnings with newer GLib versions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1279>
2021-10-30 10:37:37 +01:00
Tim-Philipp Müller
1f560af76b dtls: don't use deprecated g_binding_get_source() with newer GLib versions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1279>
2021-10-30 00:52:42 +01:00
Tim-Philipp Müller
d96e44922e Use g_pattern_spec_match() instead of g_pattern_match() which is deprecated since glib 2.70
Fixes compiler warnings with glib 2.70

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1279>
2021-10-30 00:34:35 +01:00
Seungha Yang
17bf17b38d codecs: h265decoder: Fix per-slice leak
As documented, slice header parsed via gst_h265_parser_parse_slice_hdr()
should be cleared, otherwise it would result in memory leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1274>
2021-10-29 17:25:06 +00:00
Víctor Manuel Jáquez Leal
4a4823b972 va: Delay decoders downstream negotiation.
Delay decoders downstream negotiation just before an output frame
needs to be allocated.

This is required, are least for H.264 and H.265 decoders, since
codec_data might trigger a new sequence before finishing upstream
negotiation, and sink pad caps need to set before setting source pad
caps, particularly to forward HDR fields. The other decoders are
changed too in order to keep the same structure among them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal
5494ec38d0 vabasedec: Move warning message to decoder's category.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal
97e3f88c20 va: Move common variable need_negotiation to GstBaseDec.
This is a common variable to all decoders, so it's sound to move it to
the base helper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal
a2a3c81c85 va: Move back parent_object to each element.
Using GstBaseDec hack to access the parent_object of each element in
the element itself is a bit fragile. It would be better to keep its
own parent object as the usual global variable. It would make it
resistant to code changes.

The GstBaseDec macro to access the parent object now it's internal to
base decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Piotrek Brzeziński
428b4104b0 video-format: Add support for ARGB64 LE/BE and similar variants
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1247>
2021-10-29 14:57:58 +00:00
Vivia Nikolaidou
6c21dd4de1 identity: Fix crash when receiving a gap event outside the current segment
We were checking if the start time of the gap event was
GST_CLOCK_TIME_NONE, which is superfluous because that cannot happen,
and then not checking if it was NONE after gst_segment_to_running_time,
which caused a crash if an identity received a gap event fully or
partially outside the current segment.

This patch was done in cooperation with:
Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1269>
2021-10-29 14:08:49 +03:00
Mathieu Duponchelle
c414f9560a rtptwcc: don't assume all PacketInfo->data are buffers
They can also be buffer lists

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1268>
2021-10-29 03:46:25 +02:00
Heiko Becker
b83e85ab67 neon: Allow building against neon 0.32.x
No API/ABI changes: https://github.com/notroj/neon/blob/0.32.0/NEWS#L3

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1267>
2021-10-29 00:14:53 +00:00