viktorgino / headunit-desktop

HeadUnit Desktop is a car PC software built with Qt 5 and QML
https://github.com/viktorgino/headunit-desktop/wiki
GNU General Public License v3.0
285 stars 64 forks source link

Bluetooth media player messaging #77

Open aselafernando opened 9 months ago

aselafernando commented 9 months ago

Created messaging from the Bluetooth media player. This will broadcast the current track details and track position so plugins can make use of this. This will allow writing this data to a vehicle display over CANBUS or serial etc.

viktorgino commented 9 months ago

I think it'd be a better idea to a media position and media info changed signal to MediaInterface, so all the other media plugins can use it. Then MediaManager could handle sending it onto the messaging bus etc

aselafernando commented 9 months ago

Yep that makes sense, I have modifed the code so now MediaManager is the interface to the message bus.

MediaManager::mediaPosition quint32 and MediaManager::mediaTrack QVariantMap are the two messages. Just tested this and it worked well. Could probably drop "media" from the id as well.

aselafernando commented 9 months ago

I changed the messages to MediaInput::position quint32 and MediaInput::track QVariantMap to be more consistent with the existing