There was an issue with this equality check, which was to figure out what to do
with PCR pids (whether they were part of the streams present or not) and whether
we ignore PCR or not.
Turns out ... we already took care of that further up in the function.
The length check can be simplified by just checking whether the length of
the *original* PMT and the new PMT are identical. Since we don't store "magic"
PCR streams in those, we can just use them as-is.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6713>
The goal of this code was, for programs which were updates (i.e. adding/removing
streams but not completely changing) to allow dynamic addition/removal of
streams without completely removing everything.
But this wasn't 100% tested and there are a bunch of issues which make it fail
in plenty of ways.
For now disable that feature and force the legacy "add all pads again and then
remove old ones" behaviour to make it switch.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6651>
For some cameras `gst_jpeg_parse_app0()` fails on a invalid segment.
While this is likely a driver or firmware bug that should be addressed
accordingly, it's not fatal and likely does not deserve a bus message on
every frame, flooding journals.
Turn down the volume of the warnings by turning them into object
warnings. If we conclude that in some cases we'd still want bus
warnings, they can be done more fine-grained in the
`gst_jpeg_parse_appX()` functions.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6490>
In the situation where playback starts from a keyframe before
the target playback segment, then the first buffers will be
outside the configured segment and gst_segment_to_stream_time()
will return GST_CLOCK_TIME_NONE unconditionally.
If drop-out-of-segment is false, the RTP buffers will not be
dropped, but will be sent witout ONVIF extension timestamps
and given GST_CLOCK_TIME_NONE timestamps on the receiver.
Instead, use gst_segment_to_stream_time_full() to extrapolate
stream time outside the segment so that such buffers still
get assigned their correct timestamps on the receiver.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6248>
Don't accidentally include the stuffing byte (if present)
into the bottom field size. It should only be included in the
total segment length.
Fixes problems with FFmpeg not rendering the subtitles
with a stuffing byte, giving a "Invalid object location!" error.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6250>
- Add the missing field parameter and put the output parameter at the
end.
- Use a switch to verify valid values instead of hard-to-follow range
checks.
- Don't consider bad values a programming error, just a regular failure.
- Set all data fields at the end so we can pass a pointer to an
uninitialized structure without GCC complaining.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5450>
Previously, the path lock was held even while issuing caps queries to
other elements. This can lead to deadlocks in more complex pipelines.
Avoid this by reworking gst_switch_bin_get_allowed_caps() to acquire
references to switchbin paths and then releasing the path lock.
Subsequent operations in that function then act on the acquired
references, thus eliminating the need for holding the path lock for
the entirety of that function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4632>
The caps query specifies _all_ caps that the element can handle, not just
caps from the current path element. If for example a switchbin has two
paths, with one having an element that handles video/x-h264, and another
path whose element handles video/x-raw, and the second path is the
current path, then the existing code would report only video/x-raw as
supported. Fix this by report all allowed caps, even if there is a
current path defined.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4632>
The rationale is that a passthrough path (= one with no element) behaves
as if the switchbin's sink- and srcpad were one. In particular, internal
caps queries (needed for computing the allowed caps) then go to the peers
instead to path elements. Rework gst_switch_bin_get_allowed_caps () for
a clear handling of NULL path elements and for proper dataflow passthrough
and caps & accept-caps query handling.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4632>
The drop probe was present in early switchbin versions to implement paths
that drop dataflow. However, this feature turned out to be too problematic
and thus was removed. Some bits remained though. This commit removes those
bits and clarifies that in the current switchbin version, a NULL path
element instead means passthrough.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4632>
If the current segment has a configured stop point, detect
when when pad timestamps proceed past that point and mark
them as EOS. Otherwise, tsdemux continues streaming
the whole input downstream (unless something downstream detects
and returns EOS for us)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6023>
Use string parsing instead of pointer arithmetic, which makes the code
easier to understand and less error-prone. This has no functional
changes, and is preparation for the next commit, which extends the
header parsing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5997>
videoconvertscale advertises `ANY` feature, but it supports it only
in passthrough. Our goal with autoconvert is to ensure that conversion
is possible with the elements that are being plugged so we avoid
plugging `videoconvertscale` if the memory type is not system memory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/899>