Commit graph

7559 commits

Author SHA1 Message Date
Tim-Philipp Müller efa5c02636 rtp: fix autotools build some more 2019-06-05 17:00:51 +01:00
Sebastian Dröge 7117ba0a53 avwait: Allow start and end timecode to be set back to NULL
And check everywhere if they're NULL before accessing them.
2019-06-05 11:47:36 +03:00
Nicolas Dufresne 2667081654 make: rtp: Remove spurious header file
This header file no longer exist.
2019-06-03 20:29:18 -04:00
Marc Leeman 3ef737605a rtpmanagerbad: add RTP streaming elements
This is a re-implementation of the RTP elements that are submitted in
2013 to handle RTP streams. The elements handle a correct connection
for the bi-directional use of the RTCP sockets.

https://bugzilla.gnome.org/show_bug.cgi?id=703111

The rtpsink and rtpsrc elements add an URI interface so that streams
can be decoded with decodebin using the rtp:// interface.

The code can be used as follows

```
gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay config-interval=3 ! rtpsink uri=rtp://239.1.1.1:1234

gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay config-interval=1 ! rtpsink uri=rtp://239.1.2.3:5000
gst-launch-1.0 rtpsrc uri=rtp://239.1.2.3:5000?encoding-name=H264 ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink

gst-launch-1.0 videotestsrc ! avenc_mpeg4 ! rtpmp4vpay config-interval=1 ! rtpsink uri=rtp://239.1.2.3:5000
gst-launch-1.0 rtpsrc uri=rtp://239.1.2.3:5000?encoding-name=MP4V-ES ! rtpmp4vdepay ! avdec_mpeg4 ! videoconvert ! xvimagesink
```

rtpmanagerbad: add pkg-config
rtpmanagerbad: Rtp should be uppercase
rtpmanagerbad: add G_OS_WIN32 for shielding unix headers
rtpmanagerbad: remove Since from documentation
rtpmanagerbad: rename lib name from nrtp to rtpmanagerbad
rtpmanagerbad: sync meson.build with other modules
rtpmanagerbad: add Makefile.am
rtpmanagerbad: use GstElement to count pads
rtpmanagerbad: use gst_bin_set_suppressed_flags
rtpmanagerbad: check element creation
rtpmanagerbad: post message when trying to access missing rtpbin
rtpmanagerbad: return FALSE with g_return tests
rtpmanagerbad: use gsocket multicast check
rtpmanagerbad: use gst_caps_new_empty_simple iso gst_caps_from_string
rtpmanagerbad: sync with gstrtppayloads.h
rtpmanagerbad: correct media type X-GST
rtpmanagerbad: test if a compatible pad was found
rtpmanagerbad: remove evil copy of GstRTPPayloadInfo
rtpmanagerbad: add gio_dep to meson
rtpmanagerbad: revert to old glib boilerplate

GStreamer 1.16 does not yet support the newer GLib templates, so revert.

rtpmanagerbad: return GST_STATE_CHANGE_NO_PREROLL for live sources

for live sources, NO_PREROLL should be returned for PLAYING->PAUSED and
READY->PAUSED transitions.

rtpmanagerbad: use GstElement pad counting
rtpmanagerbad: just use template name to request pad
rtpmanagerbad: remove commented code
rtpmanagerbad: use funnel to send multiple streams on one socket
rtpmanagerbad: avoid beaches

beaches should only be used during the summer, so rewrite the code to
return explicitly and avoid beaches during the winter.

rtpmanagerbad: add copyright to test code
rtpmanagerbad: g_free is NULL safe
rtpmanagerbad: do not trace rtpbin
rtpmanagerbad: return NULL explitly
rtpmanagerbad: warn when data port is not even

According to RFC 3550, RTP data should be sent on even ports, while RTCP
is sent on the following odd port.

rtpmanagerbad: document port allocation in rtpsink/src
rtpmanagerbad: improve uri description
rtpmanagerbad: add comment re-use socket
rtpmanagerbad: rename gst_object_set_properties_from_uri_query
rtpmanagerbad: loan prop/val setter from rist
rtpmanagerbad: rtpsrc: fix unitialised pointer
rtpmanagerbad: fix silly typo
rtpmanagerbad: test for empty key/value
rtpmanagerbad: rtpsrc: deprecate ssrc collision to INFO
rtpmanagerbad: sync debug with rist
rtpmanagerbad: small strings allocated on stack
rtpmanagerbad: correct rename
rtpmanagerbad: add locking on prop setters/getters

Locking is added because the URI allows to access the properties too.

rtpmanagerbad: allow for RTCP through NAT
rtpmanagerbad: move gio to header file
rtpmanagerbad: free small strings too
rtpmanagerbad: ttl_mc for ttl on dynudpsink
rtpmanagerbad: add comments on the URI registered
rtpmanagerbad: correct macro after file rename
rtpmanagerbad: code style
rtpmanagerbad: handle wrong URIs in setter
rtpmanagerbad: nit URI notation correction

