- if (sr_session_save_init(_file_name.c_str(),
- data->samplerate(), probes) != SR_OK) {
+ try {
+ auto context = _session.session()->context();
+ auto output_format = context->output_formats()["srzip"];
+ auto device = _session.device();
+ _output = output_format->create_output(device,
+ {{"filename",
+ Glib::Variant<Glib::ustring>::create(_file_name)}});
+ auto meta = context->create_meta_packet(
+ {{ConfigKey::SAMPLERATE,
+ Glib::Variant<guint64>::create(data->samplerate())}});
+ _output->receive(meta);
+ } catch (Error error) {