Commit graph

1473 commits

Author SHA1 Message Date
Stefan Sauer
db8482baaf tests: audiomixer: use the buffer helper for other tests too 2017-07-15 19:34:15 +02:00
Stefan Sauer
2ae763cc34 audiomixer: add a helper for buffer creation
This makes the test setup easier to read.
2017-07-14 08:09:25 +02:00
Stefan Sauer
14a9ba2fa4 audiomixer: use test helper once more 2017-07-13 22:02:17 +02:00
Stefan Sauer
6d53284450 audiomixer: more test cleanups
Port over the test helpers from the adder tests.
2017-07-10 21:08:09 +02:00
Stefan Sauer
8133f478a9 adder: sync some fixes from the audiomixer test 2017-07-10 21:07:45 +02:00
Stefan Sauer
ecf38a3ade audiomixer: refactor test
Apply cleanups from the adder tests. Use a fixture for common code.
2017-07-10 20:16:56 +02:00
Nicolas Dufresne
b39f5067e3 test-appsrc: Test state when blocked in caps Event
In GStreamer 1.12 and older, the GstBaseSrc live lock used to be held while
create() virtual function was called. As appsrc pushes serialized event in
that virtual function, we ended up with some deadlock while setting the
state to NULL. This test simulates this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=783301
2017-07-03 21:12:03 -04:00
Mark Nauwelaerts
20705f01fc textoverlay: ensure text buffer has writable metadata when modifying 2017-07-01 17:45:36 +02:00
Thibault Saunier
8bbdad7c31 meson: Do not use path separator in test names
Avoiding warnings like:

  "WARNING: Target "elements/audioamplify" has a path separator in its name."
2017-06-07 12:07:15 -04:00
Olivier Crête
7108cd2fc8 tests: Make audiomixer test_clip verify the resulting timestamps too 2017-05-23 12:35:58 +02:00
Olivier Crête
e537f3576a tests: audiointerleave: Remove drain with manual clock
Now that the queries go onto the queue, you may need to pull the crank
in order for them to be processed, making this test difficult.
2017-05-23 12:35:58 +02:00
Tim-Philipp Müller
df160d1989 meson: only check for c++ compiler once 2017-05-21 10:49:20 +01:00
Tim-Philipp Müller
74d974817f meson: make C++ compiler optional
It's only used to check our headers are C++ clean and
for the Qt example.
2017-05-21 09:37:14 +01:00
Matthew Waters
57673e608e aggregator: add simple support for caps handling
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-05-20 16:21:17 +02:00
Olivier Crête
cbafb022aa tests: Test caps using query
Sending an event can accepted event if the caps were rejected
because the event could be queued and processed later.

Also send a drain query in the caps test to make sure that the
event has been processed.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Jan Schmidt
3b3bc34e9a Fix unit test for videodecoder now outputting mono multiview by default 2017-05-19 18:38:45 +02:00
Tim-Philipp Müller
4246198fb3 No need for newlines in debug log statements 2017-04-12 09:58:49 +01:00
Matthew Waters
0dcab96d88 sdp/media: caps_from_media() don't modify the input media
Performing a gst_sdp_media_get_caps_from_media() would result in
changing fields in the GstSDPMedia violating the const tag in the
function declaration.

Before there would be a line with a=rtpmap:96 VP8/90000
after, that attribute would only contain a=rtpmap:96

Fix by performing modifications on duplicated strings instead of on
the internal values.

Also add a simple test for checking that the representation doesn't
change by a gst_sdp_media_get_caps_from_media()
2017-04-03 16:49:12 +10:00
Thibault Saunier
69a10f67a5 meson: Use get_pkgconfig_variable instead of calling pkg-config ourself
It is avalaible in meson 0.36 which is now are requirement
2017-03-28 14:33:04 -03:00
Thibault Saunier
20dd51b92c meson: Fix build failure from previous commit
Mistake while rebasing
2017-03-24 18:55:10 -03:00
Thibault Saunier
21d3a820e2 meson: Specify pluginsdir setting the environment
And do not specify the separator as this is OS
dependent and will be handled properly by default
2017-03-24 18:48:07 -03:00
Nicolas Dufresne
73c70847ad meson: Reuse plugins_install_dir for building env 2017-03-24 17:00:23 -04:00
Nicolas Dufresne
3d9b04c8cc meson: Fix plugin path when running test
The path was only adding the build root. We need to also add the
prefix for the case we work with installed setup. As the search is
recursive, I had to remove any subdirectory to the already present build
root.
2017-03-24 16:16:26 -04:00
Nicolas Dufresne
d81a6da702 rawvideoparse: Rename frame-stride in to frame-size
The term stride is confusing here, since the stride is always use
to signal the pixel row size of an image (including padding). Also
a frame may have a single stride, which adds to the confusion. This
patch uses frame-size, which simply indicate the frame size in the
case the images have some padding in between.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Nicolas Dufresne
2b4a173e89 rawvideoparse: Use GstValueArray for strides and offsets
This allow using those property through gst-launch-1.0. This type
gained a deserilizer recently. The syntax is: <val1, val2, ...>.
Note that we also use the type int instead of uint to avoid having
to cast when specifying the values. The deserilizers assume
int by default.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Stefan Sauer
d759eb46dc adder: cleanup the tests
Take a first stab at cleaning up the tests. Extract common code. Make sure
we actually verify things.
2017-03-17 21:40:56 +01:00
Sebastian Dröge
38ec8f396f rawparse: Move to gst-plugins-base
https://bugzilla.gnome.org/show_bug.cgi?id=774544
2017-02-25 14:48:40 +02:00
Sebastian Dröge
498ee680fe Merge branch 'rawparse-moved-plugin' 2017-02-25 14:32:33 +02:00
Georg Lippitsch
d15ad75caf videotimecode: Validate for drop-frame correctness
In gst_video_time_code_is_valid, also check for invalid
ranges when using drop-frame TC. Refactor some code which
broke after the check was added.

https://bugzilla.gnome.org/show_bug.cgi?id=779010
2017-02-23 19:56:26 +02:00
Georg Lippitsch
b3df5786a9 videotimecode: Init from GDateTime
Add a function to init the time code from a GDateTime

https://bugzilla.gnome.org/show_bug.cgi?id=778702
2017-02-23 19:50:39 +02:00
Sebastian Dröge
4cde35553f rawbaseparse: Drop incomplete frames at EOS
See https://bugzilla.gnome.org/show_bug.cgi?id=773666

This would ideally be solved in baseparse but that requires further
thought at this point, and in the meantime it would be good to have
rawbaseparse not assert on this but handle it gracefully instead.
2017-02-18 20:18:50 +02:00
Sebastian Dröge
5e2e111627 multifdsink: Make sure to use a 64 bit integer for the units-max property 2017-02-02 14:56:39 +02:00
Guillaume Desmottes
b8c78c87d2 encodebin: fix caps leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=776797
2017-01-30 14:17:42 +02:00
Thibault Saunier
091717d6ca meson: Properly use ':' for defining keywords 2017-01-24 19:25:58 -03:00
Tim-Philipp Müller
d6c0e9072b videorate: fix duration and position query handling
Duration query would return TRUE and duration=-1. This
worked in the unit test because the unit test implementation
was a bit broken.

Both queries need to access rate with a lock.