In an URI, the first key/value pair should not have an ampersand, the
parser did not die though.
2019-06-03 20:08:23 +00:00
Vivia Nikolaidou 50075616f2 avwait: Don't print warnings for every buffer passed 2019-05-31 18:47:03 +03:00
Tim-Philipp Müller 7853700b50 meson: add more plugins to plugins list
Makes sure their path gets added to the uninstalled environment
and makes sure they get included in the docs.
2019-05-30 20:41:57 +02:00
Mathieu Duponchelle f5495700fb basetsmux: don't reset pad on flush_stop
This was mistakenly added when porting to aggregator, this
restores the old behaviour, by only resetting them when the
muxer itself is reset
2019-05-30 17:20:49 +02:00
Mathieu Duponchelle 1e72aa6e85 basetsmux: fix send_event by chaining up 2019-05-30 17:20:12 +02:00
Mathieu Duponchelle 02ded087a4 mpegtsmux: add SECTION comment
We include an example for injecting sections in the transport
stream in the documentation
2019-05-30 13:53:05 +00:00
Mathieu Duponchelle 76c3d98962 basetsmux: preserve user-specified sections across resets
As sections can be provided by the user through send_event
when the element state is NULL, their lifetime is expected
to match that of the muxer, and they must be preserved when
the state changes
2019-05-30 13:53:05 +00:00
Mathieu Duponchelle fdfd4600c1 atscmux: send empty RRT / MGT / STT tables
These are mandated by A/65, their absence gets flagged by
stream analyzers. Users can of course provide filled up
versions through the send_event API.
2019-05-30 13:53:05 +00:00
Mathieu Duponchelle 5d41740ff6 tsmux: maintain packet counters in a global array
We can have multiple TsMuxPacketInfo objects for the same PID
with user-provided sections, for example ATSC requires multiple
tables with the same PID.
2019-05-30 13:53:05 +00:00
Mathieu Duponchelle da6afdec9c doc: remove xml from comments 2019-05-29 22:58:08 +02:00
Mathieu Duponchelle 102b1346e7 doc: fix element section documentations
Element sections were not rendered anymore after the hotdoc
port, fixing this revealed a few incorrect links.
2019-05-25 16:58:13 +02:00
Sebastian Dröge 1c712ca555 avwait: Protect properties and some other code with the mutex
These variables are all accessed from multiple threads.

Also fix some minor leaks in error code paths.
2019-05-24 10:41:35 +00:00
Sebastian Dröge d55dda6252 avwait: Insert some empty lines to give the code some space to breath 2019-05-24 10:41:35 +00:00
Sebastian Dröge c8876a37ba avwait: Allow setting start timecode after end timecode and the other way around
This might be necessary temporarily for changing the previous settings.
Make it an actual error if the settings are like this while processing a
buffer.
2019-05-24 10:41:35 +00:00
Sebastian Dröge ab9d42cc7f proxy: Forward queries/events sent directly to the element correctly 2019-05-22 07:48:33 +00:00
Sebastian Dröge 70b08bdbfa proxy: Set SOURCE flag on the source and SINK flag on the sink
So that they are properly recognized as such.
2019-05-22 07:48:33 +00:00
Haihao Xiang 7820109b88 ivfparse: Check the data size against IVF_FRAME_HEADER_SIZE
It is parsing frame data and so should check the data size against the
frame header size instead of the file header size. If don't, it is
possible to drop the last frame because IVF_FILE_HEADER_SIZE is greater
than IVF_FRAME_HEADER_SIZE
2019-05-22 12:37:29 +08:00
Nicolas Dufresne 98acb3260d rist: Add combined bonding-method support
This patchs add support for configuring the bonding method used. There is
two method specified

 - redundant: All the RTP packets are replicated
 - combined: RTP packet are evenly distributed over each links

Additionally, an application can set the "dispatcher" property in order
to implement custom dispatching method. Whenever the "dispatcher"
property is set, "bonding-method" property will be ignored.
2019-05-21 18:49:17 +00:00
Nicolas Dufresne 9a443c04bc ristsrc: Implement per session stats
As we can now have multiple sessions, stats need to be implemented per
session. This follow RTPSession model with sources. The stats are now:

    dropped: 0
    received: 0
    recovered: 0
    permanently-lost: 0
    duplicates: 0
    retransmission-requests-sent: 0
    rtx-roundtrip-time: 0
    session-stats:
        session-id=0
            rtp-from=""
            rtcp-from=""
            dropped=0
            received=0
        session-id=1
            rtp-from=""
            rtcp-from=""
            dropped=0
            received=0
        . . .

session-stats is a GValueArray as there is no better alternatives.
2019-05-21 18:49:17 +00:00
Nicolas Dufresne 0c26aaa614 ristsrc: Cleanup unused include 2019-05-21 18:49:17 +00:00
Nicolas Dufresne 73edff67c7 ristsink: Implement per session stats
As we can now have multiple sessions, stats need to be implemented per
session. This follow RTPSession model with sources. The stats are now:

  sent-original-packets: 0
  sent-retransmitted-packets: 0
       session-stats:
            session-id=0
              sent-original-packets=0
              sent-retransmitted-packets=0
              round-trip-time=0
            session-id=1
              sent-original-packets=0
              sent-retransmitted-packets=0
              round-trip-time=0
            . . .

