+/**
+ * Returns a NULL-terminated array of struct sr_option, or NULL if the
+ * module takes no options.
+ *
+ * Each call to this function must be followed by a call to
+ * sr_output_options_free().
+ *
+ * @since 0.4.0
+ */
+SR_API const struct sr_option *sr_output_options_get(const struct sr_output_module *o)
+{
+
+ if (!o || !o->options)
+ return NULL;
+
+ return o->options();
+}
+
+/**
+ * After a call to sr_output_options_get(), this function cleans up all
+ * the resources allocated by that call.
+ *
+ * @since 0.4.0
+ */
+SR_API void sr_output_options_free(const struct sr_output_module *o)
+{
+ struct sr_option *opt;
+
+ if (!o || !o->options)
+ return;
+
+ for (opt = o->options(); opt->id; opt++) {
+ if (opt->def) {
+ g_variant_unref(opt->def);
+ opt->def = NULL;
+ }
+
+ if (opt->values) {
+ g_slist_free_full(opt->values, (GDestroyNotify)g_variant_unref);
+ opt->values = NULL;
+ }
+ }
+}
+
+/**
+ * Create a new output instance using the specified output module.
+ *
+ * <code>options</code> is a *HashTable with the keys corresponding with
+ * the module options' <code>id</code> field. The values should be GVariant
+ * pointers with sunk * references, of the same GVariantType as the option's
+ * default value.
+ *
+ * The sr_dev_inst passed in can be used by the instance to determine
+ * channel names, samplerate, and so on.
+ *
+ * @since 0.4.0
+ */
+SR_API const struct sr_output *sr_output_new(const struct sr_output_module *o,
+ GHashTable *options, const struct sr_dev_inst *sdi)
+{
+ struct sr_output *op;
+
+ op = g_malloc(sizeof(struct sr_output));
+ op->module = o;
+ op->sdi = sdi;
+
+ if (op->module->init && op->module->init(op, options) != SR_OK) {
+ g_free(op);
+ op = NULL;
+ }
+
+ return op;
+}
+
+/**
+ * Send a packet to the specified output instance.
+ *
+ * The instance's output is returned as a newly allocated GString,
+ * which must be freed by the caller.
+ *
+ * @since 0.4.0
+ */
+SR_API int sr_output_send(const struct sr_output *o,