Commit graph

9797 commits

Author SHA1 Message Date
Thibault Saunier
0a6a62aa76 docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
Thiago Santos
135e12565b rtspsrc: do not try to send EOS with invalid seqnum
The second udpsrc (rtcp) might not have seen the segment event if it was
not enabled or if rtcp is not available on the server. So if the
application tries to send an EOS event it will try to set an invalid
seqnum to the event.
2019-05-02 22:14:35 -07:00
Nicolas Dufresne
a6e7f258ac rtpsource: Add more information to probation warning 2019-05-02 14:44:58 -04:00
Nicolas Dufresne
84c102b6fe rtpsession: Call on-new-ssrc earlier
Right now, we may call on-new-ssrc after we have processed the first
RTP packet. This prevents properly configuring the source as some
property like "probation" are copied internally for use as a
decreasing counter. For this specific property, it prevents the
application from disabling probation on auxiliary sparse stream.

Probation is harmful on sparse streams since the probation algorithm
assume frequent and contiguous RTP packets.
2019-05-02 14:44:58 -04:00
Seungha Yang
74e409590a matroskamux: Write MasteringMetadata and Max{CLL,FALL}
Enable muxing with HDR meta data if upstream provided it
2019-05-01 14:28:36 +00:00
Seungha Yang
61f9a2a415 matroskademux: Add support parsing HDR metadata
Set SMPTE ST 2086 mastering-display-metadata and
content-light-level to caps, if any
2019-05-01 14:28:36 +00:00
Seungha Yang
53fedc43ae matroska: Remove white space 2019-05-01 14:28:36 +00:00
Sebastian Dröge
c4608b410c rtprawdepay: Don't get rid of the buffer pool on FLUSH_STOP
We expect there to be a pool as long as the caps are known and
FLUSH_STOP is not resetting the caps. Getting rid of the pool would
cause assertions.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/584
2019-05-01 10:00:51 +03:00
Danny Smith
037d70c01b rtpbin: Free storage when freeing session 2019-04-29 10:57:38 +02:00
Sebastian Dröge
0c7c31d197 matroskamux: Fix typo in error message 2019-04-25 21:52:42 +03:00
Sebastian Dröge
4881ea95b0 imagefreeze: Only set the DISCONT flag on the first buffer after segment start 2019-04-25 08:20:14 +00:00
Philippe Normand
aadfa5f20f scaletempo: Advertise interleaved layout in caps templates
Scaletempo doesn't support non-interleaved layout. Not explicitely stating this
would trigger critical warnings and a caps negotiation failure when scaletempo
is used as playbin audio-filter.

Patch suggested by George Kiagiadakis <george.kiagiadakis@collabora.com>.

