Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
fa0a6e0
Add MetadataBroadcast class
davidhm May 14, 2018
4d420f3
So far manual tests are working
davidhm May 16, 2018
1b1971d
Pre automatic tests
davidhm May 18, 2018
4a410ba
Moved timers away from Track object
davidhm May 18, 2018
e8f864b
Pre volume scrobbling
davidhm May 26, 2018
807d480
Pre tests, scrobbling manager
davidhm May 27, 2018
961a243
Deadlock
davidhm May 30, 2018
e1ca72f
Solved the deadlock, simple tests pass
davidhm Jun 1, 2018
657220b
WIP: Adding file listener
davidhm Jun 2, 2018
8e5b9c8
Fixed file buffer, it's automatically updated now
davidhm Jun 3, 2018
677ef4f
[Untested] Fixed file info, modified metadatabroadcast
davidhm Jun 5, 2018
f1418bb
[WIP] Adding tests for scrobbling manager
davidhm Jun 7, 2018
b1faf3b
Added first test for scrobbling manager
davidhm Jun 9, 2018
5713d2c
File listener template + factory
davidhm Jun 10, 2018
cf63221
Scrobbling tests done
davidhm Jun 12, 2018
6c2b223
Preferences mock-up
davidhm Jun 12, 2018
10c2e33
Changed everything to a weak pointer
davidhm Jun 13, 2018
faee5ee
Added file listener path in options
davidhm Jun 14, 2018
9f5ce0a
[WIP] Persistent config now playing file
davidhm Jun 14, 2018
7f8990e
[WIP] Requested changes
davidhm Jun 15, 2018
d66519c
Adding new tab
davidhm Jun 17, 2018
da5b54c
Added mock-up in preferences
davidhm Jun 17, 2018
59592f7
Table view mockup
davidhm Jun 18, 2018
9446f15
Pre changing prefmetadata class
davidhm Jun 19, 2018
c98eb1e
Added file settings
davidhm Jun 20, 2018
b4a769e
[Untested] Added options to file listener
davidhm Jun 20, 2018
e7656f0
Modified settings, added concurrency
davidhm Jun 23, 2018
b2de002
Added dedicated thread
davidhm Jun 26, 2018
65e6802
Modified author and title string
davidhm Jun 26, 2018
86218f9
Added connections to lambda expressions in player manager, file liste…
davidhm Jun 28, 2018
5399740
Fixed tests failing
davidhm Jun 29, 2018
edd0401
Added mock network manager, gotta test with mock server
davidhm Jul 1, 2018
3759f72
Now listening scrobbles work with ListenBrainz
davidhm Jul 5, 2018
90ee671
Deleted log file
davidhm Jul 5, 2018
dff358f
ListenBrainz full scrobbles work now too
davidhm Jul 6, 2018
ee992af
Fixed double delete in developer mode
davidhm Jul 7, 2018
6cc626a
Forgot to compile
davidhm Jul 7, 2018
261e0fb
Modified metadata file options
davidhm Jul 7, 2018
1507b52
Editable combobox
davidhm Jul 9, 2018
a3d05a4
Added mpris stub, not working
davidhm Jul 11, 2018
73f9b5e
MPRIS now reflects the playback state
davidhm Jul 12, 2018
33d5373
Disabled failing test until a solution is found
davidhm Jul 13, 2018
6d006e4
Fixed broken tests, continuing MPRIS implementation
davidhm Jul 18, 2018
98cb69c
Fixed non compiling build
davidhm Jul 18, 2018
18cc21d
Segfault on weak_ptr
davidhm Jul 19, 2018
aee10c9
Fixed eject bug
davidhm Jul 19, 2018
b687b92
Mpris reflects AutoDJ enabled
davidhm Jul 19, 2018
eda7738
Pause, play and go next MPRIS functions work
davidhm Jul 21, 2018
c6f4176
Fixed correct fade-in in MPRIS
davidhm Jul 22, 2018
8c2d3f9
Added volume, playback status and loop status as well as a LINUX define
davidhm Jul 23, 2018
acea6b6
Moved MPRIS into a feature
davidhm Jul 24, 2018
b5c145b
Added MPRIS macro in includes too
davidhm Jul 24, 2018
8825809
MPRIS is seekable now
davidhm Jul 24, 2018
b660244
MPRIS broadcasts current track and rate works now too
davidhm Jul 25, 2018
77156d1
Modified linked lists into hash maps
davidhm Aug 1, 2018
5246f16
Added space after commas
davidhm Aug 1, 2018
3943d4a
Changed ref ampersand and disabled non working test
davidhm Aug 1, 2018
1498453
Added more button in encoding combo box
davidhm Aug 3, 2018
ec39e92
Resized combobox
davidhm Aug 6, 2018
9c2bd55
Added few UI suggestions
davidhm Aug 6, 2018
b106442
Added cover art to mpris
davidhm Aug 11, 2018
fd27ef3
Added cover art to MPRIS player
davidhm Aug 12, 2018
35fc31d
Fixed few things
davidhm Aug 14, 2018
213748b
Deleting all cover art files
davidhm Aug 17, 2018
1254414
Single file image
davidhm Aug 17, 2018
a8b9225
Cover art file is now QTemporaryFile
davidhm Aug 18, 2018
7d1abb8
Revamped encoding combobox
davidhm Aug 18, 2018
e932371
Small fixes
davidhm Aug 20, 2018
b05b040
Fixed some cover URL generation issues
daschuer Aug 19, 2018
326f423
Move ScronnlingManager into CoreServices
daschuer Dec 26, 2020
29cc1db
clang-format the whole PR
daschuer Dec 26, 2020
37b2ee6
move moc includes to cpp files
daschuer Dec 27, 2020
edb35c0
move connections to cpp file an use new syntax
daschuer Dec 27, 2020
92063c6
Clazy fixes
daschuer Dec 27, 2020
f8908cc
use Django template language syntax for file substitution
daschuer Dec 28, 2020
28c409f
Move anonymous namespace to cpp file
daschuer Dec 28, 2020
a6d9b03
Fix leaking controls
daschuer Dec 28, 2020
69f641b
extend the list of supported mime types
daschuer Dec 29, 2020
703d248
Add album play count and user rating when exporting metadata
daschuer Dec 29, 2020
10f45d1
removed stary new line
daschuer Dec 29, 2020
a7526fa
update m_currentlyPlayingDeck from getCurrentPlayingDeck() and reduce…
daschuer Dec 29, 2020
8ada713
make mpris player work even if Auto-DJ is disabled
daschuer Dec 29, 2020
d6167f4
map mpris volume to [master],gain
daschuer Dec 29, 2020
93d38b3
inline listenbrainzjsonfactory.cpp
daschuer Dec 30, 2020
cc0ef07
Removed unused FakeNetworkManager
daschuer Dec 30, 2020
645aa22
Removed unused FakeNetworkReply
daschuer Dec 30, 2020
2ddc7a9
Added brief commenents to new classes
daschuer Dec 30, 2020
a4d3964
Use QStringLiteral
daschuer Dec 30, 2020
2abf0b6
Added missing virtual destructor
daschuer Dec 30, 2020
599dd71
remove redundant Mpris::broadcastCurrentTrack()
daschuer Dec 30, 2020
441b339
Added comment about programatic flags
daschuer Dec 30, 2020
5151137
Rename Metadata Output Preferences
daschuer Dec 30, 2020
65cced3
Improve GUI
daschuer Dec 31, 2020
9a786b4
latin1 with ISO-8859-1
daschuer Dec 31, 2020
c3f2db4
Added comment to disabled code
daschuer Dec 31, 2020
9f37397
Swap initalisation order.
daschuer Dec 31, 2020
2391ba9
Improve Metadata output preferences
daschuer Dec 31, 2020
b1679ca
Add missing Q_UNUSED
daschuer Mar 23, 2024
8928cb6
Fix codespell issues.
daschuer Mar 23, 2024
9fa4a54
Fix clang-format issues
daschuer Mar 23, 2024
03965ca
Fix clazy complains
daschuer Mar 23, 2024
33e6169
Add a missing Q_UNUSED
daschuer Mar 23, 2024
992055f
Merge remote-tracking branch 'upstream/main' into Livemetadata
acolombier Dec 15, 2025
291277d
chore: remove all changes unrelated to MPRIS
acolombier Dec 15, 2025
834a008
feat: refactor and finish missing feature for MPRIS
acolombier Dec 15, 2025
f231ce1
MacOSMediaPlayerService: Add MacOSMediaPlayerService
fwcd Dec 16, 2025
d3285de
feat: refactor MacOSMediaPlayerService to integrate with ScrobblingMa…
acolombier Dec 16, 2025
64b3e35
Merge remote-tracking branch 'upstream/main' into feat/mpris
acolombier Feb 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,8 @@ add_library(
src/audio/signalinfo.cpp
src/audio/streaminfo.cpp
src/audio/types.cpp
src/broadcast/metadatabroadcast.cpp
src/broadcast/scrobblingmanager.cpp
src/control/control.cpp
src/control/controlaudiotaperpot.cpp
src/control/controlbehavior.cpp
Expand Down Expand Up @@ -1537,6 +1539,8 @@ add_library(
src/preferences/dialog/dlgprefkeydlg.ui
src/preferences/dialog/dlgpreflibrary.cpp
src/preferences/dialog/dlgpreflibrarydlg.ui
src/preferences/dialog/dlgprefmetadata.cpp
src/preferences/dialog/dlgprefmetadatadlg.ui
src/preferences/dialog/dlgprefmixer.cpp
src/preferences/dialog/dlgprefmixerdlg.ui
src/preferences/dialog/dlgprefrecord.cpp
Expand Down Expand Up @@ -1618,9 +1622,11 @@ add_library(
src/track/trackinfo.cpp
src/track/trackmetadata.cpp
src/track/tracknumbers.cpp
src/track/trackplaytimers.cpp
src/track/trackrecord.cpp
src/track/trackref.cpp
src/util/autofilereloader.cpp
src/track/tracktiminginfo.cpp
src/util/battery/battery.cpp
src/util/cache.cpp
src/util/clipboard.cpp
Expand Down Expand Up @@ -2105,6 +2111,16 @@ if(APPLE)
target_link_libraries(mixxx-lib PRIVATE "-weak_framework iTunesLibrary")
target_compile_definitions(mixxx-lib PUBLIC __MACOS_ITUNES_LIBRARY__)
endif()

option(MACOS_MEDIAPLAYER "macOS media player integration" ON)
if(MACOS_MEDIAPLAYER)
target_sources(
mixxx-lib
PRIVATE src/broadcast/macos/macosmediaplayerservice.mm
)
target_link_libraries(mixxx-lib PRIVATE "-weak_framework MediaPlayer")
target_compile_definitions(mixxx-lib PUBLIC __MACOS_MEDIAPLAYER__)
endif()
endif()

option(AU_EFFECTS "Audio Unit (AU) effects integration" ON)
Expand All @@ -2125,6 +2141,25 @@ if(APPLE)
endif()
endif()

if(UNIX AND NOT APPLE AND NOT ANDROID)
# MPRIS implementation using QtDbus
option(MPRIS "MPRIS implementation using QtDbus" ON)
if(MPRIS)
target_sources(
mixxx-lib
PRIVATE
src/broadcast/mpris/mediaplayer2.cpp
src/broadcast/mpris/mediaplayer2player.cpp
src/broadcast/mpris/mediaplayer2playlists.cpp
src/broadcast/mpris/mediaplayer2tracklist.cpp
src/broadcast/mpris/mpris.cpp
src/broadcast/mpris/mprisplayer.cpp
src/broadcast/mpris/mprisservice.cpp
)
target_compile_definitions(mixxx-lib PUBLIC __MPRIS__)
endif()
endif()

if(EMSCRIPTEN)
# We need asyncify to support asynchronous calls (e.g. QDialog::exec)
# when targeting Emscripten/WebAssembly.
Expand Down Expand Up @@ -3690,6 +3725,9 @@ set(
Xml
)
set(QT_EXTRA_COMPONENTS "")
if(MPRIS)
list(APPEND QT_EXTRA_COMPONENTS "DBus")
endif()
if(QT6)
find_package(QT 6.2 NAMES Qt6 COMPONENTS Core REQUIRED)
list(APPEND QT_EXTRA_COMPONENTS "ShaderTools")
Expand Down
1 change: 1 addition & 0 deletions res/mixxx.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@
<file>shaders/passthrough.vert</file>
<file>shaders/rgbsignal.frag</file>
<file>shaders/stackedsignal.frag</file>
<file>images/icons/128x128/apps/mixxx.png</file>
</qresource>
</RCC>
64 changes: 64 additions & 0 deletions src/broadcast/macos/macosmediaplayerservice.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#pragma once

#include <QList>
#include <QObject>

#include "broadcast/scrobblingservice.h"
#include "control/controlproxy.h"
#include "library/autodj/autodjprocessor.h"
#include "library/coverart.h"
#include "mixer/playermanager.h"
#include "util/cache.h"

/// A service that interfaces with macOS's media controls and allows the user to
/// view and control the playback through the system-wide control center, media
/// keys etc.
class MacOSMediaPlayerService : public ScrobblingService {
Q_OBJECT
public:
MacOSMediaPlayerService(PlayerManagerInterface* pPlayerManager);

public slots:
/// Sends the updated track info to the external 'now playing' center.
void slotBroadcastCurrentTrack(TrackPointer pTrack) override;
/// Notifies the external 'now playing' center that all tracks are paused.
void slotAllTracksPaused() override;
/// Unused
void slotScrobbleTrack(TrackPointer) override {
}

private:
std::vector<std::unique_ptr<DeckAttributes>> m_deckAttributes;
ControlProxy* m_pCPAutoDjEnabled;
ControlProxy* m_pCPFadeNow;
double m_lastSentPosition;

/// Sets up the callbacks for controlling playback externally.
void setupCommandHandlers();

/// Fetches the currently playing deck. Returns a `nullptr` if nothing plays.
DeckAttributes* getCurrentDeck();
/// Checks whether the given deck is the currently playing one.
bool isCurrentDeck(DeckAttributes* attributes);

/// Called when the play state is toggled externally. Returns whether this was successful.
bool togglePlayState();
/// Called when the play state is changed externally. Returns whether this was successful.
bool updatePlayState(bool playing);
/// Called when the play position is changed externally. Returns whether this was successful.
bool updatePlayPosition(double absolutePosition);
/// Called when the user skips to the next track externally. Returns whether
/// this was successful.
bool skipToNextTrack();

private slots:
/// Notifies the external 'now playing' center that the play state of some deck has changed.
void slotPlayChanged(DeckAttributes* attributes, bool playing);
/// Notifies the external 'now playing' center that the play position of some deck has changed.
void slotPlayPositionChanged(DeckAttributes* attributes, double position);

/// Updates the cover art if needed.
void slotCoverFound(const QObject* pRequestor,
const CoverInfo& coverInfo,
const QPixmap& pixmap);
};
Loading
Loading