Commit graph

215 commits

Author SHA1 Message Date
Daniel
ccfb77c775 debugutils: videocodectestsink: add support for more formats
Add support for more formats so as to run the libvpx high bit depth test suite.
This means the files under CONFIG_VP9_HIGHBITDEPTH

This also allows running the yuv444p 8bit file in the regular 8 bit vp9 suite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3356>
2022-11-10 15:26:22 +00:00
Jan Alexander Steffens (heftig)
b22093be3c rtmp2: Improve error messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig)
f2d7b98ea4 rtmp2/connection: Pass triggering GError in 'error' signal
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig)
9952be2ab3 rtmp2/connection: Pass triggering GError to _emit_error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig)
39bab56a08 rtmp2/connection: Discern reasons for cancelling all commands
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig)
297cdaa381 rtmp2/connection: Handle EOF like error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig)
031d52672b rtmp2/client: Make sure 'salt' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig)
dcada94046 rtmp2/client: Make sure 'reason' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:07 +00:00
Jan Alexander Steffens (heftig)
a13f234be3 rtmp2/client: Make sure 'desc' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:07 +00:00
Jan Alexander Steffens (heftig)
2037f1ed0a rtmp2/client: Make sure 'code' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:07 +00:00
Nicolas Dufresne
e81e212610 videocodectestsink: Add YUV422 support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3331>
2022-11-07 00:40:25 +00:00
Seungha Yang
32b13a883a vp9parse: Set subsampling to src caps even if GBR stream
Some muxer elements will need the subsampling information

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3297>
2022-10-31 11:29:38 +00:00
Seungha Yang
47f1dc837f vp9parse: Delaying src caps until frame is parsed if profile > 0
subsampling and/or bitdepth information will be required for
negotiation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3297>
2022-10-31 11:29:38 +00:00
Nicolas Dufresne
8a8fe360a2 alphacombine: Add missing query handler for gaps
The gap handling was in place, but there was no event handler to trigger it.
Implement the alpha sink event handler for the gaps. This fixes handling of
valid streams which may not refresh the alpha frames for every video frames.
It will also allow a clean error if the stream was missing the initial
alpha frame, at least until we find a better way to handle these
invalid frames.

Related to #1518

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3264>
2022-10-26 14:51:40 +00:00
He Junyan
242401915f av1parse: Correct the pts for frames and OBUs inside a TU.
When the output alignment is smaller than the input alignment, for
example, When the output alignment is "FRAME" and the parse is likely
connecting to a decoder, the current PTS setting for AV1 frames inside
a TU is not very correct.

For example, a TU may begin with non-displayed frames and end with a
displayed frame. The current way will assign the PTS to the first
non-displayed frame, which is a decode-only frame and the PTS will be
discarded in the video decoder. While the last displayed frame has
invalid PTS, and so the video decoder needs to guess its PTS based on
the frame rate and previous frame's PTS. This is not a decent and
robust way. And more important, when the previous frames provide DTS,
the video decoder will also guess the PTS based on the previous frames'
DTS and trigger the warning like:

  gstvideodecoder.c:3147:gst_video_decoder_prepare_finish_frame: \
  <vavp9dec0> decreasing timestame

It sets the reordered_output and makes the decoder in free run mode.

We should correct the PTS for a TU, let the non-displayed frames have
no PTS while set the correct PTS to the displayed one. Also, when the
AV1 stream has multi spatial layers, there are more than one displayed
frames inside one TU with the same PTS.

Note: If the input alignment is not TU aligned, we can not know the
exact PTS of this TU, and so we just clear the PTS of the decode only
frame and leave others unchanged.

We also correct all the PTS if the output is OBU aligned. All their
PTS and DTS are set to the input buffer's PTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan
a1f352196f av1parse: Only check the TU bound when the alignment is TU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan
ee5d7ce075 av1parse: push all data once when input alignment not smaller than output.
When the incoming data has big alignment than the output, we do not need to
call finish_frame() and exit the current handle_frame() for each splitted
frame. We can push them all at one shot with in one handle_frame(), whcih
may improve the performance and can help us to find the edge of TU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan
b7d3a219ab av1parse: Set the output buffer flags correctly.
The current code forgets to clear some flags and has some typo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
Mathieu Duponchelle
11c74ccec6 fake{video|audio}sink: don't proxy properties at instance init.
Instead proxy properties from the GstBaseSink class at class_init time,
and duplicate the rest of the fakesink properties manually.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1442

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3073>
2022-10-19 09:12:11 +00:00
Arun Raghavan
34ca46c786 rtmp2sink: Correctly return GST_FLOW_ERROR on error
If there is an error while connecting, the streaming task will be stopped, and
is_running() will be false, causing a GST_FLOW_FLUSHING to be returned. Instead,
we perform the error check (!self->connection) first, to return an error if
that's what occured.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3189>
2022-10-15 08:21:40 +00:00
He Junyan
11436be268 vp9parse: The show_existing_frame buffer should not be decode only.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3155>
2022-10-13 06:41:06 +00:00
He Junyan
eac9c33cc1 vp9parse: Correct the pts for frames inside a super frame.
When the alignment is "FRAME" and the parse is likely connecting to
a decoder, the current PTS setting for VP9 frames inside a super
frame is not very correct.

For example, the super frame may begin with non-displayed frames and
end with a displayed frame. The current way will assign the PTS to
the first non-displayed frame, which is a decode-only frame and the
PTS will be discarded in the video decoder. While the last displayed
frame has invalid PTS, and so the video decoder needs to guess its
PTS based on the frame rate and previous frame's PTS. This is not a
decent and robust way. And more important, when the previous frames
provide DTS, the video decoder will also guess the PTS based on the
previous frames' DTS and trigger the warning like:

  gstvideodecoder.c:3147:gst_video_decoder_prepare_finish_frame: \
  <vavp9dec0> decreasing timestame

It sets the reordered_output and makes the decoder in free run mode.

We should correct the PTS for a super frame, let the non-displayed
frames have no PTS while set the correct PTS to the displayed one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3155>
2022-10-13 06:41:06 +00:00
Edward Hervey
3215136d67 mxfdemux: Add support for Canon XF-HEVC
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1495

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3163>
2022-10-12 09:15:57 +00:00
Edward Hervey
9ca306d22c mxfdemux: Don't leak index table segments on failures
The segment was freed ... but not the contents :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3163>
2022-10-12 09:15:57 +00:00
Thibault Saunier
bf964f896f transcodebin: Implement support for upstream stream selection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3128>
2022-10-06 09:14:41 -03:00
Sebastian Dröge
a2d121cf9a gaussblur: Fix memory leak when setting caps multiple times
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3091>
2022-09-29 22:34:37 +00:00
Mart Raudsepp
8a2edc6581 tsdemux: Don't trigger a program change when falling back to ignore-pcr behaviour
Since commit a79a756b79 we could change to ignore-pcr automatically at 500ms
into a live stream when no PCR is seen by then. However the stream counting in
program change detection was wrongly considering ignore-pcr programs to have a
separate PCR PID, even though we are actually ignoring the PCR PID completely,
resulting in an erroneous program switch getting triggered from the different
stream count. This in turn would send an EOS and switch out the pads for what
actually is still the same program, while we intended to simply apply a
workaround for broken encoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3060>
2022-09-28 07:18:45 +00:00
Seungha Yang
a45273aaeb codectimestamper: Update document
Add more description about those elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3021>
2022-09-16 18:06:58 +00:00
Seungha Yang
4db55bc759 codectimestamper: Fix for unknown framerate
Use default framerate if numerator or denominator is unknown

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3031>
2022-09-15 21:48:30 +00:00
Seungha Yang
6a8a20ff92 Add H.264/H.265 timestamp correction element
Adding {h264,h265}timestamper element to correct timestamp of
encoded frames. This initial version supports only DTS
correction based on given PTS and SPS data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2580>
2022-09-12 19:02:21 +00:00
Thibault Saunier
64010bb1f8 testsrcbin: Add a way to specify caps for the output of the sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier
19e33a6c5e testsrcbin: Plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier
7f34b5610f testsrcbin: Add an 'expose-sources-async' property
Which allows simluating usual source which require decoding etc in decodebin for example

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier
6a4425e46a meson: Call pkgconfig.generate in the loop where we declare plugins dependencies
Removing some copy pasted code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Seungha Yang
3632e97df2 mxfdemux: Always calculate BlockAlign of raw audio
Workaround for nBlockAlign and nBitsPerSample mismatch. Always
use the formula described in the specification for BlockAlign value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2864>
2022-08-12 19:26:08 +00:00
Nirbheek Chauhan
5da9f62313 rtsp+rtmp: Forward warning added to tls-validation-flags to our users
With the 2.72 release, glib-networking developers have decided that
TLS certificate validation cannot be implemented correctly by them, so
they've deprecated it.

