Commit graph

1040 commits

Author SHA1 Message Date
Wim Taymans 5edb36415a tests: add orc test for videoconvert 2014-09-22 10:42:47 +02:00
Ognyan Tonchev 5a3ebef605 audiodecoder: extend flush_events test to check for event leaks
https://bugzilla.gnome.org/show_bug.cgi?id=736788
2014-09-17 14:12:24 +03:00
Thiago Santos 2157497405 tests: textoverlay: add test to reproduce fakesink scenario
Adds a new test to textoverlay to make sure it can properly handle
elements that have ANY caps but fail to add the overlay meta in
the allocation query.

This test verifies that textoverlay won't use the caps features even
knowing that the overlay meta is accepted when querying the downstream
caps because it also needs downstream to confirm by putting the meta
in the allocation query.

https://bugzilla.gnome.org/show_bug.cgi?id=735800
2014-09-01 15:25:56 -03:00
Thiago Santos a080c0ebbf basetextoverlay: rework caps negotiation
Make textoverlay negotiate caps more correctly.

1) Check what caps we received in the video-sink
2) If it already has the overlay meta -> use it directly
3) If it doesn't, textoverlay try adding the overlay meta and using it,
   if downstream doesn't support it, just use what is received in the
   video-sink
4) Check if the allocation query also supports the meta to enable
   really using it

Before it wasn't really doing renegotiation of any kind, just
re-checking if it should use the overlay meta or not

Also had to update the caps in the test as memory:SystemMemory seems
to be required when you use a caps feature otherwise intersection/subset
checks will fail.

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:40:44 -03:00
Thiago Santos c9904fb639 encodebin: delay missing encoder error as passthrough is still possible
Set up a fakesink with a pad probe to replace the missing encoder to detect
if encoding was really required and only error out in this case. Otherwise
just let passthrough branch work.

This delays the error posting from the set_state function to when buffers
are really flowing. Unit test updated accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=650652
2014-08-11 10:30:58 -03:00
Sebastian Rasmussen 9995054e80 tests: Add missing unrefs of objects after use
Unreffing the objects returned by gst_bin_get_by_name() and
gst_pipeline_get_use() were missing in several tests, so add these.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734359
2014-08-06 15:18:56 +02:00
Edward Hervey 2ca269ac6b check: Fix include path of rtp checks
Fixes make distcheck
2014-07-31 16:11:25 +02:00
Sebastian Dröge 960f676407 playbin: Fix unit test for last change
It will successfully asynchronously go to PAUSED now and
later fail.
2014-07-21 09:35:36 +02:00
Sebastian Dröge a67d745de2 playbin-complex: Change template name from %d to the more common %u 2014-07-21 09:35:36 +02:00
Wim Taymans b108aad77b mikey: make message and payload mini-objects
Make the MIKEY message and payload objects miniobjects so that they have
a GType and are refcounted.
We can reuse the dispose method to clear our payload objects.
Add some annotations.
Implement a copy function for the MIKEY message.
Fix the unit test.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732589
2014-07-02 15:44:12 +02:00
Wim Taymans 0425f1cf4d rtspconnection: also allow POST before GET
Don't only allow GET and then POST request to setup tunneling over HTTP
but also allow POST and then GET.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732459
2014-07-01 16:30:25 +02:00
Tim-Philipp Müller 8f8f1f9de1 tests: fix vararg handling in rtpbasedepayload unit test
Makes it pass on 32-bit systems.
2014-06-23 01:02:22 +01:00
Tim-Philipp Müller ec6b178339 tests: fix vararg handling in rtpbasepayload unit test
Makes it pass on 32-bit systems.
2014-06-23 00:33:18 +01:00
Sebastian Dröge 909dd7831b audiodecoder: Don't be too picky about the output frame counter
With most decoder libraries, and especially when accessing codecs via
OpenMAX or similar APIs, we don't have the ability to properly related
the output buffers to a number of input samples. And could e.g. get
a fractional number of input buffers decoded at a time.

Previously this would in the end lead to an error message and stopped
playback. Change it to a warning message instead and try to handle it
gracefully. In theory the subclass can now get timestamp tracking
wrong if it completely misuses the API, but if on average it behaves
correct (and gst-omx and others do) it will continue to work properly.

Also add a test for the new behaviour.

We don't change it in the encoder yet as that requires more internal logic
changes AFAIU and I'm not aware of a case where this was a problem so far.
2014-06-20 11:02:55 +02:00
Thiago Santos fb3a9d1bc5 video: avoid overflows when doing int operations for size
size is a gsize, so cast the operands to it to avoid overflows
and setting wrong value to the video size.

