Commit graph

7584 commits

Author SHA1 Message Date
Aaron Boxer e3297be433 h264parse: buffer mismatch in map/unmap 2019-11-26 13:07:47 -05:00
Marc Leeman 31861b095a rtpmanagerbad: allow setting multicast-iface
Allowing the UDP elements to bind on an interface is needed in more
complex networks where there are mutiple networks interfaces without
default gateway
2019-11-19 12:39:59 +00:00
Sebastian Dröge c7393af0bf timecodestamper: Create LTC sink pad with the correct name according to the template
Should be "ltc_sink" and not just "ltc"
2019-11-19 12:21:30 +02:00
Vivia Nikolaidou 851682629e videoparsers: Disable gst_base_parse_set_infer_ts
From the documentation of gst_base_parse_set_infer_ts, it should be
disabled for non-audio data. Currently just disabling for all video
parsers that have reordered data: h264, h265, mpeg, mpeg4, vc1. Was
already disabled in h263.
2019-11-19 10:23:31 +02:00
Kyrylo Polezhaiev 6af38c6ffe tsmux: Fix copying of buffer region 2019-11-18 07:31:33 +00:00
Marc Leeman 1569c33f24 rtpmanagerbad: name the element children
As discussed with RIST, it is best to name the children of the elements
since these are now created at the element initialisation.
2019-11-17 16:00:19 +00:00
Vivia Nikolaidou 413c6ec57b tsdemux: Always issue a DTS even when it's equal to PTS
Currently tsdemux timestamps only the PTS, and only issues the DTS if
it's different. In that case, parsers tend to estimate the next DTS
based on the previous DTS and the duration, which can accumulate
rounding errors.
2019-11-14 12:16:04 +00:00
Jan Schmidt c94d50090b switchbin: Free path objects on finalize
Clean up path objects nicely when shutting down,
first by dropping pointers to elements during dispose,
and then by making sure to drop the ref to the path object
when finalizing the switch bin.

Fixes valgrind checks in the unit test.
2019-11-13 10:15:32 +00:00
Jan Schmidt ed63012d70 switchbin: Add current-path property
Returns the index of the currently selected processing
path, or MAX-UINT if none
2019-11-13 10:15:32 +00:00
Jan Schmidt 6d292c86e9 switchbin: Add docs
Add documentation clauses and enrol switchbin to generate
plugin docs
2019-11-13 10:15:32 +00:00
Jan Schmidt e367258eef switchbin: Initial checkin
Add code from Stream Unlimited implementing a bin
which switches between different internal decoding/processing
chains based on input caps
2019-11-13 10:15:31 +00:00
Jan Alexander Steffens (heftig) 346bca80af
rtmp2: Fix NULL check in gst_rtmp_meta_transform
Coverity rightly complains that checking a pointer for NULL after
dereferencing it is pointless.

Remove the check, and to be safe, assert that gst_buffer_add_meta
returns non-NULL.

CID 1455485
2019-11-12 12:20:34 +01:00
Jan Alexander Steffens (heftig) f730f4a694
rtmp2: Check for missing GstRtmpMeta
The message buffers are created using `gst_rtmp_message_new` and thus
always contain a GstRtmpMeta. Add checks to appease Coverity's static
analysis.

CID 1455596
CID 1455384
2019-11-12 12:20:30 +01:00
Vivia Nikolaidou 8d7489a734 rtmp2sink: Add a check that meta isn't NULL before accessing
It really can't be NULL, this is just to convince coverity

CID 1455553
2019-11-12 12:36:38 +02:00
Nicolas Dufresne 44322b1dfc vc1parse: Avoid division by zero assertion
A framerate of 0/1 is valid, but we cannot calculate the frame duration
in this context. Simply protect against this case.

Related to #660
2019-11-11 16:23:18 -05:00
Nicolas Dufresne a5113fe8c8 vc1parser: Relax ASF Binding Byte validation
According to the spec, the least significant bit is reserved and should
always we set to 1. Though, some wrong file has been found. Considering
how low important this reserved bit is, relax the validation.

