Commit graph

1006 commits

Author SHA1 Message Date
Thiago Santos
a395133aa2 qa-report: fix typo on assertion comparison 2013-07-31 15:00:33 -03:00
Vincent Penquerc'h
3a419c3fd8 gst-qa-element-monitor: do not bypass monitor factory
A pad monitor was created directly. Prefer going through the
factory.
2013-07-31 08:10:42 -03:00
Vincent Penquerc'h
5356f10644 gst-qa-reporter: fix use of uninitialized repeat field 2013-07-31 08:10:40 -03:00
Vincent Penquerc'h
711fa22a49 gst-qa-reporter: fix report leak when discarding repeated report 2013-07-31 08:10:37 -03:00
Vincent Penquerc'h
dbcbcfa868 gst-qa: fix build in po
Using a lot of grep and some cargo culting.
2013-07-31 08:10:28 -03:00
Vincent Penquerc'h
16bbbb5733 gst-qa: make tools depend on libraries
This fixes parallel build randomly breaking.
2013-07-31 08:10:27 -03:00
Thiago Santos
76679b1c7e qa-report: expose API for adding custom issues
expose gst_qa_issue_register and gst_qa_issue_new to allow applications
to register their own custom issues.

Issues IDs should use Areas higher than GST_QA_AREA_OTHER for custom
areas. And to add more issues to existing areas, the IDs should be
higher than GST_QA_ISSUE_ID_CUSTOM_FIRST.

Custom issues registering should be done at startup and from the same
thread as there is no locking around the issues hashtable
2013-07-30 17:07:13 -03:00
Thiago Santos
2034fb11d9 Fix typos 2013-07-30 16:21:15 -03:00
Thiago Santos
4e9bedcde8 qa-runner: Remove printing API from qa-runner
Replace it with functions to list the reports
2013-07-30 16:20:49 -03:00
Vincent Penquerc'h
4456e24cdf pad-monitor: fix NULL format string
An empty message should be an empty string.
2013-07-30 13:55:14 -03:00
Thiago Santos
2eba57d387 qa-runner: removing _setup call
Do setup on the _new function directly instead of having a separate
call for that
2013-07-30 10:21:32 -03:00
Thiago Santos
044084949a qa-override: add more pad overrides for buffer probe and caps
Add override functions for custom checking of buffer probe and
getcaps/setcaps functions.
2013-07-30 09:57:20 -03:00
Thiago Santos
55109ae7f9 pad-monitor: call the event/query/buffer overrides
Use the new event/buffer/query overrides to allow custom checks
on those scenarios
2013-07-30 09:41:06 -03:00
Thiago Santos
8a66b3d4ed qa-override: add callbacks for query/buffer/event functions
Add callbacks for pad event/buffer/query functions in case the
override wants to do additional checks
2013-07-30 09:41:05 -03:00
Vincent Penquerc'h
7fedf5a111 gst-qa-override-registry: load overrides dynamically
Shared objects listed in GST_QA_OVERRIDE are loaded on startup,
and the symbol gst_qa_create_overrides is run. It should create
any override needed. While it can do anything it wants, this
is discouraged.

GST_QA_OVERRIDE should be a comma separated list of shared objects,
any relative paths should be from the current working directory
at the time they are loaded (ie, if the process to be traced
changes cwd, use absolute paths).

No attempt whatsoever is made at not running what was not meant.

Includes a sample shared object for illustration purposes.
2013-07-30 09:41:00 -03:00
Thiago Santos
09fda8bbd2 qa-override-registry: register overrides by gtype and klass
Overrides can now be registerd by gtype, meaning that they will
be attached to monitors that the target is of the requested type.

Also by element klass, that will check that the element has the
selected class in its details
2013-07-29 13:17:50 -03:00
Thiago Santos
e0d041d67b qa-monitor: implement intercept_report
It is used to iterate over overrides and modify the report level if
the overrides wants to do so.

