Commit graph

7504 commits

Author SHA1 Message Date
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