Fix broken duration query test as well. It relied on broken
behaviour by the videorate query handler, and also it was
implemented as a downstream query rather than an upstream
query. And we must return HANDLED from the probe so that the
query we intercept actually returns TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=699077
2017-01-24 01:04:39 +00:00
Vivia Nikolaidou
eefa0d8cf5 videotimecode: Added unit test for GstVideoTimeCodeInterval
https://bugzilla.gnome.org/show_bug.cgi?id=776447
2017-01-11 11:05:21 +11:00
Tim-Philipp Müller
927e657640 tests: audiodecoder: fix another c99-ism
Missed one.
2017-01-09 19:10:10 +00:00
Tim-Philipp Müller
bbed5a5ffc Fix indentation 2017-01-09 19:02:57 +00:00
Tim-Philipp Müller
57e1e5921e tests: audiodecoder: fix compiler warnings due to c99-ism
audiodecoder.c:160:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
2017-01-09 18:58:42 +00:00
Vivia Nikolaidou
5cbb52285c videotimecode: Add GstValue functions unit test
https://bugzilla.gnome.org/show_bug.cgi?id=772764
2017-01-09 18:56:16 +02:00
Jan Schmidt
68565ec0fc testsuite: Add some test checks for gst_video_guess_framerate() 2017-01-09 21:31:37 +11:00
Tim-Philipp Müller
4a8640b4c9 tests: tag: add unit test for ID3v2 UTF-16 string list parsing
https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:52:45 +00:00
Tim-Philipp Müller
fae81e57c7 tests: tag: add test for ID3v2 extended header parsing
https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:52:45 +00:00
Thibault Saunier
03e263b92f tests: Fix build 2016-12-19 15:20:35 -03:00
Thibault Saunier
c8ea302e57 encodebin: Fallback to other profile if we fail with one
In some case we might have EncodingProfile that will be defined
in a way that, for example if a Preset is not present, another
profile for that stream should be used.

A test is added showing the feature.

https://bugzilla.gnome.org/show_bug.cgi?id=776188
2016-12-19 10:13:23 -03:00
Tim-Philipp Müller
e0742b8759 rtsp: add boxed types for new authentication credential API
To make the structs usable in bindings, and fix

gstrtspmessage.c:1188: Warning: GstRtsp:
gst_rtsp_message_parse_auth_credentials: return value: Invalid
non-constant return of bare structure or union; register as
boxed type or (skip)

https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-12-13 22:45:02 +00:00
Sebastian Dröge
a9269d37c5 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:39:01 +02:00
Sebastian Dröge
9795115564 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:26:08 +02:00
Jan Alexander Steffens (heftig)
9bdf7ff6d0 multifdsink: Add a test involving a slow client
https://bugzilla.gnome.org/show_bug.cgi?id=774908
2016-11-29 19:13:00 +02:00
Edward Hervey
647b183adb check/videorate: Avoid leaking extra buffers 2016-11-28 16:54:55 +01:00
Sebastian Dröge
47fdb15074 video-info: Add unit test for overflow checks
And also prevent overflows caused by allowing uint width/height in
gst_video_info_set_format() but storing them as (signed!) ints.
2016-11-24 15:40:22 +02:00
Sebastian Dröge
90b24d34b3 rtsp: Add gst_rtsp_message_parse_auth_credentials() to parse authentication credentials
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-21 09:39:21 +02:00
Sebastian Dröge
2c87618bf3 videotimecode: Add test for the calculations of distance from the daily jam
https://bugzilla.gnome.org/show_bug.cgi?id=774585
2016-11-17 10:17:01 +02:00
Patricia Muscalu
f1562053fe appsink: add support for buffer lists
https://bugzilla.gnome.org/show_bug.cgi?id=752363
2016-11-16 02:06:40 +11:00
Joris Valette
658ee6f0db videorate: Add fixed rate property
https://bugzilla.gnome.org/show_bug.cgi?id=699077
2016-11-04 14:01:54 -03:00
Sebastian Dröge
af4de9cb42 gst: Fix more mentions of interlaced-mode to say interlace-mode 2016-11-04 16:26:50 +02:00
Edward Hervey
3cc9b2c490 check: Fix corrupted xml check files
By making sure each different videoscale check instance gets logged
into different output file
2016-11-03 17:18:05 +01:00
Sebastian Dröge
33f4b9cc8e Revert "tests: rawvideoparse: add test for flow error handling"
This reverts commit 280b4ac2ff.

https://bugzilla.gnome.org/show_bug.cgi?id=773666
2016-11-02 09:36:04 +02:00
Tim-Philipp Müller
f324c88d92 tests: rawvideoparse: add test for flow error handling
Also needs fixes in baseparse:
https://bugzilla.gnome.org/show_bug.cgi?id=773666
2016-11-01 20:34:37 +02:00
Stian Selnes
22ccb687fa videotestsrc: Make snow deterministic
Deterministic generation of snow and smpte is important for tests so
that it's not affected by other videotestsrc elements in current or
possibly previous tests.

https://bugzilla.gnome.org/show_bug.cgi?id=773102
2016-11-01 20:05:18 +02:00
Tomasz Zajac
028b16bb67 sdp: Add tests for rtcp-fb parsing
https://bugzilla.gnome.org/show_bug.cgi?id=769698
2016-11-01 19:57:10 +02:00
Nicolas Dufresne
7a40442ad5 video: Add VYUY pixel format
This format is sometimes the output of JPEG decoders. It is the same as
YUY2 and UYVY but with a different component order.

https://bugzilla.gnome.org/show_bug.cgi?id=767450
2016-11-01 19:55:20 +02:00
Nirbheek Chauhan
2d3af07c3d Revert "meson: move gstreamer-check-1.0 dependency to tests/check"
This reverts commit e3c7c17b9b.

Does not actually work. See:
https://bugzilla.gnome.org/show_bug.cgi?id=773114#c31
2016-10-25 11:46:38 +05:30
Tim-Philipp Müller
9ccd144421 meson: fix build outside of gst-all
Unknown variable "apiversion".
2016-10-24 00:28:27 +01:00
Scott D Phillips
e3c7c17b9b meson: move gstreamer-check-1.0 dependency to tests/check 2016-10-21 05:36:12 -03:00
Stian Selnes
92392a4733 videodecoder: Default caps sets format I420
Also the format must be fixed on the default raw caps. If not
gst_video_info_from_caps() will fail and
gst_video_decoder_negotiate_default_caps() return FALSE.

The test simulates the use case where a gap event is received before
the first buffer causing the decoder to fall back to the default caps.

https://bugzilla.gnome.org/show_bug.cgi?id=773103
2016-10-20 14:11:48 +03:00
Stefan Sauer
45ae36817b tests: add another check for buffer clipping and improve tests
Add a test that check that we handle time ranges (a range of time that maps to
the same sample).
Also update the other tests to use our check api to compare int64 values to get
better output on failure.
2016-10-15 22:52:32 +02:00
Stefan Sauer
dc92affdf3 tests: clipping in TIME does not use the offset
Simplify the test and test only what need to be tested.
2016-10-15 22:52:32 +02:00
Stefan Sauer
f625444b28 tests: cleanup libs/audio test
Split large tests into small tests and name them specifically. Use helpers to
avoid repetition. Make sure the order in the file is the same as we add the to
the suite.
2016-10-15 21:32:33 +02:00
Thibault Saunier
558172d418 meson: Make use of new environment object and set plugin path to builddir
Workaround source_root being the root directory of all projects
in the subproject case.
Remove now unneeded getpluginsdir and define c++ tests in the same loop.

Bump meson requirement to 0.35
2016-10-14 17:37:16 +02:00
Jimmy Ohn
6335a074e2 opusdec: Fix memory leak in test code
gst_caps_to_string function returned allocated memory.
So, It should be free using g_free function.

https://bugzilla.gnome.org/show_bug.cgi?id=772500
2016-10-06 13:29:22 +03:00
Jimmy Ohn
fdefa9c1ad videorate: Fix memory leakage in test code
gst_caps_to_string function returned allocated memory.
So, It should be free using g_free function.

