2009/8/20 Lennart Poettering <lennart at poettering.net>: > On Thu, 20.08.09 17:25, Jason Taylor (killerkiwi2005 at gmail.com) wrote: > >> Is there an event that occurs when a sink_input changes sinks? >> >> Seems like there should be PA_SUBSCRIPTION_EVENT_SINK_INPUT but that >> dosn't seem to happen? > > PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE is > triggered at the end of pa_sink_input_finish_move(). > > Note that subscription events are queued asynchronously and coalesced > and everything. > > If you want synchronous notifications you might want to hook into > PA_CORE_HOOK_SINK_INPUT_MOVE_FINISH or > PA_CORE_HOOK_SINK_INPUT_MOVE_START. > > What do you want to do? I want to set up a new volume meter when the sink_input changes sinks :) This sorted it if et == PA_SUBSCRIPTION_EVENT_SINK: if event_type & PA_SUBSCRIPTION_EVENT_TYPE_MASK == PA_SUBSCRIPTION_EVENT_REMOVE: logging.info("PA_SUBSCRIPTION_EVENT_SINK | PA_SUBSCRIPTION_EVENT_REMOVE : %d" % index) # Sink has been removed else: o = pa_context_get_sink_info_by_index(self._context, int(index), self._pa_sink_info_cb, False) pa_operation_unref(o) Cheers > > Lennart > > -- > Lennart Poettering ? ? ? ? ? ? ? ? ? ? ? ?Red Hat, Inc. > lennart [at] poettering [dot] net > http://0pointer.net/lennart/ ? ? ? ? ? GnuPG 0x1A015CC4 > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss at mail.0pointer.de > https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss > -- "Weekends don't count unless you spend them doing something completely pointless. " - Calven