Commit graph

18204 commits

Author SHA1 Message Date
Antonio Ospite a330012d6a test: rtpbin_buffer_list: move buffer list creation next to its validation
The tests create a buffer list and then use the chain_list callback to
verify that the correct packets have been pushed.

Move the creation and validation code next to each other so that the
reader can more easily understand what is going on.

While at it add some comments to introduce the two related functions.
2019-04-01 18:42:32 +00:00
Antonio Ospite af8698e656 test: rtpbin_buffer_list: set the chain_list function directly in the test
The helper function set_chain_function does not really do anything useful, remove it.
2019-04-01 18:42:32 +00:00
Antonio Ospite 5567066bff test: rtpbin_buffer_list: make check_packet more flexible
Make it possible to differentiate between the position in the list and
the packet index in the global structures in check_packet, in some
future case the list may change, in case some element removes a buffer
from the list, and the two indices may not coincide.
2019-04-01 18:42:32 +00:00
Antonio Ospite 5807d79a9d test: rtpbin_buffer_list: factor out a function to create packets buffers 2019-04-01 18:42:32 +00:00
Antonio Ospite 6ab13c19b6 test: rtpbin_buffer_list: check if the chain_list function has been called
Make the test more useful to verify that the chain list function has
actually been called.
2019-04-01 18:42:32 +00:00
Antonio Ospite 623d3b930e test: rtpbin_buffer_list: port to GStreamer 1.0
Port the rtpbin_buffer_list test to GStreamer 1.0 and re-enable it.

Some other changes include:
  - the check on the caps has been moved from the buffer level to the
    pad level;
  - remove underscore prefix from static functions names, this is not
    idiomatic in C and rarely used in the other tests;
  - the unused header_buffer variable has been removed;
  - check_group() has been renamed to check_packet() because in
    GStreamer 1.0 there is no concept of "group" anymore, the comments
    have also been updated to reflect this.
2019-04-01 18:42:32 +00:00
Tim-Philipp Müller abef4e4ea3 tests: jpegdec: bump discoverer timeout for valgrind
Tests might take a bit longer, esp. when run under valgrind
and/or they're running on the CI with other things going on,
so let's just bump the timeout to something higher and let
the test runner time us out if needed.
2019-04-01 18:20:53 +01:00
Nirbheek Chauhan f23724b8a6 meson: Only ensure that moc is available on Linux
On other OSes, it's not possible to have qmake or the qt5 pkg-config
files and not have moc, and `moc` will not be in `PATH`, so this only
causes problems.
2019-04-01 18:20:28 +05:30
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
Julian Bouzas 2ebdd70c21 flac: report latency in flacenc and flacdec
The FLAC specification states that the data is processed in blocks, regardless of the number of channels. Thus, The latency can be calculated using the blocksize and rate. For example a 1 second block sampled at 44.1KHz has a blocksize of 44100
2019-03-25 15:14:32 +01:00
Tim-Philipp Müller d682c74c1e examples: rtsp: fix compiler warning
"control reaches end of non-void function"
2019-03-22 23:37:09 +00: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
Philipp Zabel 16e5b32bc1 v4l2videoenc: set GstVideoCodecFrame sync point flag
The V4L2 elements already set the delta unit buffer flag when dequeueing
the buffer, but gst_video_encoder_finish_frame overwrites it from the
passed codec frame's sync point flag. Set the flag correctly.
2019-03-21 18:05:51 +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
Tim-Philipp Müller e8583cebe7 meson: add -Wno-unused also to C++ args when gst debug system is disabled
And check if argument is supported instead of just passing it blindly,
and make meson code slightly cleaner, centralising the argument setting
in one place.
2019-03-21 16:45:03 +00:00
Piotr Drąg a0474578a0 Update LINGUAS 2019-03-21 15:59:31 +00: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
Philippe Normand 75f26bc954 v4l2: Set Hardware classifier on encoders 2019-03-18 10:51:15 +00:00
Philippe Normand 3296a4b7e2 v4l2: Set Hardware classifier on video decoders 2019-03-18 10:51:07 +00:00
Philipp Zabel cdf15e9032 v4l2transform: don't segfault if flushed without pools
The v4l2output and v4l2capture v4l2objects can have pool == NULL if they
have been stopped before.
2019-03-17 13:17:21 +00: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
Antonio Ospite 2513edf229 test: imagefreeze: add test for the num-buffers property 2019-03-14 09:12:28 +01:00
Antonio Ospite 8c26e33f20 imagefreeze: add a num-buffers property
The imagefreeze element can be handy for benchmarking downstream
elements because it re-uses the same buffer memory and introduces less
overhead compared to always creating new frames with videotestsrc.