https://bugzilla.gnome.org/show_bug.cgi?id=772501
2016-10-06 13:27:42 +03:00
Thibault Saunier
d00aa0c1ad meson: Setup pre commit hook and fix getpluginsdir for standalone case 2016-09-30 12:46:34 -03:00
Tim-Philipp Müller
fb22d542d6 tests: playbin-complex test needs oggdemux 2016-09-25 22:20:32 +01:00
Tim-Philipp Müller
d9da603db6 tests: videotimecode: fix floating point comparisons
Comparing floats for equality is not necessarily going to
work reliably, so use fail_unless_equals_float() for this.
Test would fail on x86 (Intel Atom x5-Z8300).
2016-09-25 22:20:27 +01:00
Tim-Philipp Müller
7c0ec13942 tests: adder: disable racy flush_start_flush_stop test
It's been broken for years, and it's unlikely it will ever
be fixed for collectpads/adder now that there's audiomixer
which works fine. So let's disable it, since all it does
is that it creates noise that distracts from other failures.

https://bugzilla.gnome.org/show_bug.cgi?id=708891
2016-09-25 16:22:47 +01:00
Tim-Philipp Müller
3baa1d655c tests: videoscale: split test into multiple ones
The videoscale test takes eternities to run, that's not
great. Split the test into multiple ones. That way they
can be run in parallel. Reduces time to run all tests in
-base from 29 secs to 12 secs when using meson/ninja.
2016-09-10 10:10:05 +01:00
Thibault Saunier
81ccca7538 meson: Raise test timeout to 3 minutes
The videoscale testsuite (with 50 tests) last almost 2 minutes here
2016-09-09 08:57:11 -03:00
Nicolas Dufresne
afaa3f1380 video/test: Coding style fix 2016-09-07 14:24:54 -04:00
Thibault Saunier
acd047db15 meson: Properly find where GStreamer plugins are when using subprojects
And fix building with meson 0.34
2016-09-05 18:20:35 -03:00
Josep Torra
f70aa5b033 build: silence error about pthread for 'make check' in osx
Fixes "clang: error: argument unused during compilation: '-pthread'"
2016-08-26 21:01:40 +02:00
Xabier Rodriguez Calvar
0341f04ce1 videodirection: interface for rotation and flip
A GstVideoOrientationMethod enumeration is also provided for the
admitted property values.

https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-08-25 10:19:13 +03:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Tim-Philipp Müller
9cbdaa8c27 tests: ignore new videotimecode test binary 2016-08-20 11:01:04 +01:00
Carlos Rafael Giani
232902369c rawparse: Fix and extend unit tests
* Add caps change test to unit tests
* Cleanup leftover buffers after each unit test
* Add missing rawvideoparse entry in .gitignore

https://bugzilla.gnome.org/show_bug.cgi?id=769637
2016-08-18 10:53:58 +03:00
Carlos Rafael Giani
e5b70d384c rawvideoparse: Compute plane offsets & strides if no custom ones are set
This is useful to ensure that the offsets and strides are computed if
only width, height, format etc. in the property config are set.

https://bugzilla.gnome.org/show_bug.cgi?id=769797
2016-08-18 09:21:16 +03:00
Vivia Nikolaidou
ab35d7394e videotimecode: Added support for SMPTE time code metadata
Can be attached as GstMeta into a video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 18:59:40 +03:00
Carlos Rafael Giani
d508525119 rawparse: Add new raw audio and video parser elements
The new rawaudioparse and rawvideoparse elements are based on GstBaseParse
and completely replace audioparse and videoparse

https://bugzilla.gnome.org/show_bug.cgi?id=767011
2016-07-26 13:44:39 +03:00
Tim-Philipp Müller
5044bf79ae Add more files to .gitignore 2016-07-23 14:42:30 +01:00
Tim-Philipp Müller
ffa9f04bb2 tests: appsink: add minimal test for new pull with timeout functions
https://bugzilla.gnome.org/show_bug.cgi?id=768852
2016-07-18 17:26:26 +01:00
Guillaume Desmottes
8d6d6bd2aa tests: fix bus leak
gst_bus_remove_signal_watch() has to be called to release the ref
taken by gst_bus_add_signal_watch().

https://bugzilla.gnome.org/show_bug.cgi?id=768843
2016-07-18 12:41:12 +01:00
Guillaume Desmottes
54e4551cd8 videoscale: fix bus leak in test
gst_bus_add_signal_watch() takes a ref on the bus which should be
released using gst_bus_remove_signal_watch().

https://bugzilla.gnome.org/show_bug.cgi?id=768718
2016-07-12 13:12:19 +03:00
Seungha Yang
50f74daa2f appsrc: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=768510
2016-07-11 09:54:11 +03:00
Tim-Philipp Müller
d3d2e8b94a tests: discoverer: handle missing ogg/codec plugins gracefully
https://bugzilla.gnome.org/show_bug.cgi?id=767859
2016-06-21 18:04:23 +01:00
Guillaume Desmottes
f1f13de8d7 fix event leaks in tests
The events are supposed to be unreffed when finishing the test, not
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
8b0c9e9918 fix event leaks in tests
The events are supposed to be unreffed when finishing the test, not
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
ce53b64800 audiointerleave: fix message leaks by flushing the bus
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Sebastian Dröge
26f63db498 discoverer: Only allow serializing OK discoverer infos to GVariants
They will be incomplete otherwise and we can't generate the full serialized
information, and instead will crash somewhere on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=767859
2016-06-21 10:24:15 +03:00
Mikhail Fludkov
27e7ca3389 opusdec: test for PLC timestamp when FEC is enabled. 2016-06-16 11:01:06 +01:00
Mikhail Fludkov
8d4f79b640 audiodecoder: fix invalid timestamps when PLC and delay
Elements inherited from GstAudioDecoder, supporting PLC and introducing
delay produce invalid timestamps. Good example is opusdec with in-band FEC
enabled. After receiving GAP event it delays the audio concealment until
the next buffer arrives. The next buffer will have DISCONT flag set which
will make GstAudioDecoder to reset it's internal state, thus forgetting
the timestamp of GAP event. As a result the concealed audio will have the
timestamp of the next buffer (with DISCONT flag) but not the timestamp
from the event.
2016-06-16 11:01:04 +01:00
Paulo Neves
5dd720e064 exiftag: Increase serialized geo precision
The serialization of double typed geographical
coordinates to DMS system supported by the exif
standards was previously truncated without need.

The previous code truncated the seconds part of
the coordinate to a fraction with denominator
equal to 1 causing a bug on the deserialization
when the test for the coordinate to be serialized
was more precise.

This patch applies a 10E6 multiplier to the numerator
equal to the denominator of the rational number.

Eg. Latitude = 89.5688643 Serialization

DMS Old code = 89/1 deg, 34/1 min, 7/1 sec
DMS New code = 89/1 deg, 34/1 min, 79114800UL/10000000UL

Deserialization

DMS Old code = 89.5686111111
DMS New code = 89.5688643

The new test tries to serialize a higher precision
coordinate.

The types of the coordinates are also guint32 instead
of gint like previously. guint32 is the type of the
fraction components in the exif.

https://bugzilla.gnome.org/show_bug.cgi?id=767537
2016-06-13 09:29:52 +03:00
Stian Selnes
1335ccd228 video-color: Fix colorimetry IS_UNKNOWN
Fix issue with colorimetry default indicies not being in sync with the
actual table causing IS_UNKNOWN() to sometimes fail.

https://bugzilla.gnome.org/show_bug.cgi?id=767163
2016-06-02 17:14:50 +01:00
Joan Pau Beltran
abb88801e7 video: add IYU2 format
This existed in 0.10 and is needed by dc1394src.

IYU2 format is a YUV fully-sampled packed format similar to v308
but with different component order (U-Y-V instead of Y-U-V).

http://www.fourcc.org/yuv.php#IYU2