session-stats is a GValueArray as there is no better alternatives.
2019-05-21 18:49:17 +00:00
Nicolas Dufresne 4bba95ead2 ristsrc: rtxbin may be null in finalize 2019-05-21 18:49:17 +00:00
Nicolas Dufresne e914abd402 ristsrc: Add bonding support
This add support for receiving and aggregating the same stream
over multiple addresses.
2019-05-21 18:49:17 +00:00
Nicolas Dufresne ffedd7ce2d ristsink: Implement bonding support 2019-05-21 18:49:17 +00:00
Marc Leeman ca36d70538 rist: spell and grammar corrects in top comments 2019-05-21 18:49:02 +00:00
Thibault Saunier 397f3afd19 docs: Update cache and mark some rist prop as 'show-default' 2019-05-21 13:31:52 +00:00
Thibault Saunier 601233c9ad doc: Add proxysink/proxysrc 2019-05-21 13:31:52 +00:00
Seungha Yang 1e3eb00b17 mpegtsmux: Fix build warning error
gstmpegtsmux.c:291:3: error: implicit declaration of function ‘memmove’ [-Werror=implicit-function-declaration]
   memmove (map.data + 4, map.data, map.size - 4);
   ^
gstmpegtsmux.c:291:3: error: incompatible implicit declaration of built-in function ‘memmove’ [-Werror]
gstmpegtsmux.c:291:3: note: include ‘<string.h>’ or provide a declaration of ‘memmove’
2019-05-20 19:34:37 +09:00
Mathieu Duponchelle 54cb25456d basetsmux: improve bitrate property documentation 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 9190541e3c tsmux: refactor logic for when to (re)transmit tables
In order to output them at regular intervals in the bitstream
when a bitrate is specified.
2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 52efb62876 basetsmux: fix PCR stream selection 2019-05-19 19:40:48 +00:00
Jan Schmidt 1ff72bb69d Fix compile after aggregator rewrite and base class refactor 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 3c7c08e7c4 tsmux: fix continuity counter for packets with no payload 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle a1cadd11b8 mpegtsmux: aggregator port 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle a57f4dc8d9 mpegtsmux: spring cleanup, no functional change 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 44c701d113 basetsmux: extract m2ts-mode to mpegtsmux 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 649cc2d5e8 mpegtsmux: extract an actual base class 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 4e7f94f5fa mpegtsmux: expose the vmethods necessary for ATSC E-AC-3 handling 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle ea011a3266 mpegtsmux: provide API for subclasses to override stream creation 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 80bfa16c95 mpegtsmux: add an ATSC subclass 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 98c98c7c53 tsmux: Calculate PCR from number of bytes written in CBR mode 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 07235bbf46 mpegtsmux: Expose bitrate property
This allows outputting a Transport Stream with a constant bitrate,
by inserting null packets.
2019-05-19 19:40:48 +00:00
Mathieu Duponchelle 4d53a7ac09 tsmux: actually respect the PCR frequency we target 2019-05-19 19:40:48 +00:00
Mathieu Duponchelle dc2b28d456 tsmux: Use DTS over PTS 2019-05-19 19:40:48 +00:00
Olivier Crête beba12e97b rist: Fix typo 2019-05-17 17:15:13 -04:00
Thibault Saunier e19700c458 docs: Add gstrist to the documentation 2019-05-16 09:16:34 -04:00
Thibault Saunier 8917c62f93 docs: Make sure frei0r plugins properties default are stable
frei0r returns 'random' values as default and it makes the cache
often change for no good reason
2019-05-14 10:47:19 -04:00
Thibault Saunier 47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Thibault Saunier 7fe3f36ac8 Minor documentation fixes 2019-05-13 11:36:27 -04:00
Seungha Yang a24367132b h265parse: Parse mastering display info and content light level from SEI
... and set to caps if necessary.

Note 1) the mastering display info and content light level SEI meessages
are persistent in the corresponding codec video sequence (i.e., GOP).
So any bitstream containing those SEI messages
(and also all pictures are intended to be HDR rendered) should be ensured that
each first slice of codec video sequence follows those SEI messages.

Note 2) The codec video sequence is a group an [IRAP + NoRaslOutputFlag == 1]
and following AUs which are not [IRAP + NoRaslOutputFlag == 1]
The NoRaslOutputFlag is equal to 1 for each IDR AU, BLA AU and some CRA AU.
For a CRA AU to have NoRaslOutputFlag equal to 1, following condition should required.
* When the CRA AU is the first AU in the bitstream in decoding order
* or the CRA AU is the first AU that follows an end of sequence NAL in decoding order
* or the HandleCraAsBlaFlag equal to 1.