Also adds a new mutex only for the overrides to avoid deadlocks when
reporting if we used the same lock for iterating the overrides
2013-07-29 12:01:02 -03:00
Thiago Santos
f7d7d093e3 qa-reporter: fix copy n paste left over 2013-07-29 11:35:20 -03:00
Thiago Santos
79e7392a9c qa-reporter: add function for intercepting reports
after report creation, this function is called and implementers can
modify the report to their liking before it is posted to the runner
2013-07-29 11:34:42 -03:00
Vincent Penquerc'h
6e19324584 qa-monitor: chain gst_qa_monitor_finalize to parent's finalize
It was chaining to the parent's dispose.
2013-07-29 10:46:29 -03:00
Thiago Santos
3a13d59a1d gst-qa-report: put the correct format to avoid compiler warnings 2013-07-29 10:06:48 -03:00
Vincent Penquerc'h
2bac08370c i18n: copy necessary files in-tree 2013-07-29 09:57:25 -03:00
Vincent Penquerc'h
1c053ffda7 GstIssueId: make this uintptr_t
As it's used a a placeholder pointer for g_hash_table use,
it needs to be converted back and forth to a pointer.
2013-07-29 09:56:45 -03:00
Thiago Santos
dbc61a88b6 gst-qa-override-registry: adding the override-registry
This registry should contain the list of GstQaOverride to
be used on the pipelines being monitored
2013-07-29 09:53:54 -03:00
Thiago Santos
794ea2652d qa-override: adds qa-override that can change the report level of issues
Useful for customizing the level of issues for particular elements/tests
when they are more relevant or have to be disabled
2013-07-26 12:16:29 -03:00
Thiago Santos
773d8adc5e qa-report: splitting a GstQaReport into a GstQaIssue and GstQaReport
Reports now point to Issues, that are uniquely identified and have
translatable descriptions. This way we are going to be able to uniquely
identify the issues and applications can enable/disable checks for
specific elements.
2013-07-26 12:16:29 -03:00
Thibault Saunier
1e1e0b922e qa: Make it possible to set a scenario from the command line in test apps 2013-07-25 16:58:15 -03:00
Thibault Saunier
382fcc9a01 qa: Properly set reporter's runner reference
That was never set, but it is needed for the reporter to properly add
reports to the runner.
We still keep a reference on the monitor to make things simpler
2013-07-25 16:58:14 -03:00
Thibault Saunier
d804ad475a reporter: Use Gst debugging log in the _report method directly
Using __VALIST__ was not properly working
+ Add a gstqareporter debug category
2013-07-25 16:58:14 -03:00
Thibault Saunier
4fb8f47770 scenario: Implement the GstQaReporter interface and make use of it
This way we can report issues from a scenario
Also add a Seek aread to the known areas list

We now need to pass the runner to the scenario instead of the
pipeline as the GstQaReporter interface needs it.
2013-07-25 16:58:13 -03:00
Thibault Saunier
4992249848 qa: Add a GstQaReporter interface that objects needing reporting can implement
Various type of object should be able to do some reporting, so we have
to make sure all the code to do that is in one place. Creating an interface
makes it simple to share information and it avoid to have a baseclass for
something that is not actually important enough to create a baseclass.

Conflicts:
	gst/qa/gst-qa-pad-monitor.c
2013-07-25 16:57:44 -03:00
Thibault Saunier
7508e35b7e qa: Add a GstQaScenario class making it possible to execute scenarios
A scenario correspond to a suite of action to execute on a pipeline,
for the time being, we only support seeking the pipeline, but in the
future we can imagine doing some queries, setting pipeline state, etc...

The scenario can be loaded thanks to the GST_QA_SCENARIO environment
variable, making it usable with any existant application, in case, the
application can be used interactively, the user should either, not load
any scenario or let the application run without interacting with it.
2013-07-25 16:56:40 -03:00
Thiago Santos
4a3f06885a pad-monitor: add lots of locking
When handling elements that spawn multiple threads (hardware
enc/decoders), the pad monitor has to protect its variables specially
because some checks involve iterating over internally linked pads to
add/get some data for comparison (expected events, timestamp ranges,
caps).