https://bugzilla.gnome.org/show_bug.cgi?id=763026#c5
2016-06-01 12:07:05 +01:00
Tim-Philipp Müller
ece702920f tests: playbin: add test for new "element-setup" signal
https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-05-16 09:52:35 +01:00
Tim-Philipp Müller
9ed483e33b tests: playsink: add minimal test for playsink element
Attempt to reproduce leak.

https://bugzilla.gnome.org/show_bug.cgi?id=755867
2016-05-14 16:02:16 +01:00
Guillaume Desmottes
1b2f9f2c3f vorbistag: fix buffer leaks in tests
It internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free
the buffers which have been exchanged through the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=766226
2016-05-14 10:47:33 +03:00
Guillaume Desmottes
c6eb9df930 appsrc: fix buffer leaks in tests
It internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free
the buffers which have been exchanged through the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=766226
2016-05-14 10:47:33 +03:00
Guillaume Desmottes
e17299290a audiorate: fix buffer leaks in tests
It internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free
the buffers which have been exchanged through the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=766226
2016-05-14 10:47:33 +03:00
Thiago Santos
60c765174f opusdec: intersect with the filter before returning on getcaps
So upstream gets a smaller set to decide upon as it is what it requested
with the filter

https://bugzilla.gnome.org/show_bug.cgi?id=765684
2016-05-02 14:29:25 -03:00
Thiago Santos
7a5797d3a6 opusdec: improve getcaps to return all possible rates
The library is capable of converting to different rates.

Includes tests.

https://bugzilla.gnome.org/show_bug.cgi?id=765684
2016-05-02 14:29:25 -03:00
Thiago Santos
8375ed7763 tests: opus: remove apparently useless macro in tests 2016-05-02 14:23:54 -03:00
Aurélien Zanelli
928bb3b6f4 exiftag: handle GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
This tag match the EXIF_TAG_FOCAL_LENGTH_IN_35_MM_FILM exif tag and is
stored on a short. Hence there is a precision loss compared to the
GstTag which is a double value.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Tim-Philipp Müller
694423fd3c tests: vorbisenc: fix with CK_FORK=no 2016-04-19 14:18:07 +01:00
Thiago Santos
cf6a36721b videoaggregator: properly handle interlace-mode restrictions
videoaggregator can't handle interlace-mode changes so it must
always restrict itself to the first interlacing mode it receives.

Tests included

https://bugzilla.gnome.org/show_bug.cgi?id=754495
2016-04-18 13:46:48 -03:00
Tim-Philipp Müller
f05ea1e6a6 tests: libscpp: test RTP/RTCP buffer init macros with C++ compiler 2016-04-06 17:57:28 +01:00
Mikhail Fludkov
7a206336dd rtpbasedepayload: look at ssrc before sequence numbers
Doing so prevents us dropping buffers in the rare, but possible, situations,
when the stream changes SSRC and new sequence numbers does not differ
much from the last sequence number from previous SSRC. For example:
ssrc - 0xaaaa 101,102,103,104 ssrc - 0xbbbb 102, 103, 104, 105...
In the scenario above we don't want to drop the first 3 packets of
0xbbbb stream.

https://bugzilla.gnome.org/show_bug.cgi?id=764459
2016-04-03 11:49:16 +03:00
Tim-Philipp Müller
778589cd5b test: fix indentation 2016-03-30 22:41:54 +01:00
Nirbheek Chauhan
3c7906c13b tests/compositor: Add test for aggregator pad numbering
Tests that the behaviour in 7a5cb5a473 is being conformed to.
2016-03-28 13:46:00 +03:00
Jan Schmidt
fd2a14144a subparse: WebVTT parsing support
WebVTT is a new subtitle format for HTML5 video. In this first
version of the parser the cue settings are parsed but only stored in
the internal parser state structure. Later on these settings could be
part of the GstBuffer metadata.

https://bugzilla.gnome.org/show_bug.cgi?id=629764
2016-03-25 00:58:42 +11:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Stian Selnes
93196092d1 rtcpbuffer: Add API for APP packets
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-24 14:24:11 +02:00
Haakon Sporsheim
d8e9a711a0 rtcpbuffer: Add profile-specific extension API.
https://bugzilla.gnome.org/show_bug.cgi?id=761950
2016-03-24 14:22:54 +02:00
Sebastian Dröge
65390b5129 multihandlesink: Remove useless streamheader storage
We don't do anything with it but always get them from the caps anyway, so
stop storing them and having complicated logic around that.

https://bugzilla.gnome.org/show_bug.cgi?id=763278
2016-03-14 12:45:33 +02:00
Tim-Philipp Müller
f331412a37 opus: move Opus audio decoder and encoder from -bad to -base
Hook into build system after moving history.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-26 00:20:10 +00:00
Tim-Philipp Müller
a2eb430010 Merge branch 'plugin-move-opus'
Move Opus decoder and encoder from -bad to -base.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-25 23:51:42 +00:00
Sebastian Dröge
16e53defe5 audiovisualizer: Use the library instead of including the source file
Fixes build now that the shader enum GType has moved to a different file.
2016-02-26 00:02:49 +02:00
Thiago Santos
3d0f8cfc21 tests: compositor: drop special case for valgrind timeout
The default one is 6 minutes, the test was using 5 minutes so just
resort to using the default.

For the non-valgrind test also use the default 20 secs instead of
reducing it to 6s. No real reason to set a custom value here.
2016-02-25 11:43:43 -03:00
Thiago Santos
ea7e099307 tests: compositor: add tests for caps queries
Verifies that proper caps are returned based on what downstream
restricts.
2016-02-25 11:43:43 -03:00
Thiago Santos
86d21e9455 videoaggregator: fix caps queries to allow proper renegotiation
When caps are already negotiated it should be possible to
select formats other than the one that was negotiated. If downstream
allows alpha video caps and it has already negotiated to a non-alpha
format, caps queries should still return the alpha caps as a possible
format as caps renegotiation can happen.

Includes tests (for compositor) to check that caps queries done after
a caps has been negotiated returns complete results

https://bugzilla.gnome.org/show_bug.cgi?id=757610
2016-02-25 11:43:43 -03:00
Stian Selnes
85f297d648 videoencoder: Fix leak when pre_push does not return OK
https://bugzilla.gnome.org/show_bug.cgi?id=761951
2016-02-13 10:09:45 -03:00
Thiago Santos
681b2b8d81 tests: extend the AM_TESTS_ENVIRONMENT from check.mak
To get the CK_DEFAULT_TIMEOUT defined for all tests.

Also replaces a 120 timeout that was set.

https://bugzilla.gnome.org/show_bug.cgi?id=761472
2016-02-05 19:15:16 -03:00
Tim-Philipp Müller
1e4f67472e tests: libvisual: make run faster
Reduce resolution, which shouldn't make any difference
to what's tested here. Makes test finish in less than
half the time it took before (8s vs. 21s).
2016-01-25 16:22:17 +00:00
Vineeth TM
2aabbc2163 tests:audioconvert: Fix integer overflow build error
value of 32768L << 16 and 1L << 31 is 2147483648
but it exceeds the positive range of int which is 2147483647
resulting in integer overflow error. Use G_GINT64_CONSTANT instead of L.

https://bugzilla.gnome.org/show_bug.cgi?id=760769
2016-01-19 09:56:25 +02:00
Koop Mast
17b16e7a83 tests: audioconvert: fix test compilation with clang
With clang 3.7.1 on FreeBSD:
elements/audioconvert.c:650:12: error: shifting a negative signed value is
      undefined [-Werror,-Wshift-negative-value]
      (-32 << 16) + (1 << 15), (-32 << 16) - (1 << 15),
       ~~~ ^