Due to the limited context in parse element, in this commint, CRA AU will not considered as
having the NoRaslOutputFlag equal to 1. Therefore, in the worst case,
mastering-display-info and content-light-level could be cleared one GOP after
when stream was chagned from HDR to SDR.
2019-05-03 19:44:15 +00:00
Nicolas Dufresne f0d04b39dd rist: Add a plugin implenting RIST TR-06-1 Simple Profile
RIST TR-06-1 is a specification for video streaming made by the VSF
group. It is using a subset of RTP specification to which some
modification has been made to improve RTX behaviour and avoid any need
for signaling. The plugin implement ristrtxsend / ristrtxreceive element
which are the RIST specific equivalent of rtprtxsend/rtprtxreceive and
ristsink / ristsrc which implement rist transmitter and receiver. The
RIST protocol is meant to be used in unidirectional way. Typically, MPEG
TS over RTP is used.

Currently we support unicast and multicast streaming according to the
specification. This patch does not include any bonding support yet. The
ristsrc element introduce rist:// URI handling in parallel to it's
property configuration interface.
2019-05-02 19:28:25 +00:00
Xavier Claessens 63562d0b0a h264parse: Fix typo when setting multiview mode and flags 2019-05-02 12:06:36 +00:00
Tim-Philipp Müller 76f1ed15fb h264parse: extract CEA-708 closed captions
Expose SEI data in the H.264 bitstream parser API and
extract closed captions and other things that are not
specified in the H.264 spec itself in the videoparser.

Based on patch by: Mathieu Duponchelle <mathieu@centricular.com>

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/940
2019-04-08 19:21:34 +01:00
Mathieu Duponchelle f11ce297f4 rtponviftimestamp: prioritize PTS over DTS for NTP timestamp
NTP timestamps are supposed to match the expected presentation
time, prefering the DTS to compute them was incorrect.

<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>

Section 6.3.1: NTP Timestamps
2019-04-05 00:28:48 +00:00
Mathieu Duponchelle 62b240eb4e rtponviftimestamp: buffer without PTS or DTS is not an error.
For example, when plugged after rtpgstpay, serialized events will
have neither.
2019-04-05 00:28:48 +00:00
Mathieu Duponchelle 9c3816830c rtponviftimestamp: implement support for the T flag
https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf

6.3 RTP header extension
2019-04-05 00:28:48 +00:00
Mathieu Duponchelle 0e89f2a6d9 h264parse, h265parse: take unit_field_based_flag into account ..
when computing timecode metas. Depending on the value of that flag,
n_frames is to be interpreted as a number of fields or a number of
frames. As GstVideoTimeCodeMeta always deals with frames, we want
to scale that number when needed.
2019-04-02 15:18:03 +02:00
Mathieu Duponchelle 55bb8966e1 h265parse: forward time codes
This transforms time code SEIs into GstVideoTimeCodeMeta
2019-04-01 10:02:33 +00:00
Mathieu Duponchelle 7c425cf339 h264parse: forward time codes
This transforms time codes from the timing SEI into
GstVideoTimeCodeMeta
2019-04-01 10:02:33 +00:00
Aaron Boxer adfd8aa696 mpegvideoparse: add debug code for closed captions
This debug code will help determine why certain instances of closed
captions that are present in the Picture User Data are not actually
processed by the pipeline
2019-03-27 13:22:47 -04:00
Haihua Hu 5498252750 h265parse: ignore VUI parse fail when parse SPS
VUI is an optional for SPS parse, some HEVC file has incorrect VUI
parameters but still can be decoded
2019-03-26 02:06:03 +00:00
Thibault Saunier ebb0527e75 mxfdemux: Avoid possible NULL caps 'dereferencing' 2019-03-21 00:40:53 +00:00
Tim-Philipp Müller b541b58937 netsim: don't use G_INLINE_FUNC
It's deprecated. Just use 'inline'.
2019-03-18 15:12:37 +00:00
Mathieu Duponchelle 91c76b0851 mpegtsmux: restore stream creation order
In 7c767f3fcd , stream creation was
refactored to occur before potential program creation. This created
issues with pipelines such as:

gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=640, framerate=25/1 ! \
x264enc ! hlssink2 target-duration=1

eg.: gst_buffer_copy_into: assertion 'bufsize >= offset + size' failed

As this reordering was actually not needed for the purpose of allowing
to specify a PCR stream, this reverts the reordering part of the
initial commit.
2019-02-27 19:00:36 +01:00
Vivia Nikolaidou ce0be4d1ac audiobuffersplit: Added max-silence-time property 2019-02-21 15:16:37 +00:00
Mathieu Duponchelle 7c767f3fcd mpegtsmux: allow specifying the PID of the PCR stream
The structure passed through the prog-map can now contain a
PCR_<prog_id>=sink_<PID> key-value pair.
2019-02-20 16:22:33 +01:00
Jan Schmidt b7f95d64f8 tsdemux: Skew correction should use the upstream DTS
The MPEG-TS packetiser should use the upstream DTS for
skew correction when running in that mode, as the DTS
carries the upstream arrival time. The PTS (if it's
set at all) is less useful, and can be invalid.
2019-02-13 22:15:53 +11:00
Nirbheek Chauhan fffb2aa12f misc: Fix warnings on Cerbero MinGW
gstladspa.c:360:5: error: zero-length ms_printf format string [-Werror=format-zero-length]

