Commit Graph

37 Commits

Author SHA1 Message Date
Jim Broadus f04657e7e7 Replace qrand usage with QRandomGenerator
QRandomGenerator was introduced in 5.10 and qrand has since been
deprecated. QRandomGenerator::global() returns a global instance that
has been securely seeded. QRandomGenerator provides methods that
generate values within ranges, so taking a modulus of the result isn't
necessary.
2021-04-20 10:31:07 +01:00
Jim Broadus e8875faf83 visualisations: Properly scale projectM view
In version 5.6, Qt introduced an automatic scaling feature for high DPI
displays. Since projectM is not part of the Qt framework, it's necessary
to convert coordinates when specifying view size.

Reference: https://doc.qt.io/qt-5/highdpi.html
2021-04-07 21:49:18 +01:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
John Maguire 30346e7810 Fix missing gst_buffer_unref.
Fixes #4823
2015-04-23 11:25:34 +01:00
David Sansome 6bb81328e8 Merge branch 'master' into gstreamer-1.2
Conflicts:
	ext/clementine-spotifyblob/mediapipeline.cpp
	gst/moodbar/gstfftwspectrum.c
	src/core/songloader.cpp
	src/core/songloader.h
	src/engines/gstengine.cpp
	src/engines/gstenginepipeline.cpp
	src/moodbar/moodbarpipeline.cpp
	src/musicbrainz/chromaprinter.cpp
	src/transcoder/transcoder.cpp
	src/ui/mainwindow.cpp
	src/visualisations/projectmvisualisation.cpp
2014-06-09 16:20:24 +10:00
John Maguire 3323c2d094 Convert all instances of foreach() to a C++11 for
find ext src -name '*.cpp' -exec \
    sed -i -e 's/foreach(\([^,]\+\),/for (\1 :/' {} \;
2014-02-10 14:43:32 +01:00
John Maguire bebd781fdf Reformat all non-3rd-party C/C++/Objective-C++.
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
 -style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
John Maguire 71893e4847 Use nullptr instead of NULL everywhere. 2014-02-06 17:29:59 +01:00
John Maguire d309d4ab27 Use c++11 instead of boost where possible. 2014-02-06 16:51:39 +01:00
David Sansome 5ac83bd463 Merge branch 'master' into gstreamer-1.2 2014-01-25 00:24:31 +11:00
David Sansome 186a981614 Start at a random visualisation. Fixes issue 3966. 2013-12-02 21:24:15 +11:00
David Sansome d678788af7 Load and save the visualisation delay setting properly. Fixes issue 3968. 2013-12-02 21:24:08 +11:00
John Maguire 56c949815b First pass at Gstreamer 1.0 porting.
This at least compiles against gstreamer 1.2.
Things that work:
* Playing audio
* Automatically completing tags

Things that don't work
* Spotify
* Moodbar

Things I haven't tested
* Transcoding
2013-09-26 17:49:24 +02:00
David Sansome 4f11cb94e1 Make visualisations work again (how did nobody notice this for 3 months??) 2011-03-20 21:41:09 +00:00
David Sansome 008d396077 Use a monotonically increasing ID to identify pipelines, instead of their pointer value. 2011-03-20 21:40:53 +00:00
David Sansome 5eb916cdff Watch script directories for changes 2011-01-16 15:11:23 +00:00
David Sansome ed1a25693c Add missing licenses to debian/copyright, and add copyright information to each source file 2010-11-20 13:27:10 +00:00
David Sansome 1a5f865d53 Bundle an empty font file and pass it to projectM so it doesn't crash when FTGL is turned on. 2010-07-18 13:26:01 +00:00
David Sansome 38ea733e18 Oops, fix broken visualisations from yesterday 2010-07-11 17:44:55 +00:00
David Sansome acf9ff5fd3 Add a cmake option to use a system install of libprojectM. No, gentoo users, you shouldn't use this. 2010-07-10 20:21:06 +00:00
David Sansome 4760210b2f Show a warning message instead of asserting if no projectM presets could be loaded. 2010-07-10 17:21:23 +00:00
David Sansome 0404ecec70 Fix compilation without gstreamer. Fixes issue #440 2010-06-26 13:20:08 +00:00
David Sansome 2b17a8ee1f Revert r1344 (the timer tracing), it didn't help 2010-06-25 22:04:24 +00:00
David Sansome cc6413ab0e Add tracing to every timer event, might help track down CPU usage... 2010-06-25 08:46:03 +00:00
David Sansome 72fec9a8d1 Don't try to load projectM presets from an empty directory 2010-06-22 19:44:38 +00:00
David Sansome faf34a92bb Make it possible to compile out the default CMAKE_INSTALL_PREFIX paths for projectm visualisations 2010-06-22 15:46:51 +00:00
John Maguire 2979b6ae84 Forgotten mac build fix. 2010-06-07 17:57:07 +00:00
David Sansome ade492c56f Make the visualisation duration configurable 2010-06-07 13:36:50 +00:00
David Sansome 0e19ca17e5 Make the visualisation chooser actually work 2010-06-07 13:29:57 +00:00
David Sansome 6d84c2f830 Don't use the system projectm config file. Search for presets in share/clementine/projectm-presets. 2010-06-07 10:23:11 +00:00
David Sansome 2986b27fd7 Basic visualisation selector dialog. 2010-06-07 01:55:21 +00:00
David Sansome 87ecc89ca2 Add an option to change the quality (texture resolution) of visualisations 2010-06-06 23:05:11 +00:00
David Sansome 6e81289ea2 Add a visualisation config menu 2010-06-06 22:28:24 +00:00
John Maguire 920f7a0f3a Make visualisations not crash :-) 2010-06-06 22:22:02 +00:00
David Sansome c541f242c5 Visualisation overlay 2010-06-06 18:18:06 +00:00
David Sansome 994d6d9c20 Set a better default size for the visualisation, and make resizing work 2010-06-06 18:17:41 +00:00
David Sansome 1895582eb9 Basic support for ProjectM visualisations 2010-06-06 14:06:23 +00:00