https://bugzilla.gnome.org/show_bug.cgi?id=760134
2016-01-06 01:13:32 +00:00
Tim-Philipp Müller
e5fb7275c2 tests: fix indentation of various unit tests 2016-01-06 01:12:13 +00:00
Hyunjun Ko
682b523652 sdp: add helper fuctions from/to sdp from/to caps
<gstsdpmessage.h>
GstCaps*       gst_sdp_media_get_caps_from_media   (const GstSDPMedia *media, gint pt);
GstSDPResult   gst_sdp_media_set_media_from_caps   (const GstCaps* caps, GstSDPMedia *media);
gchar *        gst_sdp_make_keymgmt                (const gchar *uri, const gchar *base64);
GstSDPResult   gst_sdp_message_attributes_to_caps  (GstSDPMessage *msg, GstCaps *caps);
GstSDPResult   gst_sdp_media_attributes_to_caps    (GstSDPMedia *media, GstCaps *caps);

<gstmikey.h>
GstMIKEYMessage * gst_mikey_message_new_from_caps  (GstCaps *caps);
gchar *           gst_mikey_message_base64_encode  (GstMIKEYMessage* msg);

https://bugzilla.gnome.org/show_bug.cgi?id=745880
2015-12-31 17:11:57 +02:00
Stefan Sauer
898940a37f audioconvert: add a test for gap handling 2015-12-29 14:40:32 +01:00
Stefan Sauer
7bbfa39ada audioconvert: fix passthrough operation
We did not take the sample size into account. Rearrange the tests to have more
conversion test and an extra test case for passthrough operations.

Fixes #759890
2015-12-29 14:40:32 +01:00
Stefan Sauer
267e7ba1d9 tests: remove commented code from audioconvert test
This is just what we have in gst_check_buffer_data().
2015-12-27 19:41:43 +01:00
Tim-Philipp Müller
29cd7966b7 tests: rtpbasedepayload: add test for seqnum gap discont setting
The problem was triggered only when the input buffers were not
writable, so add extra ref to test this code path.
2015-12-11 10:40:49 +00:00
Tim-Philipp Müller
e8a403d181 tests: tags: add unit test for ID3v2 PRIVATE_DATA tag extraction
https://bugzilla.gnome.org/show_bug.cgi?id=730926
2015-11-20 20:20:25 +00:00
Ognyan Tonchev
7a702df863 rtspconnection: Add support for parsing custom headers
https://bugzilla.gnome.org/show_bug.cgi?id=758235
2015-11-18 00:15:32 +00:00
Vineeth TM
b0b0536f91 tests:video: Fix overlay rectangle and buffer leak
Created overlay rectangle is not being freed in video tests
pix2 buffer is being created and not freed

https://bugzilla.gnome.org/show_bug.cgi?id=757927
2015-11-11 15:47:24 +01:00
Wim Taymans
e3f0f3b91e audio-converter: move audio converter to audio libs
Move the audio-converter helper to the audio library.
2015-11-06 17:53:22 +01:00
Andreas Frisch
4a85438e5b tests: Add a test for video blending over transparent frames
And fix the test_overlay_blend test where we blend over a
transparent frame and where expecting wrong results

https://bugzilla.gnome.org/show_bug.cgi?id=681447
2015-11-04 22:17:35 +01:00
Sebastian Dröge
387839c57e opus: Remove invalid unit test
Opus headers should never be in-band, so don't test for correct
handling of that.
2015-11-04 00:14:13 +02:00
Wim Taymans
9e15c89564 audioconvert: change multiplier for int<->float conversion
Use (1 << 31) as the multiplier for int<->float conversions. This makes
sure that int->float conversions always end up with floats between
[-1.0, 1.0].
For the conversion from float to int, this multiplier will give the complete
int range after we perform clipping.
Change the unit test to take this into consideration.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=755301
2015-11-03 12:12:08 +01:00
Eunhae Choi
04eeaef7a4 tests: typefindfunctions: fix error leaks
https://bugzilla.gnome.org/show_bug.cgi?id=757008
2015-10-23 11:48:47 +03:00
Stian Selnes
0a668c1866 rtpbuffer: Add map flag to skip padding
Encrypted RTP buffers may contain encrypted padding, hence it's
necessary to have an option to relax the validation in order to
successfully map the buffer.

When the flag GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING is set
gst_rtp_buffer_map() will map the buffer like if padding is not
present.

https://bugzilla.gnome.org/show_bug.cgi?id=752705
2015-10-15 22:42:37 +03:00
Sebastian Dröge
b60ab758e4 Revert "audioencoder: timestamp headers same as first buffer and use duration 0"
This reverts commit dd4d6d9ed5.

It breaks ogg muxing and the vorbisenc unit test.
2015-10-12 14:02:58 +03:00
Havard Graff
dd4d6d9ed5 audioencoder: timestamp headers same as first buffer and use duration 0
https://bugzilla.gnome.org/show_bug.cgi?id=754224
2015-10-11 11:04:53 +01:00
Havard Graff
001ca740a7 audioencoder-tests: port to use GstHarness
https://bugzilla.gnome.org/show_bug.cgi?id=754223
2015-10-11 11:03:14 +01:00
Havard Graff
6d211eb58b audiodecoder-test: port to using GstHarness
https://bugzilla.gnome.org/show_bug.cgi?id=754196
2015-10-11 11:01:11 +01:00
Sebastian Rasmussen
042e71a117 rtpbasepayload: Implement video SDP attributes
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726472
2015-10-02 17:44:14 +03:00
Jan Schmidt
610ac2f55e tests: Add baseaudiovisualizer test, moved from -bad 2015-10-02 15:05:33 +10:00
Tim-Philipp Müller
0c992c5065 tests: subparse: add unit test for closing tag detection
</ i> should be handled like </i>

https://bugzilla.gnome.org/show_bug.cgi?id=755875
2015-09-30 18:18:15 +01:00
Vineeth TM
de9478bdc1 audiointerleave: typecast bit-mask to guint64 to fix segmentation fault
While creating caps in audiointerleave tests, bitmask is being set as 0x9
This is resulting in segmentation fault. Fix the same by typecasting to guint64

https://bugzilla.gnome.org/show_bug.cgi?id=755840
2015-09-30 09:00:52 +01:00
Nirbheek Chauhan
4d307bf4e2 check: Add test for videoaggregator sinkpads being sorted by zorder
https://bugzilla.gnome.org/show_bug.cgi?id=754285
2015-09-26 10:31:17 +01:00
Vikram Fugro
bbe967a278 appsrc: retain the latest caps in queue when flushing
- Retain the latest caps in the internal queue, when
  flushing.
- Add a unit test case for the same.

https://bugzilla.gnome.org/show_bug.cgi?id=754597
2015-09-09 12:27:40 +03:00
Nirbheek Chauhan
f1f8e465f2 compositor: Ensure all arguments to CLAMP are signed int
If any of the arguments to CLAMP are unsigned integers, the comparison causes
an automatic conversion of the signed int to unsigned, which causes -1 to become
UINT_MAX and get clamped to the high value of the CLAMP instead of 0.

See 716 at http://c0x.coding-guidelines.com/6.3.1.8.html

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=754576
2015-09-04 23:32:36 +02:00
Nirbheek Chauhan
f12ef34410 compositor: Actually use the output resolution for clamping
The obscured check in compositor was using the dimensions of the pad to clamp
the h/w of the pad instead of the output resolution, and was doing an incorrect
calculation to do so. Fix that by simplifying the whole calculation by using
corner coordinates. Also add a test for this bug which fell through the cracks,
and just skip all the obscured tests if the pad's alpha is 0.0.

