ggo_print_help(&w->help, detailed);
}
}
+
+static int get_btr_value(struct btr_node *btrn, const char *key, int32_t *result)
+{
+ char *buf = NULL;
+ int ret = btr_exec_up(btrn, key, &buf);
+
+ if (ret < 0)
+ return ret;
+ ret = para_atoi32(buf, result);
+ free(buf);
+ return ret;
+}
+
+/*
+ * Ask parent btr nodes for the samplerate of the current stream.
+ */
+int get_btr_samplerate(struct btr_node *btrn, int32_t *result)
+{
+ return get_btr_value(btrn, "samplerate", result);
+}
+
+/*
+ * Ask parent btr nodes for the channel count of the current stream.
+ */
+int get_btr_channels(struct btr_node *btrn, int32_t *result)
+{
+ return get_btr_value(btrn, "channels", result);
+}
struct writer_node_group *setup_default_wng(void);
void print_writer_helps(int detailed);
struct writer_node *setup_writer_node(const char *arg, struct btr_node *parent);
+int get_btr_samplerate(struct btr_node *btrn, int32_t *result);
+int get_btr_channels(struct btr_node *btrn, int32_t *result);