Commit Graph

151 Commits

Author SHA1 Message Date
Chocobozzz 8b226c2171 Update non optionnals sources to qt5 2015-04-11 23:24:07 +02:00
Mark Furneaux 3be48f8f44 unref buffers going to analyser at the right time
This unrefs the buffer after the last chunk is pulled from it.
2014-10-04 10:39:33 -04:00
Mark Furneaux e8c2b4b267 Fix missing buffers sent to analyzer
This is a regression in the upgrade to gstreamer1.0.
The gst_buffer_unref() is incorrect as it removes the buffer when it is still needed by the chunker.
Forcing the pointer to be null prevents it from segfaulting but causes it to skip all chunks in the buffer, dropping the framerate and causing a worse case of #4321.
Removing these 2 lines restores original functionality.
2014-10-03 20:53:07 -04:00
David Sansome 6b32ecec27 Various bits for gstreamer-1.0 compatability 2014-09-21 19:38:13 +10:00
David Sansome 50551d987a Rewrite moodbar stuff for gstreamer-1.0:
- Rewrite gstspectrum (1.0) to use FFTW (2x faster) and emit raw magnitude
  values (not log scaled).
- Rewrite the moodbar generation code to be somewhat understandable, and
  do it in Clementine instead of gstreamer.
2014-09-21 19:38:13 +10: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
David Sansome 1e3cfb0a2c Don't try to update the scope if there's no buffer yet. Fixes #4388 2014-06-02 12:46:45 +10:00
David Sansome 162b2efbb0 If we don't know the length of a song from the metadata, get it from the pipeline which has the real length. Fixes #2818 when the length isn't in the podcast metadata. 2014-05-29 21:33:53 +10:00
Mark Furneaux 84434fd84e Fix dbz possibility with small buffers at end of track
There was a possibility of a dbz when a buffer sent to the
analyzer was shorter than 1ms long, such as what may happen at the end
of a track when stopping. This patch guards against this.
2014-05-17 14:38:46 -04:00
Mark Furneaux 8f9229d7c9 Apparently I'm blind. (Refactoring) 2014-05-03 09:28:07 -04:00
Mark Furneaux 00a1fe1e32 Refactoring 2014-05-03 09:14:15 -04:00
Mark Furneaux 6c653e5ba2 Synchronize buffer chunks with audio stream
The chunks are now determined by the density of data in the buffer
to the length of audio in the buffer. The chunk length can change
size so that the audio that is analysed is exactly what is being played
at the instant the frame is requested.
2014-04-30 14:18:39 -04:00
Mark Furneaux ee7fed36bc Fix pointer arithmetic when seeking buffers
It's possible the sample type will change, so best to not use
a fixed value.
2014-04-30 10:00:58 -04:00
Mark Furneaux 53f21584e4 Fix inconsistent buffer sizes sent to analyzer
The analyzers are sent new buffers of audio data to process each time
they pass through the gst pipeline. Different file formats and bit depths/
sample rates can change the size of these buffers, in some cases making them
large and therefore infrequent. This causes choppiness in the analyzer
as it is not getting new data with every frame. This patch chunks the buffers
coming off the pipeline to correspond with the framerate of the analyzer.
2014-04-29 21:38:21 -04:00
Mark Furneaux f793d09d8e Fix play bleeding into next track after auto stop
If "fade out on stop" is enabled, the "stop after this track" feature
would stop not stop the on current track, but instead start playing
the next track and fade out on that immediately. This patch disables
fadeout when the engine is stopped by HandleStopAfter().
2014-04-26 00:58:08 -04:00
Marcus Fritzsch e3bea84bea gstenginepipeline: make buffer min fill configurable 2014-04-02 11:54:14 +02:00
David Sansome 1719b1599c Get audio device names on Windows too. 2014-03-29 23:48:26 +11:00
David Sansome 2d7be1502f Get audio device names on OS X too. 2014-03-29 22:44:08 +11:00
David Sansome 6d1dc56a7c Get a list of available audio devices from pulseaudio, and let the user choose
from those in the settings dialog instead of just giving him a text box.
2014-03-29 19:31:38 +11: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
Arnaud Bienner 7084697aa3 Prevent Clementine to loop forever when trying to play a song with repeat enabled in a playlist which contains only unavailable songs 2014-02-04 22:08:32 +01: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
John Maguire 07e7950f7e Remove obsolete ClearScopeBuffers() reference. 2013-06-03 18:14:20 +02:00
David Sansome 1a4e4ba86f Fix a compilation error on an old GCC 2013-06-01 18:50:25 +10:00
David Sansome 619261f5e1 Remove the precise analyzer timing code from Amarok and instead just use the
latest buffer from GStreamer.  This works just as well and fixes the occasional
freezing analyzer.  Fixes issue 2464
2013-06-01 18:03:59 +10:00
David Sansome 90898bd255 Take the buffer duration into account when deciding when to preload the next
song for gapless playback.
2013-06-01 17:25:56 +10:00
John Maguire 3d434f1c88 Remove iDevice support as it doesn't work well for modern devices and libgpod shows no signs of updating to support them.
Fixes issue #3683
2013-05-17 15:30:56 +02:00
John Maguire 36975c41d2 Add stereo balance slider as part of equalizer. 2013-04-26 20:28:57 -07:00
Andreas cccfe814d0 - Fix label texts in settings page.
- Remove logging.
2013-04-23 00:17:04 +02:00
Andreas ec481d5874 Fixed issue 578: fade-in fade-out on (un)pause. 2013-04-22 21:42:04 +02:00
John Maguire ba95cc7788 Move the setting of the gstreamer environment variables into main() to avoid a race condition where the spotify blob would start up before the gstreamer initialisation happened in the main process and thus would try and load the system gstreamer plugins. 2012-06-20 11:19:34 +02:00
John Maguire 5280038f9a Remove unused debug #define. 2012-06-18 13:56:56 +02:00
David Sansome 638a4b9739 Bundle the gstreamer moodbar plugin, with a patch that protects calls to fftwf_plan from multiple threads. 2012-05-27 17:30:58 +01:00
Arnaud Bienner 26639503d0 Update issue 2137
Mono playback implemented; available in preferences
2012-05-20 20:50:25 +02:00
David Sansome 0335d57a0f Improve pipeline buffering: on an underrun event playback will now pause until the buffer is completely full. Fixes audio stuttering on when listening to radio streams on slow networks. 2012-01-23 15:01:39 +00:00
John Maguire dfdb71b164 Make it so!
Fixes issue #2527
2012-01-10 17:00:17 +01:00
David Sansome 22e6a649b7 Remove the custom gstspotifytcpsrc and use tcpserversrc ! gdpdepay to receive data. Use a gstreamer pipeline on the other end as well to send data. 2011-11-28 18:45:12 +00:00
David Sansome c05a2ee182 Add a spotify gstreamer source element instead of hacking about with gsttcpserversrc. Implement seeking on spotify tracks. 2011-09-25 19:24:44 +01:00
David Sansome 797dfe9841 Fix some connect() warnings when starting a background stream 2011-05-21 19:27:23 +00:00
John Maguire 51e031df2b Add class for transcoding a Song into an OGG Vorbis stream. 2011-05-19 16:34:33 +00:00
Arnaud Bienner d20f689ab4 Revert r3234 because, as discussed, this could lead to blocking behavior 2011-05-03 22:38:24 +00:00
Arnaud Bienner 709d339866 Avoid to create a new thread when changing state. Make the UI more reactive, especially when Qt threadpool is already full (for example when fingerprinting several files in parallel for MusicBrainz autotagging) 2011-05-03 00:02:35 +00:00
David Sansome 3eedc916ad Add a new logging system 2011-04-22 16:50:29 +00:00
David Sansome 23c744f41a Add a queue element to the pipeline to buffer even local sources, and increase the default buffer size to 4 seconds. 2011-04-16 14:04:12 +00:00
David Sansome 7d6eee590a Don't force the track to stop at the end of a section unless it's part of a cue sheet. Fixes issue 1610. Fixes issue 1636. 2011-03-28 22:11:07 +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 b3db5d699e Remove CanDecode from GstEngine - it was only used by a test, and the test was disabled on buildbot because it was unreliable. 2011-03-20 19:36:50 +00:00