https://bugzilla.gnome.org/show_bug.cgi?id=754107
2015-08-26 15:03:05 +03:00
hoonhee.lee
1a4f037bc1 tests: audiomixer: remove duplicated word in comment
https://bugzilla.gnome.org/show_bug.cgi?id=753915
2015-08-21 11:12:04 +03:00
Tim-Philipp Müller
917ea30aaf tests: audiodecoder: add unit test for tag handling
https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 16:34:31 +01:00
George Kiagiadakis
41cb26b0e9 tests/appsink: add test to ensure that the segment returned by pull-preroll/sample is correct
https://bugzilla.gnome.org/show_bug.cgi?id=751147
2015-08-14 19:27:06 +02:00
Edward Hervey
862c85ce4a check: Rename states unit test
Makes it easier to differentiate from other modules states unit test
2015-08-14 11:12:30 +02:00
Thiago Santos
30e9c26b72 tests: audiodecoder: add test to make sure gap is pushed before segment
https://bugzilla.gnome.org/show_bug.cgi?id=753360
2015-08-10 00:21:42 -03:00
Thiago Santos
e59d1308cc videodecoder: push pending events before gap
Push all pending events before pushing the gap. This ensures the
segment is pushed before the gap so it can be properly translated
to the running time

Includes unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=753360
2015-08-10 00:21:37 -03:00
Olivier Crête
47e374dbc8 tests: Add audiointerleave test to show that queuing works
This tests fails without the queuing patch because incoming buffers are
not delivered before they are needed.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Sebastian Dröge
dc4c420217 compositor: Add unit tests for the new aggregator start-time-selection property
https://bugzilla.gnome.org/show_bug.cgi?id=749966
2015-07-29 14:35:50 +01:00
Nirbheek Chauhan
74d7944cbb audioaggregator: Sync pad values before aggregating
We need to sync the pad values before taking the aggregator and pad locks
otherwise the element will just deadlock if there's any property changes
scheduled using GstController since that involves taking the aggregator and pad
locks.

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=749574
2015-07-22 19:50:38 +01:00
Stian Selnes
1586981b1b rtcpbuffer: Fix validation of packets with padding
The padding (if any) is included in the length of the last packet, see
RFC 3550.

Section 6.4.1:
   padding (P): 1 bit
      If the padding bit is set, this individual RTCP packet contains
      some additional padding octets at the end which are not part of
      the control information but are included in the length field. The
      last octet of the padding is a count of how many padding octets
      should be ignored, including itself (it will be a multiple of
      four).

Section A.2:
   *  The padding bit (P) should be zero for the first packet of a
      compound RTCP packet because padding should only be applied, if it
      is needed, to the last packet.

   *  The length fields of the individual RTCP packets must add up to
      the overall length of the compound RTCP packet as received.

https://bugzilla.gnome.org/show_bug.cgi?id=751883
2015-07-06 12:06:47 +03:00
Wim Taymans
d807515973 tests: fix cpp directives 2015-06-22 16:53:06 +02:00
Wim Taymans
0d811c73e2 tests: add PPC64 abi struct sizes 2015-06-22 16:00:15 +02:00
Nirbheek Chauhan
498c92aac4 tests: Add test for the 'ignore-eos' compositor sink pad property
When the 'ignore-eos' property is set on a pad, compositor will keep resending
the last buffer on the pad till the pad is unlinked. We count the buffers
received on appsink, and if it's more than the buffers sent by videotestsrc, the
test passes.
2015-06-12 19:45:41 +01:00
Jan Schmidt
e57754be9b tests: Fix video libs test for multiview GstVideoInfo change
The GstVideoInfo struct was changed late in integrating the
multiview changes, and I forgot to run and fix the unit test.
2015-06-11 12:21:08 +10:00
Jan Schmidt
7c1da700c4 video: Add multiview/stereo support
Add flags and enums to support multiview signalling in
GstVideoInfo and GstVideoFrame, and the caps serialisation and
deserialisation.

videoencoder: Copy multiview settings from reference input state

Add gst_video_multiview_* support API and GstVideoMultiviewMeta meta

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-11 12:05:00 +10:00
Jose Antonio Santos Cadenas
9931bef8ca rtcpbuffer: Update package validation to support reduced size rtcp packets
According to this section of the rfc.
https://tools.ietf.org/html/rfc5506#section-3.4.2
The validation should be updated to accept more types of RTCP
packages, with this mask change feedback packages will be also
accepted.

Change-Id: If5ead59e03c7c60bbe45a9b09f3ff680e7fa4868
2015-06-05 10:18:21 +02:00
Olivier Crête
b57388bce7 tests: audiointerleave: test not setting positions
Disable "channel-positions-from-input", but without actually giving
a position table, so every position should be NONE
2015-06-02 15:45:13 -04:00
Olivier Crête
28fc944c6e tests: Fix indentation in audiointerleave test 2015-06-02 15:44:57 -04:00
Edward Hervey
ce16635f46 check: Use GST_CHECK_MAIN () macro everywhere
Makes source code smaller, and ensures we go through common initialization
path (like the one that sets up XML unit test output ...)
2015-06-02 16:14:39 +02:00
Edward Hervey
ee3135c4a6 check: Use GST_CHECK_MAIN () macro everywhere
Makes source code smaller, and ensures we go through common initialization
path (like the one that sets up XML unit test output ...)
2015-06-02 16:04:40 +02:00
George Kiagiadakis
a998d380bd tests: add test for videorate caps renegotiation after a framerate has been calculated and added to caps
The original 0/1 framerate must still be allowed to be configured
on the upstream side of videorate, otherwise future caps renegotiation
is going to fail.

https://bugzilla.gnome.org/show_bug.cgi?id=750032
2015-05-29 15:03:38 +02:00
Tim-Philipp Müller
8fc0e4f55c tests: add back videoscale unit test
Has been removed in 835422b2 as part of porting
things over to the new videoscale API.
2015-05-23 12:04:15 +01:00
Mathieu Duponchelle
2e423dd129 discoverer: Add serialization methods.
[API] gst_discoverer_info_to_variant
[API] gst_discoverer_info_from_variant
[API] GstDiscovererSerializeFlags

+ Serializes as a GVariant
+ Adds a test
+ Does not serialize potential GstToc (s)

https://bugzilla.gnome.org/show_bug.cgi?id=748814
2015-05-19 18:48:07 +02:00
Tim-Philipp Müller
8304893d06 appsrc: optimise caps changing when previously-set caps have not taken effect yet
Only negotiate/change caps once when setting caps twice and
the first-set caps have not been used yet.

Based on patch by Eunhae Choi.

https://bugzilla.gnome.org/show_bug.cgi?id=747517
2015-05-18 13:37:54 +01:00
Matthew Waters
df7370bc2a compositor: fix rectangle obscure test to clamp against the output frame size
Rather than one of the input pad video info's.

The test checking this was not constraining the output frame size
to ensure that the out of frame stream was not being displayed.
2015-05-13 17:44:30 +10:00
Nirbheek Chauhan
dbbfba76ea tests: Add a check for the new compositor pad-is-obscured optimization
We verify that all the buffers on an obscured sinkpad are skipped by overriding
the map() function in the GstVideoMeta of the buffers to set a variable when
called. We also test that the buffers do get mapped when they're not obscured.

Blame^WCredit for the GstVideoMeta map() idea goes to Tim.

https://bugzilla.gnome.org/show_bug.cgi?id=746147
2015-05-01 11:57:00 +01:00
Tim-Philipp Müller
508ae9c2fc tests: tcp: remove SOCK_CLOEXEC which causes build problems on OS/X
It's not needed here.

https://bugzilla.gnome.org/show_bug.cgi?id=747692
2015-04-26 20:14:53 +01:00
Tim-Philipp Müller
0bedfc51a4 tests: typefindfunctions: add test for UTF-16 MSS manifest typefinding 2015-04-26 14:45:44 +01:00
Tim-Philipp Müller
2891509ec4 tests: define GST_CHECK_TEST_ENVIRONMENT_BEACON
Make sure the test environment is set up.

https://bugzilla.gnome.org//show_bug.cgi?id=747624
2015-04-23 15:57:37 +01:00
Tim-Philipp Müller
0cb6a439da Update .gitignore 2015-04-23 15:42:29 +01:00
Hyunjun Ko
5d90a28d5f tests: rtpbasedepayload: fix crash in test when passing varargs
Need to pass 64 bits where 64 bits are expected.

https://bugzilla.gnome.org/show_bug.cgi?id=748027
2015-04-17 19:47:09 +01:00
Vincent Penquerc'h
609f6703f4 tests: fix type mismatch in varargs passing
A bitmask is 64 bits, but integer immediates are passed as int
in varargs, which happen to be 32 bit with high probability.

This triggered a valgrind jump-relies-on-uninitalized-value
report well away from the site, since it doesn't trigger on
stack accesses, and there must have been enough zeroes to stop
g_object_set at the right place.
2015-04-09 16:20:44 +01:00
Edward Hervey
fe0a9ec618 tests: Use AM_TESTS_ENVIRONMENT
Needed by the new automake test runner
2015-04-08 16:15:43 +02:00
Tim-Philipp Müller
0aa0b89aaf tests: appsrc: clean up block_deadlock test and make it work in valgrind
Remove all the bus watch and main loop code from the block_deadlock
test, it's not needed: neither pipeline will ever post an EOS or ERROR
message on the bus, and we're the only ones posting an error, from a
timeout. Might just as well just sleep for a bit and then do whatever
we want to do.

Don't gratuitiously set tcase timeout, just use whatever is the
default (or set via the environment).

Make individual pipeline runs shorter.

Check for valgrind and only do a handful iterations when running
in valgrind, not 100 (each iteration takes about 4s on a core i7).

Make videotestsrc output smaller buffers than the default resolution,
we don't care about the buffer contents here anyway.

Fixes test timeouts when run in valgrind.
2015-04-05 13:53:38 +01:00
Tim-Philipp Müller
46aa47440f tests: multisocketsink: fix flaky unit test
On slower systems, or under high system load (e.g. check-valgrind),
the sending_buffers_with_9_gstmemories test would sometimes fail,
because the read call only returns 32 bytes instead of the full
36 bytes expected. This is because multisocketsink might end up
doing a partial write of 32 bytes first, and then write the
missing 4 bytes later, but since we don't wait for all of data
to be written, there's a short window where our read call in the
unit test might then only receive the 32 bytes written so far,
which makes it deeply unhappy.

Instead, make sure we loop to read all bytes.
2015-04-05 12:59:11 +01:00
Tim-Philipp Müller
73278948a3 tests: basetime: fix timeouts when running under valgrind
This test sets a rather short timeout, increase this when
we run under valgrind. Also add a short sleep to the
fakesrc ! fakesink pipeline to avoid thrashing the CPU,
which would often not stop the main loop when it should.

Also fix wrong (0.10) return value from pad probe callback.
2015-04-04 01:26:17 +01:00
Tim-Philipp Müller
413fc30235 videorate: fix a couple of memory leaks
tests: videorate: fix leak in unit test
2015-04-04 00:49:21 +01:00
Thibault Saunier
ae86dec9ca videorate: Detect framerate if not forced to variable downstream
In case upstream does not provide videorate with framerate information,
it will detect the current framerate from the buffer it received,
but if downstream forces the use of variable framerate (most probably
through the use of a caps filter with framerate = 0 / 1), videorate will
respect that.

And add some unit tests

https://bugzilla.gnome.org/show_bug.cgi?id=734424
2015-04-02 17:13:24 -04:00
Olivier Crête
5d78c5cca6 audiomixer: Allow downstream caps with a non-default channel-mask
Instead of failing, take the downstream channel mask if the channel
count is 1.
2015-04-01 20:32:41 -04:00
Nicolas Dufresne
b7facbaf22 basedepay: Handle initial gaps and no clock-base
When generating segment, we can't assume the first buffer is actually
the first expected one. If it's not, we need to adjust the segment to
start a bit before.

Additionally, we if don't know when the stream is suppose to have
started (no clock-base in caps), it means we need to keep everything in
running time and only rely on jitterbuffer to synchronize.

https://bugzilla.gnome.org/show_bug.cgi?id=635701
2015-03-27 19:03:41 -04:00
Nicolas Dufresne
802ad73103 basedepayload: Fix generated segment
This fixes playback position in RTSP.

https://bugzilla.gnome.org/show_bug.cgi?id=635701
2015-03-26 17:43:47 -04:00
Olivier Crête
7975cefff0 audiointerleave: Add unit tests
Almost a copy of the "interleave" unit tests, improved to support
the thread on the src pad on GstAggregator.

https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:44:03 -04:00
Sebastian Dröge
15cc12b0b9 multisocketsink: Allocate enough memory on the stack in the test
Otherwise we just overwrite other things on the stack and cause crashes.
2015-03-16 20:41:19 +01:00
Wim Taymans
fabf4890b8 allocators: add allocators test 2015-03-15 16:41:21 +01:00
William Manley
ccd4472e2a Add test_that_multisocketsink_and_socketsrc_preserve_meta
This test is in a seperate commit to the previous two because it depends
on and tests the functionality in both.
2015-03-14 13:23:40 +01:00
William Manley
a297b0545f socketsrc: Add connection-closed-by-peer signal
This provides notification that the socket in use was closed by the peer
and gives an opportunity to replace it with a new one which is not
closed, allowing reading from many sockets in order.

I use this in pulsevideo to implement reconnection logic to handle the
pulsevideo service dieing, such that is can be restarted without
disrupting downstream.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=739546
2015-03-13 20:05:00 +01:00
William Manley
7c10499ecd tcp: Add element socketsrc
`socketsrc` can be considered a source counterpart to `multisocketsink`.
It can be considered a generalization of `tcpclientsrc` and
`tcpserversrc`:  it contains all the logic required to communicate over
the socket but none of the logic for creating the sockets/establishing
the connection in the first place, allowing the user to accomplish this
externally in whatever manner they wish making it applicable to other
types of sockets besides TCP.

This commit essentially copies the implementation directly from
tcpserversrc.  Later patches will tidy the implementation up and
re-implement `tcpclientsrc` and `tcpserversrc` in terms of `socketsrc`.

See https://bugzilla.gnome.org/show_bug.cgi?id=739546
2015-03-13 20:05:00 +01:00
William Manley
b8232a7467 multisocketsink: Map GstMemorys individually when sending
If a buffer is made up of non-contiguous `GstMemory`s `gst_buffer_map`
has to copy all the data into a new `GstMemory` which is contiguous.  By
mapping all the `GstMemory`s individually and then using scatter-gather
IO we avoid this situation.

This is a preparatory step for adding support to multisocketsink for
sending file descriptors, where a GstBuffer may be made up of several
`GstMemory`s, some of which are backed by a memfd or file, but I think this
patch is valid and useful on its own.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=746150
2015-03-13 16:20:50 +01:00
Song Bing
1942870257 streamsynchronizer: Should wait state change complete before start another state change
Should wait state change complete before start another state change.
Can't ensure can received async-done message when state change from PLAYING to PAUSED.

https://bugzilla.gnome.org/show_bug.cgi?id=736655
2015-03-11 15:51:02 +00:00
Tim-Philipp Müller
c53ba4beeb Fix double semicolons 2015-03-10 09:27:08 +00:00
Wim Taymans
72fd1345ad check: add another generic converter test
Run conversion and scaling with borders.
2015-03-04 12:29:45 +01:00
Wim Taymans
e0a192d3dd video-converter: don't reuse the input line when adding borders
When we need to add borders, we need a writable input line, so
don't reuse the source memory directly.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745207
2015-03-04 12:29:45 +01:00
Tim-Philipp Müller
35bd289be3 tests: fix crashes in {audio,video}{decoder,encoder} tests on 32-bit
Don't feed 64-bit integer variable into vararg function that expects
an unsigned integer to go with GST_TAG_TRACK_NUMBER. This would
cause crashes on 32-bit platforms, and if not that then test
failures if the comparisons fail later (at least on big endian
platforms).
2015-02-27 20:26:43 +00:00
Tim-Philipp Müller
980f5e17e9 tests: pbutils: more checking of returned description strings
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-27 14:30:01 +00:00
Song Bing
eeea911c2e streamsynchronizer: Unit test for streamsynchronizer's EOS handling
Test that a pipeline can change from PLAYING to PAUSED and back in
the following scenarios:
1. One track reach EOS after pushed some buffers while another track
still pushes buffers
2. One track reach EOS without buffers while another track still pushes
buffers

