Esempio n. 1
0
static Suite *
gst_validate_suite (void)
{
  Suite *s = suite_create ("registry");
  TCase *tc_chain = tcase_create ("registry");
  suite_add_tcase (s, tc_chain);

  gst_validate_init ();

  tcase_add_test (tc_chain, check_text_overrides);

  gst_validate_deinit ();
  return s;
}
Esempio n. 2
0
static GObject *
gst_validate_runner_constructor (GType type, guint n_construct_params,
    GObjectConstructParam * construct_params)
{
  GObject *runner = G_OBJECT_CLASS (parent_class)->constructor (type,
      n_construct_params, construct_params);

  if (!gst_validate_is_initialized ()) {
    first_runner = GST_VALIDATE_RUNNER (runner);
    gst_validate_init ();
    first_runner = NULL;

    return runner;
  }

  return runner;
}
gboolean
ges_validate_activate (GstPipeline * pipeline, const gchar * scenario, gboolean activate_before_paused)
{
  GstValidateRunner *runner = NULL;
  GstValidateMonitor *monitor = NULL;

  const gchar *move_clip_mandatory_fields[] = { "clip-name", "position",
    NULL
  };

  const gchar *set_child_property_mandatory_fields[] =
      { "element-name", "property", "value", NULL };

  const gchar *serialize_project_mandatory_fields[] = { "uri",
    NULL
  };

  const gchar *add_asset_mandatory_fields[] = { "id", "type",
    NULL
  };

  const gchar *remove_asset_mandatory_fields[] = { "id", "type",
    NULL
  };

  const gchar *add_layer_mandatory_fields[] = { "priority",
    NULL
  };

  const gchar *remove_layer_mandatory_fields[] = { "priority",
    NULL
  };

  const gchar *add_clip_mandatory_fields[] = { "name", "layer-priority",
    "asset-id", "type",
    NULL
  };

  const gchar *remove_clip_mandatory_fields[] = { "name",
    NULL
  };

  gst_validate_init ();

  if (scenario) {
    if (g_strcmp0 (scenario, "none")) {
      gchar *scenario_name = g_strconcat (scenario, "->gespipeline*", NULL);
      g_setenv ("GST_VALIDATE_SCENARIO", scenario_name, TRUE);
      g_free (scenario_name);
    }
  }

  gst_validate_add_action_type ("edit-clip", _edit_clip,
      move_clip_mandatory_fields, "Allows to seek into the files", FALSE);
  gst_validate_add_action_type ("add-asset", _add_asset,
      add_asset_mandatory_fields, "Allows to add an asset to the current project", FALSE);
  gst_validate_add_action_type ("remove-asset", _remove_asset,
      remove_asset_mandatory_fields, "Allows to remove an asset from the current project", FALSE);
  gst_validate_add_action_type ("add-layer", _add_layer,
      add_layer_mandatory_fields, "Allows to add a layer to the current timeline", FALSE);
  gst_validate_add_action_type ("remove-layer", _remove_layer,
      remove_layer_mandatory_fields, "Allows to remove a layer from the current timeline", FALSE);
  gst_validate_add_action_type ("add-clip", _add_clip,
      add_clip_mandatory_fields, "Allows to add a clip to a given layer", FALSE);
  gst_validate_add_action_type ("remove-clip", _remove_clip,
      remove_clip_mandatory_fields, "Allows to remove a clip from a given layer", FALSE);
  gst_validate_add_action_type ("serialize-project", _serialize_project,
      serialize_project_mandatory_fields, "serializes a project", FALSE);

  gst_validate_add_action_type ("set-child-property", _set_child_property,
      set_child_property_mandatory_fields,
      "Allows to change child property of an object", FALSE);

  runner = gst_validate_runner_new ();
  g_signal_connect (runner, "report-added",
      G_CALLBACK (_validate_report_added_cb), pipeline);
  monitor =
      gst_validate_monitor_factory_create (GST_OBJECT_CAST (pipeline), runner,
      NULL);

  g_object_set (monitor, "stateless", activate_before_paused, NULL);
  g_object_set_data (G_OBJECT (pipeline), MONITOR_ON_PIPELINE, monitor);
  g_object_set_data (G_OBJECT (pipeline), RUNNER_ON_PIPELINE, runner);

  return TRUE;
}