More > JRiver Media Center 32 for Windows
MCWS Feature Request - Notifications on state change
lepa:
this would be great
mattkhan:
It's wasteful and inefficient in every way (Inc power consumption), requires you to poll frequently for a responsible user interface and fills the MC logs with irrelevant cruft. Certainly it works but it's never ideal.
zybex:
Simplest would be to broadcast a system message with the MCC notification codes when those events occur:
https://wiki.jriver.com/index.php/Media_Center_Core_Commands#Notifications
The code for this is a single line on Windows:
SendNotifyMessage(0xFFFF, WMsg, MCCCode, MCCParam);
Where WMsg can be any value, but it's best to register one at startup with:
MyWMsgCode = RegisterWindowMessage("JRiver");
Then any app that wants to receive those messages can find out the code by calling the same function and handle the notifications any way it needs. Any additional needed info would come from MCWS calls. A simple app could then listen for these and execute commands or write the current playback info to a file, according to user configuration.
These APIs are Windows-specific. For Mac/Linux, a different solution would be needed, but I think that using those Notification events makes sense. Alternative multi-platform solution is to provide a socket that client-apps can connect to receive those event codes.
zybex:
These threads should be combined:
https://yabb.jriver.com/interact/index.php/topic,138176.0.html
Polling is awful and misses events.
mattkhan:
Probably pointless to discuss unless any interest is shown but I will say that a windows specific thing sounds very bad to me, making you make an mcws to get info also, to my mind, largely defeats the point.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version