https://bugzilla.gnome.org/show_bug.cgi?id=736655
2015-02-16 14:34:35 +02:00
Tim-Philipp Müller
4e1a43d4ea pbutils: descriptions: add H.265 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 20:05:28 +00:00
Tim-Philipp Müller
58d19cb7ca pbutils: descriptions: add MPEG-4 video profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 19:03:58 +00:00
Tim-Philipp Müller
001bd78957 pbutils: descriptions: add Dirac/VC-2 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 18:50:48 +00:00
Tim-Philipp Müller
1d528459be pbutils: descriptions: add H.264 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 18:50:43 +00:00
Tim-Philipp Müller
0d510b2da9 tests: remove GST_DISABLE_PARSE guards from two tests that don't require it 2015-02-13 16:25:14 +00:00
Tim-Philipp Müller
91ff1a2957 tests: remove GST_DISABLE_PARSE guards from two tests that don't require it 2015-02-13 16:25:14 +00:00
Tim-Philipp Müller
1b4bd6e451 rtspmessage: map headers we know that are added by string to their enum
That way we can look them up by their field enum later as well.
2015-02-09 18:03:43 +00:00
Tim-Philipp Müller
ef7f537a80 tests: rtsp: add some unit tests for new GstRTSPMessage API 2015-02-09 17:50:32 +00:00
Tim-Philipp Müller
302353307a tests: compositor: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example.
2015-02-05 15:48:41 +00:00
Tim-Philipp Müller
e54829aa4f tests: audiomixer: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example. See previous audiomixer commit.
2015-02-05 15:23:04 +00:00
Olivier Crête
660ddd40c2 audiomixer: Make flush start/stop test non-racy
The flush stop could have happened between the source trying
to push the segment event and the buffer, this would cause a warning.
Prevent that by taking the source's stream lock while flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=742684
2015-01-29 10:24:18 +01:00
Olivier Crête
0955a39a3d audiomixer: Replace racy timeout based tested with drain query
Using the drain query, we can be certain that the buffer has done going
through the aggregator by taking the stream locks.

https://bugzilla.gnome.org/show_bug.cgi?id=742684
2015-01-29 10:24:18 +01:00
Olivier Crête
402c0d4c5c audiomixer: Avoid race in caps negotiation
With the current audiomixer, the input caps need to be the same,
otherwise there is an unavoidable race in the caps negotiation. So
enforce that using capsfilters

https://bugzilla.gnome.org/show_bug.cgi?id=742684
2015-01-29 10:24:18 +01:00
Sebastian Dröge
8465c0915e audiomixer: Change blocksize property to output-buffer-duration in time format
This makes the interface of audiomixer independent of the actual caps.
2014-12-23 11:45:50 +01:00
Thiago Santos
dfc82f3466 tests: audiodecoder: tests for caps query implementation
Copied from videodecoder tests and updated to audio features
2014-12-17 19:15:24 -03:00
Thiago Santos
8085352fb3 videodecoder: expose getcaps virtual function
Allows subclasses to do custom caps query replies.

Also exposes the standard caps query handler so subclasses can just
extend on top of it instead of reimplementing the caps query proxying.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
f24075887f videodecoder: implement caps query
Refactor the encoder's caps query proxying function to a common place
and use it in the videodecoder to proxy downstream restrictions.

The new function is private to the gstvideo lib.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Sebastian Dröge
67ef96c82d audiomixer: Add queues after the (live) sources in the unit test 2014-12-17 18:41:41 +01:00
Edward Hervey
ff57f69134 video: Fix non-default usage of gst_video_sink_center_rect
Make sure we take into account non-0 x/y destination rectangles
2014-12-15 14:11:07 +01:00
Tim-Philipp Müller
2f7af2d41b tests: rtpbasepayload: fix indentation 2014-12-12 15:09:55 +00:00
Tim-Philipp Müller
091e124950 tests: audiodecoder: fix indentation 2014-12-12 15:09:55 +00:00
Tim-Philipp Müller
c57bb51c03 tests: audiodecoder: fix broken refcounting in unit test
The set_format vfunc does not pass ownership of the caps
to the decoder, so we mustn't unref the caps there.

gst_event_new_caps() does not take ownership of the caps
passed, so we must unref the caps afterwards.

Fixes leaks when running test in valgrind in 1.4 branch.
2014-12-12 15:09:55 +00:00
Mathieu Duponchelle
b2413d46ed audiodecoder: Push pending events before sending EOS.
Segments are added to the pending events, and pushing a segment
is mandatory before sending EOS.

+ Adds a test.

https://bugzilla.gnome.org/show_bug.cgi?id=740853
2014-12-05 12:04:04 +01:00
Tim-Philipp Müller
b03cfdffb1 tests: remove libs/video and videoconvert test from valgrind blacklist
Seem to work fine.
2014-11-28 13:31:39 +00:00
Tim-Philipp Müller
4bddc9276b tests: don't run orc/* tests under valgrind
They just seem to blow up for some reason that needs investigating.
2014-11-28 13:29:37 +00:00
Tim-Philipp Müller
c61604fd9b tests: fix leak in video unit test 2014-11-16 13:56:16 +00:00
Vineeth T M
7f5aa9af04 tests: video: add video blend test
Add test to check rendering of overlays of different sizes
that are completely or partially outside the video surface.
Once the overlay is blended to the video, verify if the
position of the blended overlay is as expected, by comparing
the pixels of the blended video with the expected values.

https://bugzilla.gnome.org/show_bug.cgi?id=739281
2014-11-16 13:51:34 +00:00
Wim Taymans
b73096ce8c video-color: add gamma encode/decode functions
Add functions to encode and decode gamma.
Add unit test to check that encode and decode are eachothers inverse
and that the limits are respected.
2014-11-11 16:11:15 +01:00
Wim Taymans
6711c50495 test: add scaling test
Sort pack and unpack performance measurements
2014-11-10 14:53:13 +01:00
Wim Taymans
835422b2ea videoscale: port to new API 2014-11-10 11:45:52 +01:00
Sebastian Dröge
480e661618 capsfilter-renegotiation: Use assertions from libcheck for more information on failures 2014-11-09 10:47:14 +01:00
Wim Taymans
39662d0393 video-chroma: ORCify 2x vertical upsampling
Make an ORC version of the 2x vertical upsampling code.
Improve unit tests, test chroma up and down sampling.
memset buffer in conversion to make valgrind happy.
2014-11-07 12:13:28 +01:00
William Manley
5b0ec93e99 tests: Add TCP pipelines test
There don't seem to be any unit tests for the socket handling elements.  As
I am about to attempt some refactorings I've added some basic tests which
exercise some of the happy-paths in tcpclientsrc, tcpserversrc,
tcpserversink and tcpclientsink.  They should let me know if I've caused
serious breakage.

They are far from exhaustive but are sufficient for me to have caught a few
memory-leaks in the existing code.

https://bugzilla.gnome.org/show_bug.cgi?id=739544
2014-11-07 10:14:07 +01:00
Wim Taymans
3fde8dd746 tests: add video conversion test
Go through all conversions and make a list of performance.
2014-11-06 18:19:44 +01:00