Esempio n. 1
0
static void kr_ebml_to_mixer_rep (kr_ebml2_t *ebml, kr_mixer_t *mixer_rep) {
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &mixer_rep->sample_rate);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &mixer_rep->inputs);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &mixer_rep->outputs);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &mixer_rep->buses);
  kr_ebml2_unpack_element_string (ebml, NULL, mixer_rep->time_source, sizeof(mixer_rep->time_source));
}
Esempio n. 2
0
static int kr_ebml_to_mixer_portgroup_rep (kr_ebml2_t *ebml, kr_mixer_portgroup_t *portgroup_rep) {

  int i;
  char string[256];

  kr_ebml2_unpack_element_string (ebml, NULL, portgroup_rep->sysname, sizeof(portgroup_rep->sysname));
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &portgroup_rep->channels);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &portgroup_rep->direction);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &portgroup_rep->output_type);

  kr_ebml2_unpack_element_string (ebml, NULL, string, sizeof(string));

  if (strncmp (string, "Jack", 4) == 0) {
    portgroup_rep->io_type = 0;
  } else {
    portgroup_rep->io_type = 1;    
  }
  
  for (i = 0; i < portgroup_rep->channels; i++) {
    kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->volume[i]);
  }
  
  for (i = 0; i < portgroup_rep->channels; i++) {
    kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->peak[i]);
  }
  
  for (i = 0; i < portgroup_rep->channels; i++) {
    kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->rms[i]);
  }

  kr_ebml2_unpack_element_string (ebml, NULL, portgroup_rep->mixbus, sizeof(portgroup_rep->mixbus));
  kr_ebml2_unpack_element_string (ebml, NULL, portgroup_rep->crossfade_group, sizeof(portgroup_rep->crossfade_group));
  kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->fade);

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &portgroup_rep->has_xmms2);
  
  if (portgroup_rep->has_xmms2 == 1) {
    kr_ebml2_unpack_element_string (ebml, NULL, portgroup_rep->xmms2_ipc_path, sizeof(portgroup_rep->xmms2_ipc_path));
  }
  
  kr_ebml2_unpack_element_data (ebml, NULL, &portgroup_rep->eq, sizeof (portgroup_rep->eq));
  
  kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->lowpass.hz);
  kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->lowpass.bandwidth);
  
  kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->highpass.hz);
  kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->highpass.bandwidth);
  
  kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->analog.drive);
  kr_ebml2_unpack_element_float (ebml, NULL, &portgroup_rep->analog.blend);

  return 1;
}
Esempio n. 3
0
static void kr_ebml_to_sprite_rep (kr_ebml2_t *ebml, kr_sprite_t *sprite) {

  kr_ebml2_unpack_element_string (ebml, NULL, sprite->filename, sizeof(sprite->filename));

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &sprite->controls.x);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &sprite->controls.y);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &sprite->controls.z);
  
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &sprite->controls.tickrate);

  kr_ebml2_unpack_element_float (ebml, NULL, &sprite->controls.xscale);
  kr_ebml2_unpack_element_float (ebml, NULL, &sprite->controls.yscale);

  kr_ebml2_unpack_element_float (ebml, NULL, &sprite->controls.opacity);
  kr_ebml2_unpack_element_float (ebml, NULL, &sprite->controls.rotation);
}
Esempio n. 4
0
static void kr_ebml_to_text_rep (kr_ebml2_t *ebml, kr_text_t *text) {
  
  kr_ebml2_unpack_element_string (ebml, NULL, text->text, sizeof(text->text));
  kr_ebml2_unpack_element_string (ebml, NULL, text->font, sizeof(text->font));

  kr_ebml2_unpack_element_float (ebml, NULL, &text->red);
  kr_ebml2_unpack_element_float (ebml, NULL, &text->green);
  kr_ebml2_unpack_element_float (ebml, NULL, &text->blue);

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &text->controls.x);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &text->controls.y);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &text->controls.z);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &text->controls.width);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &text->controls.height);      

  kr_ebml2_unpack_element_float (ebml, NULL, &text->controls.xscale);
  kr_ebml2_unpack_element_float (ebml, NULL, &text->controls.opacity);
  kr_ebml2_unpack_element_float (ebml, NULL, &text->controls.rotation);
}
Esempio n. 5
0
static void kr_ebml_to_compositor_rep (kr_ebml2_t *ebml, kr_compositor_t *kr_compositor_rep) {

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->width);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->height);

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->fps_numerator);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->fps_denominator);

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->sprites);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->texts);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->vectors);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->inputs);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &kr_compositor_rep->outputs);
  kr_ebml2_unpack_element_uint64 (ebml, NULL, &kr_compositor_rep->frames);

  kr_ebml2_unpack_element_string (ebml, NULL, kr_compositor_rep->background_filename,
                                  sizeof(kr_compositor_rep->background_filename));
}
int kr_mixer_info_fr_ebml(kr_ebml *ebml, void *st) {
  int res;
  struct kr_mixer_info *actual;

  res = 0;

  if ((ebml == NULL) || (st == NULL)) {
    return -1;
  }

  actual = (struct kr_mixer_info *)st;

  res += kr_ebml2_unpack_element_uint32(ebml, NULL, &actual->period_size);
  res += kr_ebml2_unpack_element_uint32(ebml, NULL, &actual->sample_rate);
  res += kr_ebml2_unpack_element_uint32(ebml, NULL, &actual->inputs);
  res += kr_ebml2_unpack_element_uint32(ebml, NULL, &actual->buses);
  res += kr_ebml2_unpack_element_uint32(ebml, NULL, &actual->outputs);
  res += kr_ebml2_unpack_element_uint64(ebml, NULL, &actual->frames);
  res += kr_ebml2_unpack_element_uint64(ebml, NULL, &actual->timecode);
  res += kr_ebml2_unpack_element_string(ebml, NULL, actual->clock , sizeof(actual->clock));

  return res;
}
int kr_transponder_info_fr_ebml(kr_ebml *ebml, void *st) {
  int res;
  struct kr_transponder_info *actual;

  res = 0;

  if ((ebml == NULL) || (st == NULL)) {
    return -1;
  }

  actual = (struct kr_transponder_info *)st;

  res += kr_ebml2_unpack_element_uint32(ebml, NULL, &actual->active_paths);

  return res;
}
Esempio n. 8
0
static void kr_ebml_to_vector_rep (kr_ebml2_t *ebml, kr_vector_t *vector) {

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &vector->type);

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &vector->controls.width);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &vector->controls.height);

  kr_ebml2_unpack_element_uint32 (ebml, NULL, &vector->controls.x);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &vector->controls.y);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &vector->controls.z);

  kr_ebml2_unpack_element_float (ebml, NULL, &vector->controls.xscale);
  kr_ebml2_unpack_element_float (ebml, NULL, &vector->controls.yscale);

  kr_ebml2_unpack_element_float (ebml, NULL, &vector->controls.opacity);
  kr_ebml2_unpack_element_float (ebml, NULL, &vector->controls.rotation);
}
Esempio n. 9
0
static void kr_ebml_to_videoport_rep (kr_ebml2_t *ebml, kr_port_t *port) {
  kr_ebml2_unpack_element_string (ebml, NULL, port->sysname, sizeof(port->sysname));
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->direction );
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->controls.x);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->controls.y);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->controls.z);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->source_width);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->source_height);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->crop_x);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->crop_y);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->crop_width);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->crop_height);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->controls.width);
  kr_ebml2_unpack_element_uint32 (ebml, NULL, &port->controls.height);
  kr_ebml2_unpack_element_float (ebml, NULL, &port->controls.opacity);
  kr_ebml2_unpack_element_float (ebml, NULL, &port->controls.rotation);
}