In a nutshell: a cert can have several validation errors, but there
are no guarantees that the TLS backend will return all those errors,
and things are made even more complicated by the fact that the list of
errors might refer to certs that are added for backwards-compat and
won't actually be used by the TLS library.

Our best option is to ignore the deprecation and pass the warning onto
users so they can make an appropriate security decision regarding
this.

We can't deprecate the tls-validation-flags property because it is
very useful when connecting to RTSP cameras that will never get
updates to fix certificate errors.

Relevant upstream merge requests / issues:

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2214

https://gitlab.gnome.org/GNOME/glib-networking/-/issues/179

https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/193

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Benjamin Gaignard
a275e1e029 videoparsers: h265: Be less restrictive between PPS and SPS parsing order
Allow to parse PPS to be parser even if SPS hasn't been parsered before.
This help to parse VPSSPSPPS_A_MainConcept_1 conformance test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Sebastian Dröge
0aad12fbce audiobuffersplit: Actually store number of samples to drop in gapless mode
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Sebastian Dröge
fad0a72eca audiobuffersplit: Use input running time for comparison instead of the currently tracked running time
Otherwise gapless mode would do completely wrong calculations on
discontinuities and cause input/output to drift slowly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Sebastian Dröge
0485c354d2 audiobuffersplit: Combine two if expressions to reduce indentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Seungha Yang
8aeb8ea58f proxysink: Fix GstProxySrc leak
Clear weak pointer to peer src when disposing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1552>
2022-07-07 05:54:54 +09:00
Seungha Yang
37fdaaf8ff proxysink: Make sure stream-start and caps events are forwarded
There might be a sequence of event and buffer flow:
- Got stream-start/caps/segment events
- Got flush events
- And then buffers with a new segment event

In the above case, stream-start and caps event might not be reached to
peer proxysrc if peer proxysrc is not ready to receive them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1552>
2022-07-07 05:42:21 +09:00
Víctor Manuel Jáquez Leal
56f9359136 jpegparse: Add YUV440 sampling support.
Found some samples with this sampling, so in order to support it,
JPEG2000 header cannot be used anymore, a this patch also adds the
enums for each supported colorspace and sampling, avoiding hacks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2641>
2022-06-22 18:44:11 +00:00
He Junyan
f0d4135b3a h265parse: Fix uninitialized width and height when update src caps.
The commit b90d0274 introduces uninitialized width and height when we
consider to change the "pixel-aspect-ratio" for some interlaced stream.
We need to check the resolution in the src caps, and if no resolution
info found, there is no need to consider the aspect ratio.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2630>
2022-06-21 15:47:45 +00:00
Vivia Nikolaidou
b90d02741e avviddec, video.c, h265parse: Workaround for broken field-based interlaced encoders
Some encoders (e.g. Makito) have H265 field-based interlacing, but then
also specify an 1:2 pixel aspect ratio. That makes it kind-of work with
decoders that don't properly support field-based decoding, but makes us
end up with the wrong aspect ratio if we implement everything properly.
As a workaround, detect 1:2 pixel aspect ratio for field-based
interlacing, and check if making that 1:1 would make the new display
aspect ratio common. In that case, we override it with 1:1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2577>
2022-06-16 10:03:02 +00:00
Seungha Yang
a1b4c62b35 h264parse: Use newly added avcC data parsing API
Use gst_h264_parser_parse_decoder_config_record() method to parse
codec_data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2449>
2022-06-15 19:58:59 +00:00
Tim-Philipp Müller
9d9e59622f Bump GLib requirement to >= 2.62
Can't require 2.64 yet because of
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/323

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2568>
2022-06-10 06:01:41 +00:00
Jan Alexander Steffens (heftig)
5ebc9427d9 rtmp2: Fix allocation of GstRtmpMeta
Use the right size.