Fixes #591
2019-04-23 13:39:20 +00:00
Seungha Yang
7fb8abf8bb meson: matroska: Ensure header dependency not only library
Library existence does not guarantee header.
2019-04-22 20:40:50 +09:00
Robert Rosengren
2476e9e4ae multidupsink: Use gst_net_utils_set_socket_tos for QoS DSCP
Util function in net library exists for setting QoS DSCP on socket, hence
use it to simplify code.
2019-04-22 09:16:20 +00:00
Tim-Philipp Müller
c6c3bed095 rtpulpfecdec,enc: unbreak plugin gtk-doc build in autotools
Fix doc chunks to not use that syntax for links that have the
url as description, it will be put verbatim into the xml/*.xml
file and then the expat parser will throw a syntax error like:

  File "../../common/mangle-db.py", line 71, in <module>
    main()
  File "../../common/mangle-db.py", line 69, in main
    patch (details.replace("-details", ""), os.path.basename(details))
  File "../../common/mangle-db.py", line 20, in patch
    doc = xml.dom.minidom.parse(related)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 84, column 7
2019-04-09 23:58:30 +01:00
Antonio Ospite
61c1385c42 rtpvrawpay: preserve GST_BUFFER_FLAG_DISCONT on the first outputted buffer
If the incoming frame buffer has GST_BUFFER_FLAG_DISCONT set this should
be preserved and set for the first output buffer too, like other
payloaders do.

Spotted with gst-validate-1.0 when adding integration tests for
rtpsession, a minimal test to reproduce the issue is:

$ gst-validate-1.0 videotestsrc num-buffers=1 ! rtpvrawpay ! identity ! fakesink
Starting pipeline
Pipeline started
   warning : Buffer didn't have expected DISCONT flag333 speed: 1.000000 />
             Detected on <identity0:sink>
             Detected on <identity0:src>
             Detected on <fakesink0:sink>
             Description : Buffers after SEGMENT and FLUSH must have a DISCONT flag

Issues found: 1

=======> Test PASSED (Return value: 0)
2019-04-09 09:32:43 +00:00
Olivier Crête
92138dc3d6 rtpulpfec*: Replace github URIs with gitlab.fdo ones 2019-04-09 08:17:28 +00:00
Olivier Crête
1bd81d3d33 rtpred*: Add example pipelines 2019-04-09 08:17:28 +00:00
Olivier Crête
11f3018170 rtpulpfec*: Improve documentation 2019-04-09 08:17:28 +00:00
Olivier Crête
070eacdd4f rtpstorage + rtpulpfecdec: Get the storage using a query as fallback
This allows it to be used using gst-launch for easier testing.
2019-04-09 08:17:28 +00:00
Nicolas Dufresne
ec06268ed8 rtpsession: Allow overriding NACK packet creation
This introduce a new signal on RTSession, on-sending-nacks is emited
right before the list of seqnums to be nacked are processed and
transformed into FB Nack. This allow implementing custom nacks
handling through another mechanism with APP feedback.
2019-04-05 18:36:36 -04:00
Mathieu Duponchelle
280d86a841 rtpsession: Add disable-sr-timestamp property
The Onvif Streaming Spec, in section 6.11, mandates that when
Rate-Control is disabled potential RTCP packets shall have
their timestamps set to 0.

<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>
2019-04-05 20:23:08 +02:00
Nicolas Dufresne
6bb53e75fb rtpsession: Send as many nack seqnum as possible
In order to do that, we now split the nacks registration from the actual
FB nack packet construction. We then try and add as many FB Nacks as
possible into the active packets and leave the remaining seqnums in the
RTPSource. In order to avoid sending outdated NACK later on, we save the
seqnum calculated deadline and cleanup the outdated seqnums before the
next RTCP send.

Fixes #583
2019-04-05 14:53:09 +00:00
John Bassett
74a74bfc99 rtpsession: Fix race when sending PLI, FIR and NACK packets
Calling rtp_session_send_rtcp before marking the source as requiring a
pli/fir/nack meant the rtcp_thread could be scheduled and start running
before the source was updated. This meant the request would not be sent
early but instead was transmitted with the next regular RTCP packet.

Add test for nack generation.
2019-04-05 14:53:09 +00:00
Nicolas Dufresne
6b50d142f3 rtpsession: Fix early rtcp time comparision
If the current time is equal to the early rtcp time deadline, there is
no need to schedule a timer. This ensure that immediate feedback is
really immediate and simplify implementing unit tests with the test
clock, which stops perfectly on the timeout time.

This fix has been extracted from Pexip feature patch called
  "rtpsession: Allow instant transmission of RTCP packets"
2019-04-05 14:53:09 +00:00
Mathieu Duponchelle
74e3eb1f1d rtpgstpay: Set DELTA_UNIT flag when appropriate
When used in combination with a rtponviftimestamp element
downstream, forwarding this flag ensures it gets correctly
serialized in the ONVIF header extension.
2019-04-04 19:08:23 +02:00
Antonio Ospite
435f67debf docs: fix typo s/abonormally/abnormally/ 2019-04-03 16:42:26 +02:00
Antonio Ospite
d6939c4031 docs: fix typo s/incomming/incoming/ 2019-04-03 16:38:56 +02:00
Antonio Ospite
f7c8317668 rtp: fix indentation after G_DEFINE_TYPE
A missing colon after G_DEFINE_TYPE declaration was confusing gst-indent
and causing problem in the pre-commit hook.

Add the missing colon and fix the following function declaration to
follow the normal GStreamer style.
2019-04-03 16:37:34 +02:00
Antonio Ospite
114de8cc96 rtpsession: fix comment to refer to buffers instead of groups
One comments in gst_rtp_session_chain_send_rtp_common() is referring to
groups in a buffer list, however this concept of "group" comes from
GStreamer 0.10 and does not exist anymore in GStreamer 1.0, so update the
comment to refer to buffers instead.
2019-04-02 13:03:56 +02:00
Antonio Ospite
e98b0ca8da rtpsource: add comment to explain why probation queue is not always cleared 2019-04-02 13:03:56 +02:00
Antonio Ospite
0fae88b5fd rtpsource: fix stats about received packets
The update_receiver_stats() function is called also when sending packets
in rtp_source_send_rtp(), and sending packets may happen using a buffer
list rather than individual buffers.

So update the stats using the actual number of packets sent.

NOTE: this is fine for the receive path too (rtp_process_send_rtp)
because the receive path does not support buffer lists and
pinfo->packets would always be equal to 1 in this case.
2019-04-02 09:26:03 +02:00
Olivier Crête
915a9c99bb rtpstorage: Limit the queue size
Limit to the queue size in case there is no arrival time or in case there is
a huge flood of packets.
2019-03-29 22:51:54 +00:00
Olivier Crête
0ecc52c2ee rtpbin: Request the FEC decoder even if ignore-pt is set 2019-03-28 16:24:17 -04:00
Olivier Crête
c2dd263562 rtpbin: Factor out the code that exposes the src pad 2019-03-28 16:24:12 -04:00
Olivier Crête
8bf074f21e rtpreddec: Add some more debug prints 2019-03-27 18:54:27 -04:00
Olivier Crête
c840328664 rtpstorage: Issue warning if request by size if 0
If the size is 0, then nothing will ever be in the storage, if a request is
received, it generally implies a misconfigured pipeline.
2019-03-26 19:41:06 -04:00
Olivier Crête
7a317ff732 rtpstorage: Add more debug messages 2019-03-26 19:41:06 -04:00
Olivier Crête
785219a317 rtpstorage: Make debug category available to sub objects 2019-03-26 19:41:06 -04:00
Olivier Crête
9b0a373eac rtpstorage: Add debug funcptr to chain function 2019-03-26 18:08:57 -04:00
Nicolas Dufresne
79fd0af152 gstrtpsession: Remove set but not use running-time 2019-03-22 20:01:52 +00:00
Olivier Crête
7ecbd7271d rtpmanager: Register chain functions to debug 2019-03-22 16:44:41 +00:00
Nicolas Dufresne
2ff7519d73 rtpbin: Allow reusing the sender AUX bin
This is needed for the case you don't know in advance all the sessions
you will be using, but would like to place all the related AUX element
in the same GstBin. As per current implementation, each time an sender
AUX bin is requested and returned, RTPBin will walk the src pads and
create sessions for these pads.

In the current implementation, if a src pad already have a sessions, it
returns an error and stops. As a side effect, if an AUX bin is reused in
a following AUX bin request, it can only work if the pads are created on
the last request.

This change simply relax the restriction in order to keep walking, and
just ensure that all newly created pads have a sessions.
2019-03-21 21:10:43 +00:00
George Kiagiadakis
d5ce10240a gstrtpsession: improve stats about rtx requests 2019-03-21 13:40:31 -04:00
George Kiagiadakis
db647ee55b rtprtxsend: Improve looging of not found RTX packet
When an RTX packet is not found, display a message that say if the
packet have not arrived yet or if it was already removed from the RTX
packet queue.
2019-03-21 13:19:52 -04:00
Nicolas Dufresne
0aff8a7d30 rtpsession: Remove unused rtp_session_create_source 2019-03-21 13:19:52 -04:00
Seungha Yang
63bb1e3a4d qtdemux: Don't pass zero to denominator for framerate
Need to respect return of gst_video_guess_framerate() to ensure
non-zero denominator.

This patch is to fix below error with an abnormal (but has valid frame) file.
(gst-play-1.0:17940): GStreamer-CRITICAL **: passed '0' as denominator for `GstFraction'
2019-03-19 12:35:08 +09:00
Charlie Turner
39d32b2394 qtdemux: Find mp4a esds atoms in protected streams sample description tables.
This problem was found in Test. 2 of the YouTube 2018 EME
tests[1]. The code was accidentally not finding an mp4a's esds atom in
the sample description table when the stream was encrypted. It assumed
that if the stream is protected, then only an enca atom will be found
here. What happens with YouTube is they often provide protected
content with a few seconds of clear content, and then switch to the
encrypted stream.

The failure case here was an incorrect codec_data field being sent
into aacparse. The advertisement of stereo audio @ 44.1kHz for the
mp4a (unprotected) stream was incorrect. As usual, the esds contained
the real values here which were mono at 22050 Hz.

Here's what the MP4 tree looks like for these types of files,
demonstrating why the code was making a wrong assumption (or maybe
YouTube is being unusual),

[ftyp] size=8+16
...
[moov] size=8+1571
...
  [trak] size=8+559
...
          [stsd] size=12+234
            entry-count = 2
            [enca] size=8+147
              channel_count = 2
              sample_size = 16
              sample_rate = 44100
              [esds] size=12+27
                ...
            ...
            [mp4a] size=8+67
              channel_count = 2
              sample_size = 16
              sample_rate = 44100
              [esds] size=12+27
                ...

In addition to fixing this, the checks for esds atoms in mp4a and mp4v
have been made symmetrical. While I haven't seen a test case for video
with the same problem, it seemed better to make the same checks. This
also fixes a crash reported from another user[2], they also noted the
asymmetry with mp4v and mp4a.

[1] https://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2018.html?test_type=encryptedmedia-test
[2] https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/398
2019-03-15 12:41:33 +00:00
Andreas Frisch
3160713abf flvmux: Fix scale of time values in warning message 2019-03-15 09:55:32 +00:00
Sebastian Dröge
a676c17259 rtspsrc: Don't remove udpsrc/sink from rtspsrc if they were not added to it
This can happen in various error cases that could happen between the
creation of the element in question and the adding to the rtspsrc.

It causes an ugly critical warning right now but is otherwise harmless.
2019-03-15 08:21:11 +00:00