Aside from locking its own mutex, the pad monitor can also lock the
parent's mutex when it needs to use data from its internally linked
pads. The locking order should always be parent and then individual
pad-monitor mutexes. This should prevent deadlocks when multiple
pad-monitors from the same element start doing checks at the same time
from different threads.
2013-07-24 16:16:07 -03:00
Thiago Santos
48c49f5071 pad-monitor: remove already solved TODOs 2013-07-24 10:05:31 -03:00
Thiago Santos
887afecc22 pad-monitor: accept unexpected flow return if pad is eos
Track eos event and mark that pad as eos so that checking for the
flow return knows when 'unexpected' is acceptable
2013-07-24 10:05:23 -03:00
Thiago Santos
b5f31f0c8c pad-monitor: improve caps proxying check on getcaps
Only check if fields are proxied for sink getcaps as it is when
downstream restrictions should be proxied. Also improve the
fields comparison to handle single value x multi value
(list/array/range) contain relations.
2013-07-23 15:18:51 -03:00
Thiago Santos
6ebded71e2 pad-monitor: improve type conformance checking for caps
Replace the macro with a more powerful variadic function that can
check for more acceptable types for the same caps.

This removes a few more false positives
2013-07-23 15:16:35 -03:00
Thiago Santos
c9955c14e4 pad-monitor: only expect a new segment if pad is running on push mode
For pull mode, it should just provide the buffers, regardless of getting
a new segment or not
2013-07-23 12:52:22 -03:00
Edward Hervey
d7b2977657 gst-qa: show help and exit when no arguments are provided
Instead of attempting to create empty pipelines and weird things
happening :)
2013-07-23 12:14:26 -03:00
Thiago Santos
04b3517e41 pad-monitor: fix flushes checking
flush events shouldn't fail, so we don't need to rollback when it
returns false from downstream (this is common when downstream is still
not-linked) and it would cause gst-qa to spit false positives.

Also refactor the common event handling for both sink and src event
functions into a common place. Currently we handle flushes the same
for both pad's directions
2013-07-23 12:11:08 -03:00
Thiago Santos
d8fa81eeff pad-monitor: only merge caps if they exist
Downtream can not be linked, so we shouldn't try to merge
NULL caps
2013-07-23 11:51:07 -03:00
Thiago Santos
b58a7e533d configure: add nano version to enable Werror 2013-07-22 20:50:02 -03:00
Thiago Santos
11cc2e6b3b pad-monitor: fix expected setcaps fields comparison
Use the correct structure when getting the GValues and print different
messages for missing and different fields on the setcaps caps
2013-07-22 20:09:35 -03:00
Thiago Santos
363de0e555 pad-monitor: improve timestamp ranges comparison message a little
Show the buffer range that is being compared.
2013-07-22 20:09:07 -03:00
Thiago Santos
e94427e639 pad-monitor: add check for serialized events order
Store expected serialized events and their 'timestamps' to check if
they are pushed in the same order/time as they were received
2013-07-22 15:05:04 -03:00
Thiago Santos
c650034fb4 pad-monitor: add check for setcaps passing audio/video fields
Checks that the common audio/video fields are correctly passed
downstream after a setcaps
2013-07-22 09:50:23 -03:00
Thiago Santos
0aaf23cb0f pad-monitor: add check for getcaps proxying audio/video fields
Checks that the common audio/video fields are correctly proxied by
the elements after a getcaps
2013-07-19 16:52:45 -03:00
Thiago Santos
694935fdea element-monitor: add is_encoder flag
Easy access to knowing if the monitored element is an encoder
2013-07-19 16:52:11 -03:00
Thibault Saunier
ab98bd242e qa-transcoding: Add a binary program to easily test transcoding 2013-07-19 11:16:47 -03:00
Thibault Saunier
799b7a8c3e monitor(s): Avoid trying to disconnect handlers on instances that do not exist anymore 2013-07-19 11:15:54 -03:00