However it's not possible to make imagefreeze send EOS when using
gst-launch-1.0.

Add a num-buffers property to make it look more like a source in the
above scenario.
2019-03-14 09:12:28 +01:00
Guillaume Desmottes fcd568dd56 matroskamux: add support for new color primaries 2019-03-12 16:52:45 +01:00
Philipp Zabel 8b068fb78b v4l2sink: fix pool-less allocation query handling
This fixes a critical warning if the last-sample property is enabled:

  (gst-launch-1.0:391): GStreamer-CRITICAL **: 01:12:57.428: gst_object_unref: assertion 'object != NULL' failed

If the allocation query does not contain any allocation pools,
gst_query_parse_nth_allocation_pool will leave the local pool,
min, and max variables undefined, so check the array length first.
If pool is NULL, do not call gst_object_unref.
2019-03-08 22:01:14 +01:00
Seungha Yang 3f9170bd02 meson: Build v4l2 example only if v4l2 plugin was built
Otherwise v4l2 example will be built with MSVC
2019-03-08 11:06:32 +09:00
Antonio Ospite 2dfe228740 docs: fix typos s/recieve/receive/ 2019-03-07 12:41:40 +01:00
Antonio Ospite 30db93e3a4 rtpsource: fix documentation of rtp_source_send_rtp parameters
In commit 28e5f9098 (rtpbin: use PacketInfo for the sender, 2013-09-13)
the rtp_source_send_rtp signature changed but the documentation was not
adjusted to match the new one.

Update the documentation to match the function signature.
2019-03-07 12:41:40 +01:00
Antonio Ospite 38285e5bcf rtpsession: fix typo in a comment, s/SESSION_LOCK/RTP_SESSION_LOCK/
Fix a typo in a comment, mainly to avoid confusing autocompletion in
text editors.
2019-03-07 12:41:40 +01:00
Antonio Ospite 43e4226844 rtpsession: fix typos and update parameters names in comments
Some functions now accept a generic 'gpointer data' parameter because
they can work either on a single buffer or a buffer list.

However the comments were still referring to the old 'GstBuffer *buffer'
parameter, so update the comments to match the actual functions
signature.
2019-03-07 12:41:40 +01:00
Antonio Ospite b2b60c4d8f rtpstats: fix some fields names in the RTPSourceStats documentation
Fix documentation of RTPSourceStats to use the actual fields names.
2019-03-07 10:36:11 +01:00
Mathieu Duponchelle 0da8f111e6 rtpulpfdecdec: only put recovered packet back into storage if not recovered from there 2019-03-06 19:40:10 +00:00
Mathieu Duponchelle f9b49aef09 rtpulpfecdec: fix buffer leak when packet is recovered from storage
Exposed by rtpulpfecdec_recovered_from_storage test.
2019-03-06 19:40:10 +00:00
Tim-Philipp Müller a2d01b3a8b tests: rtpulpfec: fix buffer leak in unit test
This freed wrapped memory instead of the GstMemory or buffer.
2019-03-06 19:40:10 +00:00
Tim-Philipp Müller c79cf179cc rtph264depay: fix caps leak
Exposed by rtp_h264depay_bytestream() unit test.
2019-03-06 18:21:20 +00:00
Tim-Philipp Müller 081da67444 tests: rtpjitterbuffer: fix leaks in new test_push_eos() test 2019-03-06 17:28:57 +00:00
Tim-Philipp Müller 55d43dbbde tests: states: blacklist gtk sinks for state change test
gtk_init() throws GLib-GIO-WARNING **: unknown schema extension 'd'
unrelated to our test environment.
2019-03-06 17:27:32 +00:00