vad_private.c:108:3: error: this decimal constant is unsigned only in ISO C90 [-Werror]

gstdecklinkvideosink.cpp:478:32: error: comparison between 'BMDTimecodeFormat {aka enum _BMDTimecodeFormat}' and 'enum GstDecklinkTimecodeFormat' [-Werror=enum-compare]

win/DeckLinkAPI_i.c:72:8: error: extra tokens at end of #endif directive [-Werror]

win/DeckLinkAPIDispatch.cpp:35:10: error: unused variable 'res' [-Werror=unused-variable]

gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'DWORD' [-Werror=format]
gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'guint64' [-Werror=format]

kshelpers.c:446:3: error: missing braces around initializer [-Werror=missing-braces]
kshelpers.c:446:3: error: (near initialization for 'known_property_sets[0].guid.Data4') [-Werror=missing-braces]
2019-02-06 00:10:28 +05:30
Thibault Saunier 3324ad377d testbin: Do not take FlowCombiner into account when flushing
The way FlowCombiner combines the FLUSH doesn't work in the case
we have several "sinkpads" since any flush return FLUSH. But in the
case we have a seek where on one branch flush is done, we should
just say OK otherwise we might return FLUSHING to a src that has already
been seeked and is ready to process new buffers
2019-01-31 01:20:13 +00:00
Thibault Saunier a00e917811 testbin: Forward seek to all sources 2019-01-31 01:20:13 +00:00
Nicola Murino e5278757c3 mpegpsmux: add stream-format and alignment to H.264 caps 2019-01-24 22:51:39 +01:00
Nicola Murino 60501f128c mpegdemux: add support for H.265 2019-01-24 09:35:06 +00:00
Nicola Murino bbfd3154fb mpegdemux: add stream format to H.264 caps 2019-01-24 09:35:06 +00:00
Sebastian Dröge a3a67c3c30 removesilence: Add $(LIBM) to libraries
/usr/bin/ld: .libs/libgstremovesilence_la-vad_private.o: in function `vad_set_threshold':
./gst/removesilence/vad_private.c:108: undefined reference to `pow'
/usr/bin/ld: .libs/libgstremovesilence_la-vad_private.o: in function `vad_get_threshold_as_db':
./gst/removesilence/vad_private.c:114: undefined reference to `log10'
2019-01-17 17:14:31 +02:00
Tim-Philipp Müller e42efbccb1 Remove compositor plugin which was moved to -base
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/138
2018-12-27 15:31:58 +01:00
Tim-Philipp Müller b9e15fddb1 Remove GstVideoAggregator, moved into libgstvideo in -base
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/137
2018-12-26 19:06:33 +01:00
Tim-Philipp Müller 63e961ff7a stereo: remove plugin which has been merged into audiofx in -good
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/457
2018-12-25 13:06:40 +01:00
Sebastian Dröge 3891bf2695 timecodestamper: Don't use deprecated API 2018-12-20 10:13:45 +02:00
Tim-Philipp Müller 9313470358 meson: install freeverb preset file 2018-12-17 09:12:53 +00:00
Nicola Murino c16bc1c5a1 removesilence: add libm to meson.build 2018-12-14 19:55:32 +01:00
Nicola Murino 824e079273 removesilence: reset filter on start and on segment events 2018-12-14 18:43:49 +01:00
Nicola Murino f7880c0272 removesilence: improve documentation 2018-12-14 18:43:49 +01:00
Nicola Murino 8978f55886 removesilence: add threshold property
silence thresold was hardcoded to -60 dB, now it is configurable
using this new property

Closes #63
2018-12-14 18:43:49 +01:00
Nicola Murino e549566969 removesilence: add properties to detect silence only after minimum silence time/buffers
Closes #63
2018-12-14 18:43:49 +01:00
Nicola Murino ef3da2787a removesilence: add silent property to control bus message notifications
Closes #63
2018-12-14 18:43:49 +01:00
Nicola Murino fa7da2fb16 removesilence: post bus messages when silence is detected/finished
Closes #63
2018-12-14 18:43:49 +01:00
Nicola Murino 50a84f8d7b removesilence: add squash property
allows to output buffers without timestamp gap when silence is removed