Includes tests.

https://bugzilla.gnome.org/show_bug.cgi?id=731195
2014-06-09 23:38:39 -03:00
Vincent Penquerc'h 0a49b7050f tests: fix uninitialized variable use in video decoder test 2014-06-06 10:42:11 +01:00
Thibault Saunier d2ea3260e9 videodecoder: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

+ Add a testcase

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-06-03 13:03:49 +02:00
Thibault Saunier 12df7fa49d audiodecoder: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-06-03 13:03:21 +02:00
Thibault Saunier 2843f358d9 videoencoder: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-06-03 13:03:19 +02:00
Thibault Saunier 967d1fb982 audioencoder: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-06-03 13:03:16 +02:00
Thiago Santos 783195ccef decodebin: aggregate buffering messages
Aggregate buffering messages to only post the lower value
to avoid setting pipeline to playing while any multiqueue
is still buffering.

There are 3 scenarios where the entries should be removed from
the list:

1) When decodebin is set to READY
2) When an element posts a 100% buffering (already implemented)
3) When a multiqueue is removed from decodebin.

For item 3 we don't need to handle it because this should only
happen when either 1 is hapenning or when it is playing a
chained file, for which number 2 should have happened for the
previous stream to finish

https://bugzilla.gnome.org/show_bug.cgi?id=726423
2014-05-29 18:59:30 -03:00
Thiago Santos 5d35675a74 tests: videodecoder: audiodecoder: add tests for eos after segment
Tests that pushing a buffer after the segment returns EOS
2014-05-26 23:24:56 -03:00
Sebastian Dröge 7bdaa49fa3 video: And check comparison for real 2014-05-21 10:43:49 +02:00
Sebastian Dröge f8b367212d video: Fix broken comparison in unit test
libs/video.c:540:50: error: comparison of constant 2 with boolean expression is always false
      [-Werror,-Wtautological-constant-out-of-range-compare]
            && !GST_VIDEO_INFO_N_PLANES (&vinfo) > 2) {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
2014-05-21 10:40:32 +02:00
Tim-Philipp Müller 134f51894a Add new unit test binary to .gitignore 2014-05-04 18:14:54 +01:00
Sebastian Dröge 9e3672d99d textoverlay: Link unit test with the local version of the library, not an installed one 2014-05-03 18:57:38 +02:00
Olivier Crête bdf8ce286d rtpbasepayload: Implement reconfigure event & renegotiation without subclass
Implement the reconfigure event, also do correct downstream caps negotiation
if the subclass doesn't implementy set_caps.

https://bugzilla.gnome.org/show_bug.cgi?id=725361
2014-05-03 10:21:04 +02:00
Olivier Crête 42e3e22969 tests/check/libs/rtpbasepayload.c: Run gst-indent
https://bugzilla.gnome.org/show_bug.cgi?id=725361
2014-05-03 10:21:04 +02:00
Ognyan Tonchev 6750531504 rtspconnection: Add more tests
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728907
2014-04-30 16:27:25 +02:00
Sebastian Dröge 13954ce3e5 audioresample: Fix memory leaks in test 2014-04-15 19:31:28 +02:00
Sebastian Dröge 846a4a1038 videotestsrc: Fix memory leak in test 2014-04-15 13:54:45 +02:00
Sebastian Dröge 1822a6b31c encodebin: Fix memory leak in test 2014-04-15 13:48:46 +02:00
Sebastian Dröge 1266fd0046 audioconvert: Fix leaks in unit test 2014-04-15 13:03:34 +02:00
Sebastian Dröge 85c502d626 videoencoder/decoder: Fix memory leaks in the tests 2014-04-15 11:55:22 +02:00
Sebastian Dröge 16275f479f audiodecoder: Actually allocate enough memory for 64 bits, not just 32 bits
Also fix a memory leak.
2014-04-15 11:54:06 +02:00
Sebastian Dröge 2378848240 audioencoder: Fix memory leaks in unit test 2014-04-15 11:43:41 +02:00
Sebastian Dröge 29758da255 rtp: Fix GBytes memory leak in test 2014-04-15 10:29:12 +02:00
Wim Taymans 675d0400e1 mikey: Fix the KEMAC payload
The KEMAC payload actually needs to have subpayloads and the key should
go into the KEY_DATA subpayload. Add support for subpayloads and
implement the KEY_DATA payload.
Add some pointers to the conversion functions that allow us to add
encryption and decryption later.
2014-04-04 17:40:58 +02:00
Wim Taymans 83888d6b13 mikey: add MIKEY parsing helpers
MIKEY is defined in RFC 3830 and is used to exchange SRTP encryption
parameters between a sender and a receiver in a secure way.
This library implements a subset of the features, enough to implement
RFC 4567, using MIKEY in SDP and RTSP.
2014-03-24 17:12:52 +01:00
Thiago Santos b7cf2fa571 tests: decodebin: port old decodebin2 test for parser and decoder linking
They were in the old decodebin2.c tests file and were never ported.
Now we can get rid of decodebin2.c
2014-03-16 14:36:51 -03:00
Matthieu Bouron c904661dc3 tests: add textoverlay passthrough with composition feature unit tests
https://bugzilla.gnome.org/show_bug.cgi?id=721953
2014-03-05 20:39:01 +01:00
Ognyan Tonchev 4220442441 rtspconnection: Call closed() when GET is closed in tunneled mode
This patch adds read source on the write socket in tunneled
mode and we get a callback when client disconnects the GET
channel.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725313
2014-03-03 10:34:56 +01:00
Sebastian Rasmussen ba9e8f0797 tests: Refactor RTP basepayloading test into pay/depay parts
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723328
2014-02-24 12:12:18 +01:00
Tim-Philipp Müller 3afd5fb3ab tests: add new unit tests to .gitignore 2014-02-21 19:07:59 +00:00
Ognyan Tonchev 6bf215fa09 rtspconnection: New unit test
See https://bugzilla.gnome.org/show_bug.cgi?id=724720
2014-02-21 16:21:45 +01:00
Stefan Sauer 2337311216 encodebin: simplify tests
Also use the profile helper for the ogg profile here.
2014-02-18 20:52:11 +01:00
Stefan Sauer 465dfe4920 encodebin: refactor tests
Add a new test to demo how to get missing plugin message.
Split some tests that unneccesarily munge unrelated checks into one test.
2014-02-16 22:16:17 +01:00
Sebastian Rasmussen 09644d0e4a tests: Don't build disabled plugins' check tests
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723492
2014-02-11 21:00:30 +01:00
Sebastian Dröge ce59ac561e playbin: Fix memory leak in unit test 2014-02-10 16:33:35 +01:00
Sebastian Dröge e22243b2d0 videoscale: Fix compiler warning in unit test
error: implicit conversion from enumeration type
'GstFormat' to different enumeration type 'GstVideoFormat'
2014-02-08 17:11:54 +01:00
Sebastian Dröge 4046a880de videoconvert: Fix compiler warning in unit test
error: implicit conversion from enumeration type
'GstFormat' to different enumeration type 'GstVideoFormat'
2014-02-08 17:11:04 +01:00
Wim Taymans c6915ea785 check: add some more checks
Add header and payload length check in case of CSRCs.

See https://bugzilla.gnome.org/show_bug.cgi?id=723196
2014-02-04 14:32:48 +01:00
Thiago Santos 1ae733fd4e tests: audioencoder: add tests analogous to the videoencoder ones 2014-01-29 12:33:59 -03:00
Thiago Santos 4fefd48f05 tests: videoencoder: check that tags are pushed before eos
Check that if a new tag event is received right before eos it
is pushed before the eos
2014-01-29 12:33:59 -03:00
Thiago Santos 6684aa42cd tests: videoencoder: basic videoencoder base class test
Adds a single test for video encoding
2014-01-29 12:33:59 -03:00
Sebastian Rasmussen fa393e5d60 rtpbasepayload: Add statistics property
This property allows for an atomically retrieved set of properties that
can e.g. be used to generate RTP-Info headers.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719415
2014-01-27 15:11:09 +01:00
Thiago Santos 1d75bdca92 tests: videodecoder: plug a few leaks
Remove leaks of caps and events references
2014-01-17 11:21:33 -03:00
Thiago Santos 36efe20679 tests: audiodecoder: add another test for negotiation with gap event
Check that even if the subclass doesn't call set_output_format, the base
class should use upstream provided caps to fill the output caps that is
pushed before the gap event is forwarded, otherwise it ends again fixating
the rate and channels to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=722144
2014-01-15 15:20:39 -03:00
Thiago Santos bbbd9f7d49 tests: audiodecoder: check that negotiation works buffers and gaps
Adds 2 tests to verify that output caps are the expected value, reusing
input structure values for both buffers and gaps

https://bugzilla.gnome.org/show_bug.cgi?id=722144
2014-01-14 09:34:44 -03:00
Thiago Santos 755414ed1e tests: audiodecoder: add basic playback test for audio decoder
Simple test that just check that audio decoding works as expected

https://bugzilla.gnome.org/show_bug.cgi?id=722144
2014-01-14 09:34:44 -03:00
Wim Taymans d899e6df5a video: rename NV12T -> NV12_64Z32
Is a bit more descriptive and allows us to add more tiled types
later.

https://bugzilla.gnome.org/show_bug.cgi?id=707361
2014-01-13 10:46:52 -05:00
Wim Taymans 12eedf86e8 tests: fix videoscale test for NV12T
https://bugzilla.gnome.org/show_bug.cgi?id=707361
2014-01-13 10:46:24 -05:00
Thiago Santos 561a4fff15 tests: videodecoder: check that segment events are not dropped
Adds a test that simulates a scenario where the first buffers after
a segment can't be decoded and the decoder asks for those frames
to be released. The videodecoder base class should make sure that
the events attached to those first buffers are pushed even if the
buffers aren't going to be.

https://bugzilla.gnome.org/show_bug.cgi?id=721835
2014-01-13 06:11:09 -03:00
Thiago Santos b1e728a854 tests: videodecoder: add test for reverse playback
Checks that buffers are pushed backwards in reverse playback

https://bugzilla.gnome.org/show_bug.cgi?id=721666
2014-01-13 06:11:09 -03:00
Thiago Santos c564d5b2c9 tests: videodecoder: add check for serialization of events
Tests that events are properly serialized with buffers, also checks
that the usual events are sent (stream start, caps, segment and eos).
2014-01-07 22:08:14 -03:00
Thiago Santos 27530a0196 tests: videodecoder: add simple playback test
Add a simple playback test that makes sure that video decoder pushes
buffers in the same order it receives and that it respects the
set timestamps and durations
2014-01-07 22:08:14 -03:00
Tim-Philipp Müller d24f554a3c tests: make git ignore new test binary 2013-12-22 22:07:43 +00:00
Sebastian Dröge 4f4ff6bda6 subparse: Add unit test for LRC subtitles 2013-12-18 15:52:53 +01:00
Stefan Sauer 51038d70aa pbutils: add typefinder and descriptions for audio/x-xi
xi files can be read by libsndfile.
2013-12-17 18:06:12 +01:00
Sebastian Rasmussen 1966b85b20 tests: Add test for rtpbasepayload/-depayload
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720162
2013-12-10 14:42:13 +01:00
Sebastian Rasmussen c734f9fba8 rtpbuffer: Allow subbuffering of empty buffers
See https://bugzilla.gnome.org/show_bug.cgi?id=720162
2013-12-10 12:38:56 +01:00
Tim-Philipp Müller 60e87090eb tests: add unit test for samiparser issue
https://bugzilla.gnome.org/show_bug.cgi?id=712805
2013-11-21 16:34:25 +00:00
Tim-Philipp Müller b79d6b1c09 tests: fix appsrc test with latest GLib version
With the latest GLib, g_source_remove() complains about not finding
the timeout source with the given ID here, since it was already
destroyed by returning FALSE from the timeout callback. Also return
FALSE from the bus watches when we don't want to be called any more.
2013-11-18 16:03:07 +00:00
Tim-Philipp Müller 7509343e53 tests: fix race in streamsynchronizer test
Wait for thread to exit before starting to free the
to_push list, otherwise thread might check the final
to_push->next node only after we've freed it already.
2013-11-12 19:03:19 +00:00
Sebastian Dröge 2b9118f58c adder: Free consistency checker instance in test_live_seeking test 2013-11-06 12:16:31 +01:00
Sebastian Dröge 69e95ffb24 adder: Release some request pads properly in the unit test 2013-11-06 12:01:14 +01:00
Sebastian Dröge 2dda08478a audio: Add unit test for filling memory with silence samples 2013-11-03 15:58:35 +01:00
Thiago Santos 7dfb903cb4 videotestsrc: improve test for backwards playback
Improve test by checking that timestamps are decreasing
2013-10-08 16:20:03 -03:00
Thiago Santos c2eb3d4e71 videotestsrc: implement duration query
Add duration query to videotestsrc, it can answer this query when
the num-buffers property is set.

https://bugzilla.gnome.org/show_bug.cgi?id=709646
2013-10-08 16:10:54 -03:00
Thibault Saunier 8bcd1a2f8d tests: test videotestsrc in reverse playback
https://bugzilla.gnome.org/show_bug.cgi?id=701813
2013-10-08 11:17:17 -03:00
Edward Hervey 2cf8ac87aa check: Update .gitignore 2013-08-13 17:39:34 +02:00
Sebastian Dröge 8d65deb7ed playbin-complex: Set fakesink as audio-sink to not use a real audio device
https://bugzilla.gnome.org/show_bug.cgi?id=705157
2013-08-13 13:44:21 +02:00
David Schleef b851a6dacc tests: move orc removal to distclean 2013-08-02 16:57:43 -07:00
Tim-Philipp Müller dbcf68abc9 tests: fix videoscale test after video format addition 2013-07-16 18:50:09 +01:00
Young-Ho Cha 6cea51c962 tests: update sami parser testcases
Remove libxml dependency for sami parser
and add more testcases.

https://bugzilla.gnome.org/show_bug.cgi?id=693056
2013-07-16 18:10:37 +01:00
Sebastian Dröge f2bc24a5a9 playbin: Fix assumptions in the unit test
Unused sinks are still set to READY now during autoplugging
to check their caps. Also playsink owns a ref to the sinks too.
2013-07-10 13:20:34 +02:00
Edward Hervey a9e4750674 pbutils: descriptions: Allow smart codec tag handling
We already have internally the information on what type of stream (audio,
video, container, subtitle, ...) a certain caps is.
Instead of forcing callers to specify which CODEC_TAG category a certain
caps is, use that information to make a smart choice.

Does not break previous behaviour of gst_pb_utils_add_codec_description_to_tag_list
(if tag is specified it will be used, if caps is invalid it will be rejected,
...).

https://bugzilla.gnome.org/show_bug.cgi?id=702215
2013-06-28 07:09:53 +02:00
Branko Subasic 4dd5c5b808 rtpbuffer: add gst_rtp_buffer_get_payload_bytes
The function gst_rtp_buffer_get_payload can not be used in Python
because it lacks necessary length parameter. This patch adds a new
function, gst_rtp_buffer_get_payload_bytes, to use from Python
bindings. The new function has the advisory "Rename to:" annotation
so it can replace the gst_rtp_buffer_get_payload whan creating
bindings.

The function gst_rtp_buffer_get_extension_bytes is also added. It wraps
gst_rtp_buffer_get_extension_data which doesn't work in Python due to
incomplete annotation and because it returns the length as number of
32-bit words.

https://bugzilla.gnome.org/show_bug.cgi?id=698562
2013-06-18 11:23:40 +02:00
Sreerenj Balachandran eabd2a5c7b tests: add more unit test for playbin
Add unit test for autoplugging of video_decoder/video_sink combination
based on capsfeatures.
2013-06-11 15:17:37 +02:00
Sebastian Dröge f763a2364f playbin: Rename compressed unit test to complex
It's not really about compressed streams anymore, but also
about stream switching and stream combiners.
2013-05-29 10:37:55 +02:00
Sebastian Dröge 0dee7777ff playbin: Set custom stream-combiners to NULL and unref before finalizing 2013-05-29 10:35:11 +02:00
Brendan Long f45a102c2c playbin: Add playbin audio-stream-combiner test using adder 2013-05-29 09:53:46 +02:00
Tim-Philipp Müller 1bc94d4aa3 tests: ignore new NV16 format in videoscale unit test
https://bugzilla.gnome.org/show_bug.cgi?id=700377
2013-05-16 11:09:11 +01:00
Sebastian Dröge d8a3895ac9 tests: Fix event order and missing events 2013-05-10 12:29:15 +02:00
Sebastian Dröge 341d67ea94 playbin-compressed: Fix unit test 2013-05-09 18:02:57 +02:00
Patricia Muscalu b9933dd6a3 tests: add SDP modify test
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=698558
2013-04-24 14:13:43 +02:00
Wim Taymans 1bf3176e26 tests: avoid sdp boxed test leak 2013-04-24 14:12:41 +02:00
Sebastian Dröge fbe295f275 streamsynchronizer: Create element with gst_element_factory_make()
Otherwise plugin_init() is not called and initialization is missing.
2013-04-24 11:11:41 +02:00
Thibault Saunier fbe80a688d adder: Do not try to wait for flush_stop after receiving a segment event
+ Add a simple test
2013-04-21 16:11:41 +02:00
Jose Antonio Santos Cadenas ba1e693853 sdp: add boxed type for GstSDPMessage
Also added some tests of this improvement.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=697808
2013-04-15 14:27:47 +02:00