On 64-bit platforms, `GstMetaInfo` is larger than `GstRtmpMeta`, which
masked this bug. On 32-bit platforms, it causes crashes. Thanks to
@maxatka for discovering this.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1721
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2553>
2022-06-06 15:51:07 +00:00
Marc Leeman
955adc4564 rfbsrc: add uri interface
Adding a uri interface enables plugging in RFB/VNC sources to anything
that makes use of uridecodebin:

gst-play-1.0 rfb://:password@10.40.216.180:5903?shared=1

Use userinfo to pass user (ignored) and password, other key/value pairs
can be encoded in the query part of the URI (see shared)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1963>
2022-06-03 19:44:28 +00:00
Andoni Morales Alastruey
77937f9398 videoparse: rename from _free to _clear
The function does not free the structure but the data
contained within.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1458>
2022-06-03 08:29:05 +00:00
Andoni Morales Alastruey
ca2eb9f65f h264parse: add support Precision Time Stamp in SEI messages
Expose User Data Unregistered as a new Meta and add
API to parse Precision Time Stamp (ST 0604).

Fixes #927

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1458>
2022-06-03 08:29:05 +00:00
Víctor Manuel Jáquez Leal
5542dd395d jpegparse: Rewrite element.
Now it uses the JPEG parser in libgstcodecparsers, while the whole
code is simplified by relying more in baseparser class for tag
handling.

The element now signals chroma-format and default framerate is 0/1,
which is for still-images.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1473>
2022-05-20 08:51:23 +00:00
Víctor Manuel Jáquez Leal
17046fc1ad jpegformat: Use codecparsers' for JPEG markers.
Instead of repeating JPEG markers definition, this patch uses those
defined in gstcodecparsers library.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1473>
2022-05-20 08:51:23 +00:00
Víctor Manuel Jáquez Leal
547d324325 jpegparse: Headers cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1473>
2022-05-20 08:51:23 +00:00
Sebastian Dröge
bf79a6908c tsmux: Make sure to set srcpad caps under all conditions before outputting the first buffer
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1218

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2438>
2022-05-18 12:19:07 +00:00
Sebastian Dröge
3487c81ac2 sdpdemux: Release request pads from rtpbin when freeing a stream
Otherwise the pads of the rtpbin stay around forever and are leaked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2437>
2022-05-17 12:36:44 +00:00
Edward Hervey
7ac4dd3d9d mxfdemux: Handle files produced by legacy FFmpeg
Until March 2022, the FFmpeg MXF muxer would write the various index table
segments with the same instance ID, which should only be used if it is a
duplicate/repeated table.

In order to cope with those, we first compare the other index table segment
properties (body/index SID, start position) before comparing the instance
ID. This will ensure that we don't consider them as duplicate, but can still
detect "real" duplicates (which would have the same other properties).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2407>
2022-05-12 07:27:57 +02:00
Olivier Crête
86105a4774 pcapparse: Set timestamp in DTS, not PTS
This matches the behaviour of basesrc, in particular, it matches the
behaviour of udpsrc, so it's easier to use to as a replacement to test
rtpjitterbuffer and other similar elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2388>
2022-05-07 07:32:41 +00:00
Sebastian Dröge
7a679cc1f1 mxfmux: Disable aggregator's default negotiation
mxfmux can't negotiate caps with upstream/downstream and always outputs
specific caps based on the input streams. This will always happen before
it produces the first buffers.

By having the default aggregator negotiation enabled the same caps
would be pushed twice in the beginning, and again every time a
reconfigure event is received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2372>
2022-05-05 17:41:58 +00:00
Sebastian Dröge
52c419b799 mpegtsmux: Disable aggregator's default negotiation
mpegtsmux can't negotiate caps with upstream/downstream and always outputs
specific caps based on the input streams. This will always happen before
it produces the first buffers.

By having the default aggregator negotiation enabled the same caps
would be pushed twice in the beginning, and again every time a
reconfigure event is received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2372>
2022-05-05 17:41:58 +00:00
Edward Hervey
89780341e8 tsdemux: Demote warning to simple debug
That issue is actually handled, so don't pollute the logs with such warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2340>
2022-05-02 09:15:57 +02:00
Sebastian Dröge
bf89c80d74 interlace: Also handle a missing "interlace-mode" field as progressive
Otherwise caps negotiation will fail in situations that are supposed
to work, like:

  "video/x-raw,framerate=(fraction)60/1" ! interlace field-pattern=0 ! "video/x-raw,framerate=(fraction)30/1"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2335>
