new flag at end of CREATE_PLAYBACK_STREAM:
bool passthrough
+
+## v19, implemented by >= 0.9.22
+
+New proplist field for sink input, source output introspection opcodes and at the end:
+
+ bool corked
+
AC_SUBST(PACKAGE_URL, [http://pulseaudio.org/])
AC_SUBST(PA_API_VERSION, 12)
-AC_SUBST(PA_PROTOCOL_VERSION, 18)
+AC_SUBST(PA_PROTOCOL_VERSION, 19)
# The stable ABI for client applications, for the version info x:y:z
# always will hold y=z
while (!pa_tagstruct_eof(t)) {
pa_sink_input_info i;
- pa_bool_t mute = FALSE;
+ pa_bool_t mute = FALSE, corked = FALSE;
pa_zero(i);
i.proplist = pa_proplist_new();
pa_tagstruct_gets(t, &i.resample_method) < 0 ||
pa_tagstruct_gets(t, &i.driver) < 0 ||
(o->context->version >= 11 && pa_tagstruct_get_boolean(t, &mute) < 0) ||
- (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
+ (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0) ||
+ (o->context->version >= 19 && pa_tagstruct_get_boolean(t, &corked) < 0)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
pa_proplist_free(i.proplist);
}
i.mute = (int) mute;
+ i.corked = (int) corked;
if (o->callback) {
pa_sink_input_info_cb_t cb = (pa_sink_input_info_cb_t) o->callback;
while (!pa_tagstruct_eof(t)) {
pa_source_output_info i;
+ pa_bool_t corked = FALSE;
pa_zero(i);
i.proplist = pa_proplist_new();
pa_tagstruct_get_usec(t, &i.source_usec) < 0 ||
pa_tagstruct_gets(t, &i.resample_method) < 0 ||
pa_tagstruct_gets(t, &i.driver) < 0 ||
- (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
+ (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0) ||
+ (o->context->version >= 19 && pa_tagstruct_get_boolean(t, &corked) < 0)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
pa_proplist_free(i.proplist);
goto finish;
}
+ i.corked = (int) corked;
+
if (o->callback) {
pa_source_output_info_cb_t cb = (pa_source_output_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
const char *driver; /**< Driver name */
int mute; /**< Stream muted \since 0.9.7 */
pa_proplist *proplist; /**< Property list \since 0.9.11 */
+ int corked; /**< Stream corked \since 0.9.22 */
} pa_sink_input_info;
/** Callback prototype for pa_context_get_sink_input_info() and friends*/
const char *resample_method; /**< The resampling method used by this source output. */
const char *driver; /**< Driver name */
pa_proplist *proplist; /**< Property list \since 0.9.11 */
+ int corked; /**< Stream corked \since 0.9.22 */
} pa_source_output_info;
/** Callback prototype for pa_context_get_source_output_info() and friends*/
pa_tagstruct_put_boolean(t, pa_sink_input_get_mute(s));
if (c->version >= 13)
pa_tagstruct_put_proplist(t, s->proplist);
+ if (c->version >= 19)
+ pa_tagstruct_put_boolean(t, (pa_sink_input_get_state(s) == PA_SINK_INPUT_CORKED));
}
static void source_output_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_source_output *s) {
pa_tagstruct_put_usec(t, source_latency);
pa_tagstruct_puts(t, pa_resample_method_to_string(pa_source_output_get_resample_method(s)));
pa_tagstruct_puts(t, s->driver);
-
if (c->version >= 13)
pa_tagstruct_put_proplist(t, s->proplist);
+ if (c->version >= 19)
+ pa_tagstruct_put_boolean(t, (pa_source_output_get_state(s) == PA_SOURCE_OUTPUT_CORKED));
}
static void scache_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_scache_entry *e) {
for (ssync = i->sync_next; ssync; ssync = ssync->sync_next)
pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], ssync);
+
+ if (PA_SINK_INPUT_IS_LINKED(state))
+ pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
}
pa_sink_update_status(i->sink);
update_n_corked(o, state);
o->state = state;
- if (state != PA_SOURCE_OUTPUT_UNLINKED)
+ if (state != PA_SOURCE_OUTPUT_UNLINKED) {
pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], o);
+ if (PA_SOURCE_OUTPUT_IS_LINKED(state))
+ pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
+ }
+
pa_source_update_status(o->source);
}