Commit graph

1498 commits

Author SHA1 Message Date
Stian Selnes eadeec791a rtpbasedepayload: Drop gap events before first buffer
Before a gap event is pushed downstream a segment event must be pushed
since the gap event can cause packet concealment downstream and hence
data flow. Since concealment before receiving any data packets usually
doesn't make any sense, the gap event is not sent downstream.

Alternatively one could generate a default caps and segment event, but
no need to complicate things until it's proven necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773104
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/301
2019-03-20 15:30:50 +00:00
Tim-Philipp Müller eed2e9d52b tests: audiodecoder: speed up audiodecoder_buffer_after_segment test
We're creating buffers with one sample here for some reason. The
actual value of the segment stop is irrelevant for what we're testing
here, so lower it to 10ms so that we create fewer buffers which speeds
things up on slow machines and in valgrind.
2019-03-09 17:17:11 +00:00
Matthew Waters d5b18ae58f tests/glbin: setting a full reference means we need to unref
Fixes the element leaks in the full variants of the glbin test.
2019-03-06 23:32:18 +11:00
Tim-Philipp Müller 273da3ed2f tests: vorbisec: fix leaks in unit test 2019-03-06 10:51:40 +00:00
Tim-Philipp Müller 9f664f62ee tests: glmatrix: fix leaks in unit test 2019-03-06 10:51:40 +00:00
Tim-Philipp Müller afe5ed8ad7 tests: glmemory: fix leaks in unit test 2019-03-06 10:51:40 +00:00
Tim-Philipp Müller 82dc6a4858 tests: videoencoder: fix leaks in unit test 2019-03-06 10:51:40 +00:00
Tim-Philipp Müller 3221167750 tests: audio: fix leaks in unit test 2019-03-06 10:51:40 +00:00
Tim-Philipp Müller 6f6c73b223 tests: audiomixer: fix leaks in unit test 2019-03-06 10:51:40 +00:00
Tim-Philipp Müller 9854d5151a tests: audioconvert: fix leaks in unit test 2019-03-06 10:51:40 +00:00
Seungha Yang 541d598fad tests: audiorate: Don't compare string with enum
../subprojects/gst-plugins-base/tests/check/elements/audiorate.c(192): warning C4047

Meaningful validation at that point seems to checking output GstAudioFormat
of gst_audio_format_from_string()
2019-03-04 22:49:23 +09:00
Vivia Nikolaidou 8ecc3b9730 videorate: Add max-duplication-time property
This will only duplicate buffers if the gap between two consecutive
buffers is up to fill-until nsec. If it's larger, it will only output
the new buffer and mark it as discont.
2019-02-21 15:50:55 +00:00
Tim-Philipp Müller a1d757b1ee tests: video: add basic sanity check of pstrides for formats
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/117
2019-02-20 09:49:26 +00:00
Victor Toso 1012e3d89c tests: use GPOINTER_TO_INT to avoid warnings with mingw
New casts to avoid the the warnings mentioned below. While at it, move
some existing casts (introduced at 61bc909189) to use
GPOINTER_TO_INT too.

[458/673] Compiling C object 'tests/check/7d01337@@libs_video@exe/libs_video.c.obj'.
../tests/check/libs/video.c: In function 'fourcc_get_size':
../tests/check/libs/video.c:160:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   return (unsigned long) p->endptr;
          ^

In file included from ../tests/check/libs/video.c:32:
../tests/check/libs/video.c: In function 'test_video_formats':
../tests/check/libs/video.c:563:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   fail_unless_equals_int (size, (unsigned long) paintinfo.endptr);
   ^

And more.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/94
2019-02-19 18:23:25 +00:00
Victor Toso c7fe0ed637 tests: fix compiler warnings on Windows with mingw
With commit 3f184c3abc, the gst_dir variable becomes unusable in
windows build. Moving it to linux scope to avoid warning:

    [433/673] Compiling C object 'tests/check/7d01337@@libs_profile@exe/libs_profile.c.obj'.
    ../tests/check/libs/profile.c: In function 'profile_suite':
    ../tests/check/libs/profile.c:688:10: warning: unused variable 'gst_dir' [-Wunused-variable]
       gchar *gst_dir;
             ^~~~~~~

