-If you are looking for informations on how to use gst-qa -> docs/qa-usage.txt
-If you are looking for informations on gst-qa design -> docs/qa-design.txt
+If you are looking for informations on how to use gst-validate -> docs/validate-usage.txt
+If you are looking for informations on gst-validate design -> docs/validate-design.txt
-scenariosdir=${datadir}/gstreamer-$(GST_API_VERSION)/qa-scenario
+scenariosdir=${datadir}/gstreamer-$(GST_API_VERSION)/validate-scenario
scenarios_DATA = simple_seeks.scenario \
seek_forward.scenario \
seek_backward.scenario \
+++ /dev/null
-=== Testing with monitors
-
-Using gst-qa monitors is quite simple, there are 2 ways to test your
-pipeline/element.
-
-== Creating the monitors yourself
-This method requires writing a specific application (or modifying yours) to
-add GstQaMonitors and GstQaRunner to it. Create a GstQaRunner with
-gst_qa_runner_new, then use gst_qa_monitor_factory_create to create monitors
-for your pipeline.
-
-Now all you have to do is use your pipeline as usual, the reports will be
-created and posted to the runner. You can list them after the pipeline
-finishes to look at the issues found.
-
-== Using LD_PRELOAD and an existing application
-If you want to test an already existing application without modifying it. Just
-use:
-
-LD_PRELOAD=path/to/libgstqa.so yourapp ...
-
-gst-qa will try to replace GstPipeline creating functions and already
-configure runners and monitors for you, reports will be printed to stderr when
-they are found.
-
-
-=== Using the file checker
-The GstQaFileChecker is a convenient API to compare a media file properties
-with its expected properties. The uri of the file to be tested and the
-expected values can be configured via gobject properties.
-gst_qa_file_checker_run is used to start the tests.
-
-There is also a convenience tool (gst-qa-file-check) that can be used to
-run the file checker.
== Main components
-Gst-qa is composed of 4 parts: the issues, the reports, the runner and the
-reporters.
+Gst-validate is composed of 4 parts: the issues, the reports, the runner and
+the reporters.
= Issue
-Gst-QA's main target is finding problems in GStreamer elements/pipelines. To
-make it easier to track down exactly what happens, the tests run by Gst-QA use
-an extensible list of 'Issues'. Each Issue describes a potential error
-situation and has an unique ID and a severity level.
+Gst-Validate's main target is finding problems in GStreamer elements/pipelines.
+To make it easier to track down exactly what happens, the tests run by
+Gst-Validate use an extensible list of 'Issues'. Each Issue describes a
+potential error situation and has an unique ID and a severity level.
The issues list can be extended by 3rd party libraries if specific needs
should be met.
= Reporters
-A reporter is the object that implements the GstQaReporter interface and is
-responsible for performing tests on some target element/scenario. The reporter
-is able to create 'Reports' whenever a test it executes fails.
+A reporter is the object that implements the GstValidateReporter interface and
+is responsible for performing tests on some target element/scenario. The
+reporter is able to create 'Reports' whenever a test it executes fails.
= Reports
-The GstQaReports are created whenever a test fails, they are posted to the
-stderr and also are posted to the GstQaRunner for accumulation.
+The GstValidateReports are created whenever a test fails, they are posted to the
+stderr and also are posted to the GstValidateRunner for accumulation.
Each report contains information about the object that generated the issue,
the issue associated with the report and a specific debug message for the case,
this helps tracking down the problem and fixing it.
= Runner
-The GstQaRunner is the point of communication for the app to gst-qa
+The GstValidateRunner is the point of communication for the app to gst-validate
monitoring. It provides an API to gather reports and to make them acessible
to the application.
attach to their data flow handling functions to be able to intercept the data
and compare it with the expected behaviors. There are 3 types of monitors:
- * GstQaElementMonitor
- * GstQaBinMonitor
- * GstQaPadMonitor
+ * GstValidateElementMonitor
+ * GstValidateBinMonitor
+ * GstValidatePadMonitor
-All 3 inherit from the base GstQaMonitor class. Their name suggest what they
-monitor and they have a relationship to their children and parents. A bin
+All 3 inherit from the base GstValidateMonitor class. Their name suggest what
+they monitor and they have a relationship to their children and parents. A bin
monitor has, possibly, child element monitors and element monitors have child
pad monitors. The monitors are responsible for listening to new children added
to their monitored object and creating monitors for them. For example, element
monitors listen to element's pad-added signal and create pad monitors whenever
a new pad is added.
-Most (if not all) the checks are implemented at the GstQaPadMonitor, as it is
-where the data flow happens.
+Most (if not all) the checks are implemented at the GstValidatePadMonitor,
+as it is where the data flow happens.
= FileChecker
The file checker is another reporter that is used to make sure a file has a
--- /dev/null
+=== Testing with monitors
+
+Using gst-validate monitors is quite simple, there are 2 ways to test your
+pipeline/element.
+
+== Creating the monitors yourself
+This method requires writing a specific application (or modifying yours) to
+add GstValidateMonitors and GstValidateRunner to it. Create a GstValidateRunner
+with gst_validate_runner_new, then use gst_validate_monitor_factory_create to
+create monitors for your pipeline.
+
+Now all you have to do is use your pipeline as usual, the reports will be
+created and posted to the runner. You can list them after the pipeline
+finishes to look at the issues found.
+
+== Using LD_PRELOAD and an existing application
+If you want to test an already existing application without modifying it. Just
+use:
+
+LD_PRELOAD=path/to/libgstvalidatepreload.so yourapp ...
+
+gst-validate will try to replace GstPipeline creating functions and already
+configure runners and monitors for you, reports will be printed to stderr when
+they are found.
+
+
+=== Using the file checker
+The GstValidateFileChecker is a convenient API to compare a media file
+properties with its expected properties. The uri of the file to be tested and
+the expected values can be configured via gobject properties.
+gst_validate_file_checker_run is used to start the tests.
+
+There is also a convenience tool (gst-validate-file-check) that can be used to
+run the file checker.
static gboolean gst_validate_bin_monitor_setup (GstValidateMonitor * monitor);
static void
-_qa_bin_element_added (GstBin * bin, GstElement * pad,
+_validate_bin_element_added (GstBin * bin, GstElement * pad,
GstValidateBinMonitor * monitor);
static void
{
GstValidateBinMonitor *monitor =
g_object_new (GST_TYPE_VALIDATE_BIN_MONITOR, "object",
- bin, "qa-runner", runner, "qa-parent", parent, NULL);
+ bin, "validate-runner", runner, "validate-parent", parent, NULL);
if (GST_VALIDATE_MONITOR_GET_OBJECT (monitor) == NULL) {
g_object_unref (monitor);
bin_monitor->element_added_id =
g_signal_connect (bin, "element-added",
- G_CALLBACK (_qa_bin_element_added), monitor);
+ G_CALLBACK (_validate_bin_element_added), monitor);
iterator = gst_bin_iterate_elements (bin);
done = FALSE;
}
static void
-_qa_bin_element_added (GstBin * bin, GstElement * element,
+_validate_bin_element_added (GstBin * bin, GstElement * element,
GstValidateBinMonitor * monitor)
{
g_return_if_fail (GST_VALIDATE_ELEMENT_MONITOR_GET_ELEMENT (monitor) ==
* monitor);
static void
-_qa_element_pad_added (GstElement * element, GstPad * pad,
+_validate_element_pad_added (GstElement * element, GstPad * pad,
GstValidateElementMonitor * monitor);
static void
g_return_val_if_fail (element != NULL, NULL);
monitor = g_object_new (GST_TYPE_VALIDATE_ELEMENT_MONITOR, "object", element,
- "qa-runner", runner, "qa-parent", parent, NULL);
+ "validate-runner", runner, "validate-parent", parent, NULL);
if (GST_VALIDATE_ELEMENT_MONITOR_GET_ELEMENT (monitor) == NULL) {
g_object_unref (monitor);
gst_validate_element_monitor_inspect (elem_monitor);
elem_monitor->pad_added_id = g_signal_connect (element, "pad-added",
- G_CALLBACK (_qa_element_pad_added), monitor);
+ G_CALLBACK (_validate_element_pad_added), monitor);
iterator = gst_element_iterate_pads (element);
done = FALSE;
}
static void
-_qa_element_pad_added (GstElement * element, GstPad * pad,
+_validate_element_pad_added (GstElement * element, GstPad * pad,
GstValidateElementMonitor * monitor)
{
g_return_if_fail (GST_VALIDATE_ELEMENT_MONITOR_GET_ELEMENT (monitor) ==
GST_TYPE_OBJECT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_RUNNER,
- g_param_spec_object ("qa-runner", "VALIDATE Runner",
+ g_param_spec_object ("validate-runner", "VALIDATE Runner",
"The Validate runner to " "report errors to",
GST_TYPE_VALIDATE_RUNNER,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_VALIDATE_PARENT,
- g_param_spec_object ("qa-parent", "VALIDATE parent monitor",
+ g_param_spec_object ("validate-parent", "VALIDATE parent monitor",
"The Validate monitor " "that is the parent of this one",
GST_TYPE_VALIDATE_MONITOR,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
GstValidateElementMonitor * parent)
{
GstValidatePadMonitor *monitor = g_object_new (GST_TYPE_VALIDATE_PAD_MONITOR,
- "object", pad, "qa-runner", runner, "qa-parent",
+ "object", pad, "validate-runner", runner, "validate-parent",
parent, NULL);
if (GST_VALIDATE_PAD_MONITOR_GET_PAD (monitor) == NULL) {
otherpad = g_value_get_object (&value);
GST_DEBUG_OBJECT (monitor->pad, "Checking pad %s:%s input timestamps",
GST_DEBUG_PAD_NAME (otherpad));
- othermonitor = g_object_get_data ((GObject *) otherpad, "qa-monitor");
+ othermonitor =
+ g_object_get_data ((GObject *) otherpad, "validate-monitor");
GST_VALIDATE_MONITOR_LOCK (othermonitor);
if (gst_validate_pad_monitor_timestamp_is_in_received_range
(othermonitor, ts)
otherpad = g_value_get_object (&value);
peerpad = gst_pad_get_peer (otherpad);
if (peerpad) {
- othermonitor = g_object_get_data ((GObject *) peerpad, "qa-monitor");
+ othermonitor =
+ g_object_get_data ((GObject *) peerpad, "validate-monitor");
if (othermonitor) {
found_a_pad = TRUE;
GST_VALIDATE_MONITOR_LOCK (othermonitor);
switch (gst_iterator_next (iter, &value)) {
case GST_ITERATOR_OK:
otherpad = g_value_get_object (&value);
- othermonitor = g_object_get_data ((GObject *) otherpad, "qa-monitor");
+ othermonitor =
+ g_object_get_data ((GObject *) otherpad, "validate-monitor");
if (othermonitor) {
SerializedEventData *data = g_slice_new0 (SerializedEventData);
data->timestamp = last_ts;
switch (gst_iterator_next (iter, &value)) {
case GST_ITERATOR_OK:
otherpad = g_value_get_object (&value);
- othermonitor = g_object_get_data ((GObject *) otherpad, "qa-monitor");
+ othermonitor =
+ g_object_get_data ((GObject *) otherpad, "validate-monitor");
if (othermonitor) {
GST_VALIDATE_MONITOR_LOCK (othermonitor);
g_assert (othermonitor->pending_setcaps_fields != NULL);
switch (gst_iterator_next (iter, &value)) {
case GST_ITERATOR_OK:
otherpad = g_value_get_object (&value);
- othermonitor = g_object_get_data ((GObject *) otherpad, "qa-monitor");
+ othermonitor =
+ g_object_get_data ((GObject *) otherpad, "validate-monitor");
if (othermonitor) {
GST_VALIDATE_MONITOR_LOCK (othermonitor);
g_assert (othermonitor->pending_setcaps_fields != NULL);
switch (gst_iterator_next (iter, &value)) {
case GST_ITERATOR_OK:
otherpad = g_value_get_object (&value);
- othermonitor = g_object_get_data ((GObject *) otherpad, "qa-monitor");
+ othermonitor =
+ g_object_get_data ((GObject *) otherpad, "validate-monitor");
GST_VALIDATE_MONITOR_LOCK (othermonitor);
if (othermonitor->expected_segment) {
GST_VALIDATE_REPORT (othermonitor, EVENT_NEWSEGMENT_NOT_PUSHED, "");
GstBuffer * buffer)
{
GstValidatePadMonitor *pad_monitor =
- g_object_get_data ((GObject *) pad, "qa-monitor");
+ g_object_get_data ((GObject *) pad, "validate-monitor");
GstFlowReturn ret;
GST_VALIDATE_PAD_MONITOR_PARENT_LOCK (pad_monitor);
GstEvent * event)
{
GstValidatePadMonitor *pad_monitor =
- g_object_get_data ((GObject *) pad, "qa-monitor");
+ g_object_get_data ((GObject *) pad, "validate-monitor");
gboolean ret;
GST_VALIDATE_PAD_MONITOR_PARENT_LOCK (pad_monitor);
GstEvent * event)
{
GstValidatePadMonitor *pad_monitor =
- g_object_get_data ((GObject *) pad, "qa-monitor");
+ g_object_get_data ((GObject *) pad, "validate-monitor");
gboolean ret;
GST_VALIDATE_MONITOR_LOCK (pad_monitor);
GstQuery * query)
{
GstValidatePadMonitor *pad_monitor =
- g_object_get_data ((GObject *) pad, "qa-monitor");
+ g_object_get_data ((GObject *) pad, "validate-monitor");
gboolean ret;
gst_validate_pad_monitor_query_overrides (pad_monitor, query);
GstPadMode mode, gboolean active)
{
GstValidatePadMonitor *pad_monitor =
- g_object_get_data ((GObject *) pad, "qa-monitor");
+ g_object_get_data ((GObject *) pad, "validate-monitor");
gboolean ret = TRUE;
/* TODO add overrides for activate func */
guint64 offset, guint size, GstBuffer ** buffer)
{
GstValidatePadMonitor *pad_monitor =
- g_object_get_data ((GObject *) pad, "qa-monitor");
+ g_object_get_data ((GObject *) pad, "validate-monitor");
gboolean ret;
ret = pad_monitor->getrange_func (pad, parent, offset, size, buffer);
return ret;
pad = GST_VALIDATE_PAD_MONITOR_GET_PAD (pad_monitor);
- if (g_object_get_data ((GObject *) pad, "qa-monitor")) {
- GST_WARNING_OBJECT (pad_monitor, "Pad already has a qa-monitor associated");
+ if (g_object_get_data ((GObject *) pad, "validate-monitor")) {
+ GST_WARNING_OBJECT (pad_monitor,
+ "Pad already has a validate-monitor associated");
return FALSE;
}
- g_object_set_data ((GObject *) pad, "qa-monitor", pad_monitor);
+ g_object_set_data ((GObject *) pad, "validate-monitor", pad_monitor);
pad_monitor->pad = pad;
gst_validate_reporter_default_init (GstValidateReporterInterface * iface)
{
g_object_interface_install_property (iface,
- g_param_spec_object ("qa-runner", "VALIDATE Runner",
+ g_param_spec_object ("validate-runner", "Validate Runner",
"The Validate runner to " "report errors to",
GST_TYPE_VALIDATE_RUNNER,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GST_TYPE_VALIDATE_SCENARIO, GstValidateScenarioPrivate))
#define GST_VALIDATE_SCENARIO_SUFFIX ".scenario"
-#define GST_VALIDATE_SCENARIO_DIRECTORY "qa-scenario"
+#define GST_VALIDATE_SCENARIO_DIRECTORY "validate-scenario"
#define DEFAULT_SEEK_TOLERANCE (0.1 * GST_SECOND) /* tolerance seek interval
TODO make it overridable */
object_class->set_property = gst_validate_scenario_set_property;
g_object_class_install_property (object_class, PROP_RUNNER,
- g_param_spec_object ("qa-runner", "VALIDATE Runner",
+ g_param_spec_object ("validate-runner", "VALIDATE Runner",
"The Validate runner to " "report errors to",
GST_TYPE_VALIDATE_RUNNER,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
{
GstBus *bus;
GstValidateScenario *scenario =
- g_object_new (GST_TYPE_VALIDATE_SCENARIO, "qa-runner",
+ g_object_new (GST_TYPE_VALIDATE_SCENARIO, "validate-runner",
runner, NULL);
GST_LOG ("Creating scenario %s", scenario_name);