Exemplo n.º 1
0
static GValue *
gst_gl_mixer_control_binding_proxy_get_value (GstControlBinding * binding,
    GstClockTime timestamp)
{
  GstGLMixerControlBindingProxy *self = (GstGLMixerControlBindingProxy *)
      binding;
  GstControlBinding *ref_binding;
  GValue *ret = NULL;

  ref_binding = gst_object_get_control_binding (self->ref_object,
      self->property_name);

  if (ref_binding) {
    ret = gst_control_binding_get_value (ref_binding, timestamp);
    gst_object_unref (ref_binding);
  }

  return ret;
}
Exemplo n.º 2
0
static gboolean
gst_gl_mixer_control_binding_proxy_sync_values (GstControlBinding * binding,
    GstObject * object, GstClockTime timestamp, GstClockTime last_sync)
{
  GstGLMixerControlBindingProxy *self = (GstGLMixerControlBindingProxy *)
      binding;
  GstControlBinding *ref_binding;
  gboolean ret = TRUE;

  ref_binding = gst_object_get_control_binding (self->ref_object,
      self->property_name);

  if (ref_binding) {
    ret = gst_control_binding_sync_values (ref_binding, self->ref_object,
        timestamp, last_sync);
    gst_object_unref (ref_binding);
  }

  return ret;
}
Exemplo n.º 3
0
static gboolean
gst_gl_mixer_control_binding_proxy_get_g_value_array (GstControlBinding *
    binding, GstClockTime timestamp, GstClockTime interval, guint n_values,
    GValue * values)
{
  GstGLMixerControlBindingProxy *self = (GstGLMixerControlBindingProxy *)
      binding;
  GstControlBinding *ref_binding;
  gboolean ret = FALSE;

  ref_binding = gst_object_get_control_binding (self->ref_object,
      self->property_name);

  if (ref_binding) {
    ret = gst_control_binding_get_g_value_array (ref_binding, timestamp,
        interval, n_values, values);
    gst_object_unref (ref_binding);
  }

  return ret;
}
Exemplo n.º 4
0
static void
test_bt_machine_set_defaults (BT_TEST_ARGS)
{
  BT_TEST_START;
  GST_INFO ("-- arrange --");
  BtMachine *machine = BT_MACHINE (bt_source_machine_new (song, "id",
          "buzztrax-test-mono-source", 0, NULL));
  GstObject *element =
      (GstObject *) check_gobject_get_object_property (machine, "machine");
  GstControlBinding *cb = gst_object_get_control_binding (element, "g-uint");
  g_object_set (element, "g-uint", 10, NULL);

  GST_INFO ("-- act --");
  bt_machine_set_param_defaults (machine);

  GST_INFO ("-- assert --");
  GValue *val = gst_control_binding_get_value (cb, G_GUINT64_CONSTANT (0));
  guint uval = g_value_get_uint (val);
  ck_assert_int_eq (uval, 10);

  GST_INFO ("-- cleanup --");
  gst_object_unref (element);
  BT_TEST_END;
}