2022-04-29 23:08:50 +00:00
Sebastian Dröge
c7db9ce70b interlace: Add some more debug output to the getcaps function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2335>
2022-04-29 23:08:50 +00:00
Edward Hervey
10f72da504 mpegts: Handle "empty" PMT gracefully
Some streams have 2 PMT sections in a single TS packet. The first one is "valid"
but doesn't contain/define any streams. That causes an unrecoverable issue when
we try to activate the 2nd (valid) PMT.

Instead of doing that, pre-emptively refuse to process PMT without any streams
present within. We still do post that section on the bus to inform applications.

Fixes #1181

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2310>
2022-04-28 09:36:54 +00:00
Mathieu Duponchelle
efc29565d6 rtponviftimestamp: add extension data to all packets ..
regardless of whether they are input as individual buffers or
buffer lists.

The ONVIF specification requires all packets to hold the extension,
it makes no sense to behave differently when handling buffer lists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2303>
2022-04-27 06:39:24 +00:00
He Junyan
b2aaf0f2e5 av1parse: Fix a latent memory leak in colorimetry setting.
Also delete the useless "have_cinfo" judgement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2288>
2022-04-26 02:14:15 +00:00
He Junyan
164e01b14e av1parse: Correct the meaning of color_range flag.
According to spec:
color range equal to 0 shall be referred to as the studio swing
representation and color range equal to 1 shall be referred to as
the full swing representation.

The current status is just the opposite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2288>
2022-04-26 02:14:15 +00:00
Camilo Celis Guzman
8707d0cb26 gstav1parse: fixup various possible logical errors
Found via an analyzed build for Clang. Specifically we had:

gstav1parse.c[1850,11] in gst_av1_parse_detect_stream_format: Logic error: The left operand of '==' is a garbage value
gstav1parse.c[1606,11] in gst_av1_parse_handle_to_small_and_equal_align: Logic error: The left operand of '==' is a garbage value

Also a couple of false-positives:

gstav1parse.c[1398,24] in gst_av1_parse_handle_one_obu: Logic error: Branch condition evaluates to a garbage value
gstav1parse.c[1440,37] in gst_av1_parse_handle_one_obu: Logic error: The left operand of '-' is a garbage value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2230>
2022-04-19 18:36:38 +00:00
Xavier Claessens
b99ecc78ca Replace gst-i18n-*.h with gi18n-lib.h
GLib guarantees libintl is always present, using proxy-libintl as
last resort. There is no need to mock gettex API any more.

This fix static build on Windows because G_INTL_STATIC_COMPILATION must
be defined before including libintl.h, and glib does it for us as part
as including glib.h.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
2022-04-19 18:01:06 +00:00
Vivia Nikolaidou
cb8da91f7a h264parse: Include coded-picture-structure info in caps
This reverts commit 652773de36 and
modifies it to rename the caps field name to coded-picture-structure.

It was previously removed because it confuses the decoder and we didn't
have a valid use case for including it in the encoded caps at this
stage. We now do have such a use case but still don't want to confuse
the decoder, so the field is renamed.

However, it is still not accurate without looking at the SEI picture
structure of each frame, so it was named coded-picture-structure. If its
value is "frame" it is most likely progressive, if it's "field" it is
most likely interlaced or mixed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2177>
2022-04-18 11:00:29 +00:00
Edward Hervey
d678d7136c tsdemux: Fix AC-4 detection
This regression was introduced by
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1102
and has been present since 1.18

* Stream Type 0x06 is defined in the base mpeg-ts specification as Private PES
Packets. Determining the content should be solely based on descriptors found
within the PMT.
* This was abused in that commit by defining a "bluray-only" stream type for AC4
: `ST_BD_AUDIO_AC4`
* This should be entirely handled in the regular private pes handling further
down in the code

Fixes #1154

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2175>
2022-04-14 08:33:34 +02:00
Edward Hervey
25b37c33dd mxfdemux: Fix issue with re-syncing
In case of re-syncing (i.e. moving to another partition to avoid too much of an
interleave), there was previously no checks to figure out whether a given
partition was already fully handled (i.e. when coming across it again after a
previous resync).

