-
-static void make_header(struct sr_output *o)
-{
- struct context *ctx;
- uint64_t samplerate;
- int i;
-
- ctx = o->internal;
-
- if (o->device->plugin && sr_device_has_hwcap(o->device, SR_HWCAP_SAMPLERATE))
- samplerate = *((uint64_t *) o->device->plugin->get_device_info(
- o->device->plugin_index, SR_DI_CUR_SAMPLERATE));
- else
- samplerate = 0;
-
- g_string_append_printf(ctx->header, ";Size: %"PRIu64"\n", ctx->num_samples);
- g_string_append_printf(ctx->header, ";Rate: %"PRIu64"\n", samplerate);
- g_string_append_printf(ctx->header, ";Channels: %d\n", ctx->unitsize*8);
- g_string_append_printf(ctx->header, ";EnabledChannels: -1\n");
- if (ctx->got_trigger)
- g_string_append_printf(ctx->header, ";TriggerPosition: %"PRIu64"\n", ctx->trigger_pos);
- g_string_append_printf(ctx->header, ";Compressed: true\n");
- g_string_append_printf(ctx->header, ";AbsoluteLength: %"PRIu64"\n", ctx->num_samples);
- g_string_append_printf(ctx->header, ";CursorEnabled: false\n");
- for (i = 0; i < 10; i++)
- g_string_append_printf(ctx->header, ";Cursor%d: 0\n", i);
-
-}
-