Also fix a typo in the comment.
2019-02-19 09:54:52 +00:00
Nicolas Dufresne fcaf938e8c tests: video: Test video format enum stability
It is really easy to break the API and insert a new video format in the
middle of the enum instead of at the end. This minimal test should catch
the most obvious errors. Ideally, this test should be updated after new
format have been added, so that it won't allow further modification to
the enumeration API.
2019-02-18 13:25:23 +00:00
Nirbheek Chauhan 91863b071f misc: Fix compiler warnings on Cerbero's MinGW
rtpbasedepayload.c:126:5: error: unknown conversion type character 'z' in format [-Werror=format]
profile.c:688:10: error: unused variable 'gst_dir' [-Werror=unused-variable]
2019-02-05 23:48:13 +05:30
Nirbheek Chauhan 2b8e09b49f meson: orc-test is not required
This is especially never available on iOS.
2019-01-31 15:22:21 +05:30
Seungha Yang 57aba8952d meson: Add support orc fallback
Allow fallback to orc subproject if any.
Additionally 'dependencies' keyword is removed from find_library,
because it's invalid keyword for find_library.
2019-01-30 19:41:32 +09:00
Seungha Yang 34813b94bd tests: discoverer: Add async API test cases
Add more test cases for async APIs such as gst_discoverer_{start,stop},
and gst_discoverer_discover_uri_async()
2019-01-28 18:53:39 +09:00
Sebastian Dröge acc098a736 gl: Only unbind buffers/vertex attrib arrays if we can't directly bind the vertex array to 0
Binding the vertex array to 0 will unbind everything else already.

In the previous order older versions of the Intel GL driver caused
errors to be printed for every single call when disabling the vertex
attrib arrays after binding the vertex array to 0.
2019-01-16 14:09:18 +02:00
Tim-Philipp Müller 30b5d7892a meson: enable tests for orc code 2019-01-16 00:37:48 +00:00
Jordan Petridis 5396ef6e45 subparse: do not assert when failing to parse subrip timestamp
If a badly formatted was passed into `parse_subrip_time` it would
assert instead of exiting gracefully. This is problematic since
the input is provided by the user, and will trigger a crash.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/532
2019-01-14 11:43:57 +00:00
Jan Alexander Steffens (heftig) 4d24f78c05 videoscale: Add a test to verify stepped dimensions work 2019-01-14 10:18:21 +00:00
Alex Ashley 5767d65321 codec-utils: support extension audio object type and sample rate
ISO 14496-3 defines that audioObjectType 5 is a special case that
indicates SBR is present and that an additional field has to be
parsed to find the true audioObjectType.

There are two ways of signaling SBR within an AAC stream - implicit
and explicit (see [1] section 4.2). When explicit signaling is used,
the presence of SBR data is signaled by means of the SBR
audioObjectType in the AudioSpecificConfig data.

Normally the sample rate is specified by an index into a
table of common sample rates. However index 0x0f is a special case
that indicates that the next 24 bits contain the real sample rate.

[1] https://www.telosalliance.com/support/A-closer-look-into-MPEG-4-High-Efficiency-AAC

Fixes #39
2019-01-11 17:41:15 +05:30
Seungha Yang a95ab79d34 tests: Enable more tests on Windows
Enable libs_rtp, libs_video and elements_compositor
2018-12-30 23:25:14 +00:00
Seungha Yang f5c4826ea4 tests: compositor: Drop needless unistd.h 2018-12-30 23:25:14 +00:00
Tim-Philipp Müller 2972b673c0 compositor: add to build after move from -bad
This replaces videomixer.

Fixes #138
2018-12-28 12:16:18 +01:00
Tim-Philipp Müller f11571f398 Move GstVideoAggregator, compositor and OpenGL mixers from -bad
Merge branch 'videoaggregator-compositor-glmixers-move'

Fixes #137 and #138.
2018-12-28 12:15:39 +01:00
Sebastian Dröge acd7010576 videotimecode: Set the DROP_FRAME flag when parsing timecodes with a ,/; from a string
And also add a test for parsing a few valid and invalid timecodes
2018-12-19 23:11:24 +00:00
Sebastian Dröge c02d3b03c2 videotimecode: Add API for initializing from a GDateTime with validation
The old API would only assert or return an invalid timecode, the new API
returns a boolean or NULL. We can't change the existing API
unfortunately but can at least deprecate it.
2018-12-19 23:11:24 +00:00
Seungha Yang 362f771fe8 tests: Disable some tests for Windows
Disable some tests which are unstable on windows or need fix
2018-12-18 10:34:01 +00:00
Seungha Yang 548b72d693 tests: Use OS-specific seperator for whitelist
... instead of hardcoded ':', since G_SEARCHPATH_SEPARATOR_S
varies depending on OS (e.g., ':' for *nix and ';' for Windows).
Note that, when the seperator is not specified explicitly, Meson
will use ';' for Windows and ':' for *nix respectively.
2018-12-18 10:34:01 +00:00
Seungha Yang 076d023508 meson: Use join_paths() instead of '/'
Let Meson decide correct seperator such as '\' for Windows and
'/' for others
2018-12-18 10:34:01 +00:00
Justin Kim 5303e2c32b rtcpbuffer: add support XR packet parsing
According to RFC3611, the extended report blocks in XR packet can
have variable length. To visit each block, the iterator should look
into block header. Once XR type is extracted, users can parse the
detailed information by given functions.

Loss/Duplicate RLE
The Loss RLE and the Duplicate RLE have same format so
they can share parsers. For unit test, randomly generated
pseudo packet is used.