In order to handle this at least for single-track partitions, check whether we
have reached the essence track duration, and if so skip the partition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2150>
2022-04-12 07:57:38 +00:00
Edward Hervey
3a77a3c696 mxfdemux: Don't double-increase track position
The essence track position should only be overriden if we sucesfully switched to
another position. In case of EOS we do not want to override it else we would
increase the track position *again* at the end of this function

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2150>
2022-04-12 07:57:37 +00:00
Edward Hervey
80e83089b5 mxfvanc: Handle empty VANC packets
Some XDCAM recorders store empty packets for VANC, and don't even include the
2byte length.

Handle them in the same way as VANC packets with 0 packets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2122>
2022-04-06 10:05:09 +00:00
Xavier Claessens
b004464ac6 Remove glib and gobject dependencies everywhere
They are part of gst_dep already and we have to make sure to always have
gst_dep. The order in dependencies matters, because it is also the order
in which Meson will set -I args. We want gstreamer's config.h to take
precedence over glib's private config.h when it's a subproject.

While at it, remove useless fallback args for gmodule/gio dependencies,
only gstreamer core needs it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Matthew Waters
f65b61fd53 speed: fix unused-but-set warning
../gst/speed/gstspeed.c:523:39: error: variable 'base' set but not used [-Werror,-Wunused-but-set-variable]
      gint64 start_value, stop_value, base;
                                      ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters
6f95f7263f mpegts: don't shadow res variable
Fixes unused-but-set warning:

../gst/mpegtsmux/gstbasetsmux.c:2115:43: error: variable 'res' set but not used [-Werror,-Wunused-but-set-variable]
      gboolean all_headers, done = FALSE, res = FALSE;
                                          ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters
063ca24bd8 mpegdemux: silence unused-but-set werror
../gst/mpegdemux/gstpesfilter.c:117:11: error: variable 'STD_buffer_size_bound' set but not used [-Werror,-Wunused-but-set-variable]
  guint16 STD_buffer_size_bound;
          ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2044>
2022-03-28 05:23:31 +00:00
Vivia Nikolaidou
fabf948194 tsdemux: Don't check SCTE events for being too far from the PCR
Otherwise it happens that SCTE events can only be scheduled up to 15
seconds since the last seen PCR, which is a useless restriction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2021>
2022-03-24 18:59:37 +00:00
Seungha Yang
1bd5b7356d fakevideosink,fakeaudiosink: Proxy handoff and preroll-handoff signals
Proxy signals for application to be able to consume them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1585>
2022-03-23 20:03:40 +00:00
Vivienne Watermeier
6c2f6c3bd4 all: Use new navigation interface and API
Use and implement the new navigation interface in all relevant sink elements,
and use API functions everywhere instead of directy accessing the event structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Branko Subasic
2689277a6b rtponviftimestamp: add support for using reference timestamps
Make it posible to configure the element to obtain the timestamps from
reference timestamp meta data instead of using the ntp-offset property,
or estimating its own offset. Currently the only time format supported
is "timestamp/x-unix", i.e. UTC time expressed in the unix time epoch.

In addition the custom event GstNtpOffset has been renamed to
GstOnvifTimestamp, to reflect that it is not necessarily used to convey
the ntp-offset. As a consequence we had to modify a couple of files in
the rtsp-server as well.

Fixes #984

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1683>
2022-03-11 08:39:50 +00:00
Tim-Philipp Müller
6fec258930 sdpdemux: add media attributes to caps to fix ptp clock handling
Those are needed by rtpjitterbuffer to do the right thing, e.g.

a=ts-refclk:ptp=IEEE1588-2008:00-**-**-**-**-**-**-**:0
a=mediaclk:direct=1266592257

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1924>
2022-03-10 20:49:36 +00:00
Edward Hervey
fb81c4dbf5 mpegts: Handle glib < 2.58
By using a workaround to the lack of g_ptr_array_steal_index.

Fixes #1078

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1917>
2022-03-10 17:24:45 +00:00
Edward Hervey
a95a3ca807 tsbase: Handle more program updates
There could be a case where the new program has the same program number as the
previous one ... but is actually located on a PID previously used for elementary
stream. In that case the program is guaranteed to not be an update of the
previous program but a completely new one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1893>
2022-03-09 19:45:08 +00:00
Edward Hervey
76543ee73a mpegtsbase: Use an array to track programs
We need to be able to look for programs by their PID also. Using a hash table
was a bit sub-par (and overkill) for storing a range of programs.

