This event is emitted if the sink-input could not be moved to a new sink
because it doesn't support the format of the sink-input. Clients can
reconnect their stream with a different format if they wish or
gracefully exit.
* information, \since 0.9.15 */
#define PA_STREAM_EVENT_REQUEST_UNCORK "request-uncork"
+/** A stream event notifying that the stream is going to be
+ * disconnected because the underlying sink changed and no longer
+ * supports the format that was originally negotiated. Clients need
+ * to connect a new stream to renegotiate a format and continue
+ * playback, \since 1.0 */
+#define PA_STREAM_EVENT_FORMAT_LOST "format-lost"
+
PA_C_DECL_END
#endif
return -PA_ERR_NOTSUPPORTED;
if (pa_sink_input_is_passthrough(i) && !pa_sink_check_format(dest, i->format)) {
- /* FIXME: Fire a message here so the client can renegotiate */
+ pa_log_debug("New sink doesn't support stream format, sending format-changed and killing");
+ pa_sink_input_send_event(i, PA_STREAM_EVENT_FORMAT_LOST, NULL);
return -PA_ERR_NOTSUPPORTED;
}