Packet Receipt Times
The packet receipt times report block has a list of receipt
times which are in [begin_seq, end_seq).

Receiver Reference Time paser for XR packet
The receiver reference time has ntptime which is 64 bit type.

DLRR
The DLRR report block consists of sub-blocks which has ssrc, last RR,
and delay since last RR. The number of sub-blocks should be calculated
from block length.

Statistics Summary
The Statistics Summary report block provides fixed length
information.

VoIP Metrics
VoIP Metrics consists of several metrics even though they are in
a report block. Data retrieving functions are added per metrics.

https://bugzilla.gnome.org/show_bug.cgi?id=789822
2018-12-13 14:01:06 -05:00
Sebastian Dröge 70d8c174ac video: Split the success and error convert_frame_async() test into two tests
To make it more obvious which of the two is actually failing.
2018-11-30 12:39:43 +02:00
Jordan Petridis 2229d53f60
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:51:53 +02:00
Sebastian Dröge 71427eb0f4 video-anc: Add test for VBI encoder 2018-11-12 14:09:28 +00:00
Sebastian Dröge 932e9f5eee video-anc: Add support for parsing composite ADF and check the packets' checksum
And add the checksum to the data we test in the unit test.
2018-11-12 13:14:57 +00:00
Matthew Waters 5a53e89c1a tests/urisourcebin: add get/set watermark test
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:10:05 +00:00
Matthew Waters af166b5b22 urisourcebin: add a statistics property for queueing
It contains the minimum/maximum/average byte and time levels of the
queues inside this urisourcebin

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:10:05 +00:00
Sebastian Dröge a1c14959d6 video-anc: Add unit tests for VBI parsing
https://bugzilla.gnome.org/show_bug.cgi?id=797363
2018-11-01 19:30:41 +02:00
Nicolas Dufresne c2ec68f0c7 glupload-test: Don't use gboolean to store enums
The unit test makes mixed usage of ret value. Sometimes its does
stores an enum and at other moment a boolean. Also fix test
using boolean instead of the correct enum value.

https://bugzilla.gnome.org/show_bug.cgi?id=783521
2018-11-01 06:22:28 -04:00
Sebastian Dröge 088b4c0c52 overlaycomposition: New element that allows applications to draw GstVideoOverlayComposition on a stream
https://bugzilla.gnome.org/show_bug.cgi?id=797234
2018-10-28 17:03:47 +00:00
Edward Hervey 33e92afd91 tests: Solidify tcp connection check
The previous failure was a timeout which was due to the sending pipeline
pushing test buffer *before* the remote client was accepted. We would
therefore never get the buffer on the other side.

While the client socket would indeed appear as "connected", this doesn't
mean that the remote server side did "accept" it (which is where we then
add it to the list of remote parties to which data will be sent).

The problem isn't with the element implementation, but to the nature of
TCP 3-way handshake.

In order to make the test reliable, wait for the sink to have accepted
the remote client (by checking the number of handles) before sending out
test buffers.
2018-10-27 15:48:13 +02:00
Stian Selnes f766b85b96 rtpbasepayload: rtpbasedepayload: Add source-info property
Add a source-info property that will read/write meta to the buffers
about RTP source information. The GstRTPSourceMeta can be used to
transport information about the origin of a buffer, e.g. the sources
that is included in a mixed audio buffer.

A new function gst_rtp_base_payload_allocate_output_buffer() is added
for payloaders to use to allocate the output RTP buffer with the correct
number of CSRCs according to the meta and fill it.

RTPSourceMeta does not make sense on RTP buffers since the information
is in the RTP header. So the payloader will strip the meta from the
output buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=761947
2018-10-10 14:38:01 -04:00
George Kiagiadakis a85a59e4a8 tests: audioconvert: test caps fixate with layout conversion
https://bugzilla.gnome.org/show_bug.cgi?id=797225
2018-10-05 15:40:13 +03:00
Zeeshan Ali 0c034f3894 test: Ensure gst_video_info_set_format() calls succeed
https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Zeeshan Ali 0fbe4634a6 video: Add gst_video_info_set_interlaced_format()
Add a helper to set the interlacing mode while creating the GstVideoInfo
in addition to format and resolution. Using this helper will ensure that
size is correctly calculated for split-field interlacing mode.

https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Zeeshan Ali bd9c7b36d8 video: Add GST_VIDEO_INTERLACE_MODE_ALTERNATE
Add a new interlace mode enum to represent buffers containing a single
field of an interlaced video in a buffer. The name is based on the
equivalent video format in the V4L2 API, V4L2_FIELD_ALTERNATE:

https://01.org/linuxgraphics/gfx-docs/drm/media/uapi/v4l/field-order.html

Since caps fields are optional, we also introduce a new caps feature,
"format:Interlaced" that always goes with "alternate" interlace mode to ensure
that caps for this incompatible format are incompatible with other interlaced
and progressive video caps.

https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00