This is needed because there could potentially be two programs with the same
program id but different PMT PID (while one is being deactivated the new one
would "exist").

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1893>
2022-03-09 19:45:08 +00:00
Jan Alexander Steffens (heftig)
95ff949eff mpegtsmux: Start last_ts with GST_CLOCK_TIME_NONE
And use the output segment position for the outgoing timestamp while it
is. This is needed to delay the calculation of `output_ts_offset` until
we actually have a usable timestamp, as tsmux will output a few initial
packets while `last_ts` is still unset.

Without this, the calculation would use the initial `0` value, which did
not have the intended effect of making VBR mode behave like CBR mode,
but always calculated an offset equal to the selected start time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
2022-03-08 10:57:44 +00:00
Jan Alexander Steffens (heftig)
e5dbf86a54 mpegtsmux: Use GST_CLOCK_STIME_NONE for output_ts_offset
It's a GstClockTimeDiff, thus GST_CLOCK_TIME_NONE isn't appropriate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
2022-03-08 10:57:44 +00:00
He Junyan
2d624a1d6b av1parse: Add a comment when the detection of TU fails.
Also update the print message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1863>
2022-03-05 11:45:15 +08:00
Nicolas Dufresne
576b074dde camerabin: Remove drain query
This was to support very old V4L2 kernel. As we moved to DMABuf and can now
detach buffers on renegotiation, the buffer it tries to fix no longer exist.
The risk to blocking indefinitly the application does still exist though.

Fixes #1070

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1861>
2022-03-04 22:45:58 +00:00
He Junyan
9c4adf5a64 av1parse: check the error return when parse_alignment_from_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan
81bae87079 av1parse: Use the intersected caps to decide the alignment.
When we negotiate with downstream, We should use the intersected
caps of input and output to decide the alignment and stream format.
The current code just uses the input caps which may lack the stream
format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan
ccd1ed9cbc ivfparse: Set the alignment to tu for AV1 stream.
Just do the same as other demux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan
4c8777667a av1parse: Only detect the stream format when input alignment is tu.
The demux now outputs the AV1 stream in "tu" alignment, so we do not need
to detect the input alignment. But the annex b stream format is not recognized
by the demux, we still need to detect that stream format for the first input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne
29826aa80e av1parse: Save the default alignment
Otherwise the transformation is not applied and decoders may not
get the appropriate format despite the caps being negotiated
correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne
f627d6aafc av1parse: Remove duplicated check
The case of both strings being empty is already checked in the
helper function. No functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne
57c2adeeb2 vp9parse: Fix auto-plugging of HW frame decoder
Decoders that required frame aligmment and didn't have an associated
alpha decoder were skipped. This is because the parser was constructing
caps based on the software alpha decoder, which specify super-frame
alignment.

Iterate over the caps to filter the one that have a matching codec-alpha, with
the semantic the no codec-alpha field means codec-alpha=false. Then if
everything was removed, callback to the original, so that the first non-alpha
decoder will be picked.

Fixes #820

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1855>
2022-03-04 21:24:17 +00:00
Edward Hervey
03b1790e0d tsdemux: Handle PES headers bigger than a mpeg-ts packet
While the actual PES header parser could notify us that it needed more data, we
would never actually act on it.

This commit will accumulate incoming packets in such situation and re-attempt
the header parsing.

Fixes #1027

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1852>
2022-03-04 15:14:31 +00:00
Vivia Nikolaidou
7cebd5b359 tsmux: Skip empty buffers
They can be created e.g. by aggregator when there is a gap. Such buffers
should not be muxed at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1611>
2022-02-25 21:29:43 +00:00
Xavier Claessens
3d8372cc50 devenv: Add some missing GStreamer specific env variables
This should make "meson devenv" closer to what "gst-env.py" sets.

- GST_VALIDATE_SCENARIOS_PATH
- GST_VALIDATE_APPS_DIR
- GST_OMX_CONFIG_DIR
- GST_ENCODING_TARGET_PATH
- GST_PRESET_PATH
- GST_PLUGIN_SCANNER
- GST_PTP_HELPER
- _GI_OVERRIDES_PATH

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1768>
2022-02-25 20:35:26 +00:00