Closes #63
2018-12-14 18:43:49 +01:00
Seungha Yang 8766a45ee4 h26{4,5}parse: Don't confuse nal of codec_data with frame
vps/sps/pps in codec_data shouldn't be considered as inband data.
Otherwise, h26{4,5}parse never insert them to nal when transform
(packetized to byte-stream) use case
2018-12-13 10:32:30 +00:00
Tim-Philipp Müller 1b0e150d88 mpegvideoparse: extract CEA-708 closed captions 2018-12-11 13:56:06 +00:00
Sebastian Dröge bb135ba764 mpegtsmux: Handle zero-sized buffers correctly without going into an infinite loop
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/844
2018-12-10 14:20:14 +00:00
Guillaume Desmottes 5efe9944e0 h265parse: process SEI recovery point
Similar change as the on I did in h264parse. We want to process SEI
recovery point as keyframe so muxers will mark them as seek points and
decoders will be able to start decoding from them rather than waiting
for an IDR.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/790
2018-12-02 02:07:39 +00:00
Guillaume Desmottes 99bd3f716c h265parse: parse SEI messages
Don't do anything with them yet. I just copied the parsing and
processing logic from h264parse.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/790
2018-12-02 02:07:39 +00:00
Guillaume Desmottes 5ac4a6e003 h264parse: mark SEI Recovery Point as keyframes
The spec states that "recovery point SEI message assists a decoder in
determining when the decoding process will produce acceptable
pictures for display after the decoder initiates random access or after the
encoder indicates a broken link in the coded video sequence."

Mark those as keyframes so muxers will mark them as seek points and
decoders will be able to start decoding from them rather than waiting
for an IDR.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/790
2018-12-02 02:07:39 +00:00
Seungha Yang 68a5697c1a h265parse: Don't duplicate VPS/SPS/PPS per config-interval if exists
Don't need to manually insert VPS/SPS/PPS since inband data could be useable.

Also fixes #824
2018-11-30 02:19:17 +00:00
Seungha Yang 4f7fe897b9 h264parse: Don't duplicate SPS/PPS per config-interval if exists
Don't need to manually insert SPS/PPS since inband data could be useable.

Fixes #824
2018-11-30 02:19:17 +00:00
Lars Petter Endresen e6c56ec014 siren: Fix floating point invalid operation
Mix of single and double precision leads to zero-by-zero divide
for upper 64-bit of the xmm register, even though they are not
used.
2018-11-15 08:44:12 +00:00
Matthew Waters aa3d7de98b tsdemux: implement preliminary support for the bitrate query
Return the size / total duration as a ballpark estimate.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:09:21 +00:00
Tim-Philipp Müller 2b2fc0f855 compositor: update disted orc backup files 2018-11-02 20:31:54 +00:00
Víctor Manuel Jáquez Leal 2e6e4cce0b compositor: Fix enum type mismatch
The variable blend_mode is GstCompositorBlendMode but it is
assigned to a GstCompositorOperator enum value.
2018-10-31 19:22:35 +01:00
Johan Bjäreholt 9cae8f6030 compositor: fix undeclared functions 2018-10-30 13:32:33 +01:00
Sebastian Dröge aae25e0032 compositor: Implement different operators via per-pad property
This removes the crossfade-ratio property and replaces it with an
operator property. Currently this implements the following operators:

- SOURCE: Copy over the source and don't look at the destination
- OVER: Default blending of the source over the destination
- ADD: Like OVER but simply adding the alpha instead

See the example for how to implement crossfading with this.

https://bugzilla.gnome.org/show_bug.cgi?id=797169
2018-10-28 17:13:26 +00:00
Sebastian Dröge 690a18ee09 compositor: Remove extra header for the pad declaration
There's no reason for having this separate apart from making things less
discoverable.
2018-10-27 13:59:57 +01:00
Seungha Yang 53b6c94d63 meson: Replace empty configuration_data() with copy keyword
Use 'copy' keyword to avoid meson warning message.
Note that 'copy' keyword in configure_file() is available
since meson 0.47.0

https://bugzilla.gnome.org/show_bug.cgi?id=797298
2018-10-17 14:08:47 +01:00
Vivia Nikolaidou d89104c57f avwait: Fix sending of dropping=true messages
If the first audio buffer to be dropped started right between two video
buffers (after the end of the first but before the start of the second,
as is often the case with N/1001 video frame rates), we would miss
sending the dropping=true message.

https://bugzilla.gnome.org/show_bug.cgi?id=797248
2018-10-04 12:40:45 +03:00
Mathieu Duponchelle 14b9a34f54 mpegtsmux: add custom AC-3 descriptor
tsdemux expects a custom descriptor (GST_MTS_DESC_AC3_AUDIO_STREAM)
to detect a stream as AC3 and not EAC3.

Note that tsdemux expects this descriptor because mpegtsmux writes
a stream with a HDMV registration descriptor.

Fixes:

gst-launch-1.0 -v audiotestsrc ! avenc_ac3 ! ac3parse ! mpegtsmux ! \
tsdemux ! ac3parse ! avdec_ac3 ! audioconvert ! autoaudiosink

https://bugzilla.gnome.org/show_bug.cgi?id=797220
2018-09-27 17:34:10 +02:00
Vivia Nikolaidou b1b4a04338 avwait: Send dropping=true message after all streams stopped
Previously it was dispatched before the last video buffer, and audio
buffers would follow afterwards. It's misleading to send the
dropping=true message before both streams have really stopped, it can
lead to races when someone is e.g. waiting for that message to send EOS.

Also added some debug output.