Related to #660
2019-11-11 16:22:54 -05:00
Edward Hervey 7bceb6c3ff bad: Avoid using deprecated API
GTimeval is deprecated
2019-11-08 10:43:08 +00:00
Edward Hervey 60cec38591 tsdemux: Handle continuity mismatch in more cases
Packets of a given PID are meant to have sequential continuity counters
(modulo 16). If there are not sequential, this is the sign of a broken
stream, which we then consider as a discontinuity.

But if that new packet is a frame start (PUSI is true), then we can resume
from that packet without any damage.
2019-11-07 09:17:25 +00:00
Ederson de Souza fe8e2a001c debugutils: clockselect, a pipeline that enables clock selection
Sometimes, one wants to force a clock on some pipelines - for instance,
when testing TSN related pipelines, one usually uses GstPtpClock or
CLOCK_REALTIME (assuming system realtime clock is in sync with network
one). Until now, one needs to write an application for that - not
difficult, but quite boring if one just wants to test something. This
patch presents a new element to help that: clockselect.

clockselect is a pipeline with two properties to select a clock. One
property, "clock-id", enables one to choose between "monotonic",
"realtime", "ptp" or "default" clock - where default keeps pipeline
behaviour of choosing a clock based on its elements. The other property,
"ptp-domain" gives one the choice of which PTP domain should be used.

Some very simple tests also added for this new element.
2019-11-06 08:58:53 -08:00
Niels De Graef d8f61515d8 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-11-06 14:27:46 +00:00
Michael Olbrich 58479bec37 sdp: don't leak the ghost pad
The peer is already gone when pad_removed_cb() called, so the ghost cannot
be removed. Use g_object_set_data() instead to remember the ghost pad.

Copied from similar code in GstRTPBin.
2019-11-06 02:11:20 +00:00
Aaron Boxer 6892078b00 basetsmux: allow null J2K profile
Since we are not requiring that profile equals GST_JPEG2000_PARSE_PROFILE_BC_SINGLE,
(as the standard requires) we can allow profile to be null. We relax this condition because
OpenJPEG can't create broadcast profiles.
2019-11-05 21:21:51 +00:00
Aaron Boxer 1414e58dfa jpeg2000parse: fail caps negotiation if caps are NOT fixed 2019-11-05 21:21:51 +00:00
Aaron Boxer 7b3491adf7 jpeg2000parse: use pre_push_frame to reset parser 2019-11-05 21:21:51 +00:00
Aaron Boxer bfee115d66 jpeg2000parse: parse_event: call base class at end
derived class should do it's work first before calling base
2019-11-05 21:21:51 +00:00
Aaron Boxer 67cffd70ad jpeg2000parse: do hard reset if gst_base_parse_finish_frame fails 2019-11-05 21:21:51 +00:00
Aaron Boxer a35157debf jpeg2000parse: initialize some variables to make valgrind happy 2019-11-05 21:21:51 +00:00
Aaron Boxer fae0664824 jpeg2000parse: use GST_INT in caps for profile
Negotiation failed with GST_UINT
2019-11-05 21:21:51 +00:00
Aaron Boxer 1344d9f560 jpeg2000parse: make explicit that codec_format is for src caps 2019-11-05 21:21:51 +00:00
Aaron Boxer 969e30c035 jpeg2000parse: refactor
1. only recalculate src codec format if sink caps change
2. use correct value for "jp2c" magic in J2C box ID
3. only parse J2K magic once, and store result
4. more sanity checks comparing caps to parsed codec
2019-11-05 21:21:51 +00:00
Aaron Boxer 2b6b1a2b04 jpeg2000parse: set parsed to TRUE in src caps 2019-11-05 21:21:51 +00:00
Aaron Boxer 453a65b8e9 jpeg2000parse: only cache caps parameters when caps have in fact changed 2019-11-05 21:21:51 +00:00
Aaron Boxer ead5dba3ac jpeg2000parse: fix typos in media format 2019-11-05 21:21:51 +00:00
Aaron Boxer 88efbd2344 jpeg2000parse: add reset method
Also add three new struct members, currently unused.
2019-11-05 21:21:51 +00:00
Aaron Boxer 6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Vivia Nikolaidou 2386858a91 Add files from gst-rtmp
For master, without autotools.
2019-11-05 13:52:55 +00:00
Olivier Crête 3a9c224ac2 ristsrc: Apply BINDTODEVICE to socket created by udpsrc too 2019-11-04 20:47:23 +00:00
Yeongjin Jeong 732735cab0 h265parse: Fix wrong NALU minimum length check
Fixes a problem where an EOS/EOB NALU placed at the end of
an AU is detected as an other AU and create a buffer that
does not have valid pts.
2019-11-04 14:16:49 +09:00
Yeongjin Jeong 0318458b0e h264parse: Fix wrong NALU minimum length check
Fixes a problem where an EOS/EOB NALU placed at the end of
an AU is detected as an other AU and create a buffer that
does not have valid pts.
2019-11-04 14:16:49 +09:00
Edward Hervey ef16d7558f mpegtsmux: Add SCTE-35 support
This adds two properties:
* scte-35-pid: If not 0, enables the SCTE-35 support for the current
  program. This will write the proper PMT and send SCTE-35 NULL
  commands (i.e. heartbeats) at a regular interval
* scte-35-null-interval: This specifies the interval at which the
  NULL commands should be sent

Sending SCTE-35 commands is done by creating the appropriate SCTE-35
GstMpegtsSection and then sending them on the muxer. See the
associated example
2019-10-31 12:31:27 +00:00
Edward Hervey 6a9108884c mpegts: Add support for SCTE-35 sections
Not all commands are supported, but the most common ones are.
Both parsing and packetizing is supported
2019-10-31 12:31:27 +00:00
Edward Hervey 5464775aef tsmux: Disable bluray-isms from PMT
We were unconditionally adding top-level descriptors in the PMT which
were only related to bluray support for PS3 (from 10 years ago).

These should be re-added conditionally
2019-10-31 12:31:27 +00:00
Edward Hervey 878edacc05 mpegtspacketizer: Fix off-by-one error
This went un-noticed for 6 years :( The issue is that for short
sections (without subtables and CRC), we would always fail when
checking whether we had enough data or not and then default to the
long section checking.

Use the long section checking would then cause interesting side-effects
for short sections (such as believing they were already seen and therefore
would be dropped/ignored).
2019-10-31 12:31:27 +00:00
Sebastian Dröge 5a9541caff timecodestamper: Add properties to time out cached upstream/LTC timecodes after a while
By default we never time them out and simply continue couting up with
each frame forever.
2019-10-23 16:48:26 +03:00
Sebastian Dröge fc463b9ebc timecodestamper: Add new auto-resync boolean property
This allows selecting whether we continue updating our last known
upstream timecode whenever a new one arrives or instead only keep the
last known one and from there on count up.
2019-10-23 16:48:26 +03:00
Sebastian Dröge 96aa9b5633 timecodestamper: Add last-known-or-zero mode
This uses the last known upstream timecode (counted up per frame), or
otherwise zero if none was known.

The normal last-known timestamp uses the internal timecode as fallback
if no upstream timecode was ever known.
2019-10-23 16:48:26 +03:00
Sebastian Dröge b57687a772 timecodestamper: Don't initialize upstream timecode with zero if none was seen
Instead keep it unset and use the internal timecode wherever needed as
fallback.
2019-10-23 16:48:26 +03:00
Sebastian Dröge faffeaf839 timecodestamper: Update set-tc property documentation with latest version of reality 2019-10-23 16:48:26 +03:00
Sebastian Dröge 651110de09 pnmdec: Return early on ::finish() if we have no actual data to parse
Otherwise we'd be working with a NULL buffer and cause various critical
warnings along the way.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1104
2019-10-23 11:32:56 +00:00
Tim-Philipp Müller f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00