Sinono3 / souvlaki

A cross-platform library for handling OS media controls and metadata.
MIT License
80 stars 15 forks source link

Polling model #2

Closed jpochyla closed 3 years ago

jpochyla commented 3 years ago

Hi! What do you think about switching from the polling model to a callback approach? In my app I don't have any event polling to piggyback at, and passing a impl Fn(...) + Send + 'static would work best. Event queue is easily implementable on top, outside of souvlaki.

Sinono3 commented 3 years ago

Hello! Yeah, callbacks would be more flexible I think. The Windows API also works via callbacks, and I just checked and it seems MPRIS in Linux does as well. I'll try to make a prototype on the weekend, but if you'd like you can work on it too😄

jpochyla commented 3 years ago

Great! I have it almost ready, PR incoming :) I'm afraid I can't test the Windows part though, as I don't have any Windows machine around.

Sinono3 commented 3 years ago

Closed with #3.