https://bugzilla.gnome.org/show_bug.cgi?id=797145
2018-09-21 17:31:25 +03:00
Seungha Yang da7143078f h265parse: Fix periodic SPS/PPS sending work after a seek
Apply the commit ef71b61
See also https://bugzilla.gnome.org/show_bug.cgi?id=742212

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang fd79d8d7a3 h265parse: Add support insert parameter set per IDR
Apply commits 0c04e00, bf0d952 and a0876aa to h265parse.
See also https://bugzilla.gnome.org/show_bug.cgi?id=766803

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang 8b57392b92 h265parse: Don't discard first AU delimiter
Apply the commit 48a1f27

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang 60d8b7184f h265parse: Consider SEI NALU as "HEADER" packets
Apply the commit 69c09c3

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang 3ad30ef76e h265parse: Don't unref buffer that was unreffed just a few lines before already
Apply the commit 9b50a12

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang 27432ab067 h265parse: Reset the parser information when caps changes
Apply the commit 14f6fcd

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang 80cab68889 h265parse: Fix collection of access units to preserve config headers
Apply the commit 7d44a51
See also https://bugzilla.gnome.org/show_bug.cgi?id=732203

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang ababccbcb2 h265parse: Improve conditions for skipping NAL units
See also https://bugzilla.gnome.org/show_bug.cgi?id=732203

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang c0756d0909 h265parse: Introduce new state tracking variables
Direct applying the commit 7bb6443. This could fix also unexpected
nal dropping when nonzero "config-interval" is set.
(e.g., gst-launch-1.0 videotestsrc ! x265enc key-int-max=30 !
 h265parse config-interval=30 ! avdec_h265 ! videoconvert ! autovideosink)

Similar to the h264parse, have_{vps,sps,pps} variables will be used
for deciding on when to submit updated caps or not, and rather mean
"have new SPS/PPS to be submitted?"
See also https://bugzilla.gnome.org/show_bug.cgi?id=732203

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang ad7cf957fb h265parse: Fix and optimize NAL collection function
Adopt h264parse's _collect_nal() behavior.
See also commit 5601c87 and  https://bugzilla.gnome.org/show_bug.cgi?id=732154

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang 2bd883621f h265parse: Unref/replace force_key_unit_event in gst_h265_parse_reset
Apply the commit 36a2aca

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang 7032b6a454 h265parse: Copy over DISCONT flag from input buffers
Apply the commit 10ffa08

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Nicolas Dufresne b7bc4b4cb5 watchdog: Add missing static keyword
get/set_property method should have been static.
2018-09-10 16:51:13 -04:00
Vivia Nikolaidou ae7ecfceed timecodestamper: Fix typo in set_drop_frame
Was checking if fps_d == 60000 (instead of fps_n), causing 60000/1001 to
be always falsely interpreted as non-drop-frame
2018-09-03 15:15:45 +03:00
Johan Bjäreholt 962ca01596 audiobuffersplit: Fix format string warning
We have a GST_DEBUG_OBJECT, which prints a guint64 with %lu which gave a
compiler warning. Used G_GUINT64_FORMAT instead.

https://bugzilla.gnome.org/show_bug.cgi?id=797036
2018-08-28 11:12:45 +03:00
Tim-Philipp Müller 90625953f2 freeverb: update for g_type_class_add_private() deprecation
Not that the private struct is really needed here.
2018-08-19 14:42:23 +01:00
Sebastian Dröge f19edc8c83 audiobuffersplit: Add a gapless mode which inserts silence/drops samples on disconts
The output is always a continguous stream without any gaps.
2018-08-17 16:40:16 +03:00
Sebastian Dröge 2f761b89df audiobuffersplit: Always set DISCONT flag after resyncs 2018-08-17 16:40:16 +03:00
Sebastian Dröge b2602a459b audiobuffersplit: Keep track of resync time separately
If we drain after a discont, the discont time given by the stream
synchronizer is already the time after the discontinuity. But we need to
drain all pending data based on the previous discont time instead.
2018-08-17 16:40:16 +03:00
Sebastian Dröge 186870d10a audiobuffersplit: Update output buffer size after each buffer to compensate for accumulated errors
https://bugzilla.gnome.org/show_bug.cgi?id=796981
2018-08-17 16:40:16 +03:00
Vivia Nikolaidou ff952374b5 avwait: Start video and audio together if audio starts late
Also add test to meson

https://bugzilla.gnome.org/show_bug.cgi?id=796977
2018-08-17 14:57:36 +03:00
Sebastian Dröge 2846ebfc2a compositor: Define crossfade-ratio to have range [0.0,1.0]
Previously negative values had the same effect as 0.0, which was
confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=796845
2018-08-16 17:08:06 +03:00
Wim Taymans e098ad4918 rfbdecoder: don't free decoder data
The decoder data is freed when we read more data.
2018-08-16 11:44:27 +02:00
Vivia Nikolaidou 8ede252a8a avwait: Don't wait if audio_running_time_to_wait_for is NONE
The case is properly handled a few lines below by dropping the buffer.
We shouldn't perpetually block the audio chain function until the
target-timecode is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=796906
2018-08-01 20:18:19 +03:00
Nicolas Dufresne 5c52f866ad jpegparse: Generate timestamp if framerate is known
This change allow setting timestamp on streams that would otherwise have
no timestamp. This is useful to make a video from bunch of JPEG files. An
example of such pipeline would be:

gst-launch-1.0 multifilesrc location=%05d.jpeg caps=image/jpeg,framerate=30/1 \
               ! jpegparse ! fakesink silent=0 -v
2018-07-27 23:00:53 -04:00
Nirbheek Chauhan b55dfb5313 Add feature options for almost all plugins
The only plugins remaining are those that haven't been ported to Meson
yet, and msdk. Also, the tests are still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 19:04:38 +05:30
Nirbheek Chauhan 7ef303fa28 meson: Add feature options for many plugins
The rest will be converted later, these are necessary for gst-build to
set options correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 18:43:52 +05:30
Sebastian Dröge 84a956768d compositor: Don't leak all buffers while crossfading and not all pads are crossfading 2018-07-26 00:20:02 +03:00
Vivia Nikolaidou 854baf4fdb avwait: Add recording property
It works like a valve in front of the actual avwait. When recording ==
TRUE, other rules are then examined. When recording == FALSE, nothing is
passing through.

https://bugzilla.gnome.org/show_bug.cgi?id=796836
2018-07-24 13:20:59 +03:00
Sebastian Dröge b0ae6a5221 compositor: Use 255 as maximum alpha instead of 256
255 will easily become 0 in the blending function as they expect
the maximum value to be 255.

Can be reproduce with

gst-launch-1.0 videotestsrc pattern=ball ! c.sink_0 \
               videotestsrc pattern=snow ! c.sink_1 \
               compositor name=c \
                 sink_0::zorder=0 sink_1::zorder=1 sink_0::crossfade-ratio=0.5 \
                 background=black ! \
               videoconvert ! xvimagesink

crossfade-ratio +/- 0.001 makes it work correctly and the same happens
at e.g. 0.25, 0.75, N*0.0625

https://bugzilla.gnome.org/show_bug.cgi?id=796846
2018-07-23 18:59:33 +03:00
Seungha Yang d95d944a34 compositor: Update conversion info in property setter
... not in getter. Otherwise, video-converter will not be updated
with new width/height

https://bugzilla.gnome.org/show_bug.cgi?id=796828
2018-07-18 14:41:31 +03:00
Georg Ottinger 71c5eae508 ivfparse: Add the AV01 FOURCC for parsing AV1 IVFs
Adds AV01 FOURCC to the list of allowed media files, in order to allow
parsing the IVF Container holding AV1 content.
At a later point dynamic resolution change can be supported - therefore
the sequence header OBU and frame header OBU of AV1 file must be parsed,
which can be done in future with the help of gst-lib gstav1parse.

https://bugzilla.gnome.org/show_bug.cgi?id=796677
2018-06-29 07:31:16 +02:00
Tim-Philipp Müller 2fac53fa51 jpegformat: get rid of unnecessary private structs 2018-06-23 23:51:37 +02:00
Nicolas Dufresne c052ae511a tsdemux: Don't set invalid seqnum on segment event
https://bugzilla.gnome.org/show_bug.cgi?id=796623
2018-06-19 06:56:48 +02:00
Edward Hervey 4ae9a9dc91 tsdemux: Don't query duration if program isn't active 2018-06-12 11:14:51 +02:00
Edward Hervey e1133bbbfe mpegtsdemux: Fix SEGMENT seqnum propagation
* If the seek was handled upstream, use that SEGMENT seqnum
* Use the proper invalid default value
2018-06-06 07:51:19 +02:00
Kyrylo Polezhaiev 7d4b037527 gdp: ignore timestamp of event
This field is not used and will be removed in 2.0 API.

https://bugzilla.gnome.org/show_bug.cgi?id=761462
2018-05-07 01:34:08 +10:00
Sebastian Dröge ea5de0d757 videoaggregator: Switch to a GstVideoAggregatorConvertPad subclass
This moves all the conversion related code to a single place, allows
less code-duplication inside compositor and makes the glmixer code less
awkward. It's also the same pattern as used by GstAudioAggregator.
2018-05-06 15:22:51 +02:00
Sebastian Dröge 0680c3e47d videoaggregator: Move needs_alpha pad field to the private struct
And also trigger renegotiation if the value has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=795836
2018-05-05 16:32:19 +02:00
Sebastian Dröge 83192bce84 videoaggregator: Move aggregated_frame and the pad buffer into the private struct
The aggregated_frame is now called prepared_frame and passed to the
prepare_frame and cleanup_frame virtual methods directly. For the
currently queued buffer there is a method on the video aggregator pad
now.
2018-05-05 16:32:19 +02:00
Sebastian Dröge e34d4e9bf4 videoaggregator: Move GstChildProxy implementations into leaf classes
Not every subclass will want to expose the pads via the interface.

https://bugzilla.gnome.org/show_bug.cgi?id=739011
2018-05-04 16:13:16 +02:00