How to find the latest created bluetooth sink/source via event hook?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm developing an routing module to automatically set a new created Bluetooth sink as the default sink when a Bluetooth headset is connected.
So I need to get the new BT sink when it's created.

But when I hook event " PA_CORE_HOOK_SINK_NEW", I found that the sink pointer for the callback function is *not* the real sink pointer value.
So although in the hook of "PA_CORE_HOOK_SINK_STATE_CHANGED", I can get the proper sink pointer, it's not straightforward to know whether an IDLE sink is a new created one.

So could anyone share some hint on how to find the new created sink/source? Shall I iterate the core's sink/source list and compare pointers in sink/source state change callback function?

Thanks
Amanda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110518/67829288/attachment.htm>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux