Commit Graph

198 Commits

Author SHA1 Message Date
Mark Furneaux 41d323332a Fix pipeline wit direct output to ALSA
In the new version of gstreamer, alsasink supports floating samples, so it seems to be bypassing audioconvert.
Integer samples make downmixing work correctly.
2016-06-03 11:49:22 -04:00
John Maguire 0beb6d3c59 Remove support for Amazon Cloud Drive. 2016-05-16 18:00:10 +01:00
Mark Furneaux bcf29dc670 Fix caps on audio pipeline
Fixes #1747

The pipeline has the caps for the analyzer applied in the wrong place. This results in the audio output being limited to 16 bit regardless of the input file.
This change also cleans up the mono/sample rate caps as well.
2016-05-15 13:31:00 -04:00
Chocobozzz 0aa3405274 Merge remote-tracking branch 'upstream/master' into qt5 2016-05-09 12:46:08 +02:00
Santi ed7375d7da Add dummy bands to equalizer (Fixes #695) 2016-03-08 15:26:45 -03:00
Chocobozzz ff7026c9fe Merge remote-tracking branch 'upstream/master' into qt5 2015-12-13 20:05:12 +01:00
Arnaud Bienner d9150ec165 Fix Clementine getting stuck when transitioning from a local track to a Spotify track with crossfade disabled.
Two problems here:
- the first was that "StartPlaybackLater" wasn't called from the thread which created SpotifyServer, so the timer never started.
- then the playback sometimes failed or started with an offset: just hack to ignore sourcedrained signal in this case.
2015-11-03 23:20:44 +01:00
Chocobozzz 631a6cdabd Merge branch 'master' into qt5 2015-09-16 17:40:54 +02:00
Mark Furneaux e9494af3f7 Add sample rate selection
This change provides the ability to set a fixed pipeline sample rate as an alternate to automatically negotiating it.
This can be useful on systems with sound cards that work at a fixed rate, as well as it can triage issues (on Windows)
where changing tracks hangs due to a problem with gstreamer's caps negotiation.
2015-07-09 22:19:31 -04:00
Mark Furneaux 1eef335fb6 Fix mono playback on certain configurations
Gstreamer was failing to link the pipeline if 32bit could not be enabled.
We should just let gst autonegotiate the bit depth of the pipeline, which it does with mono disabled anyways.
2015-07-04 14:53:30 -04:00
Mark Furneaux eb537eb0a0 Add mono output support in the engine
Mono playback was removed from the pipeline in the transition to gst 1.0.
2015-07-02 20:25:14 -04:00
Chocobozzz 5aec1c0e24 Merge remote-tracking branch 'upstream/master' into qt5
Update qt version to 5.4.2
2015-06-03 22:57:58 +02:00
John Maguire 3f536d2571 Parse artist out of Akamai tags.
Fixes #4874
2015-05-29 12:00:29 +01:00
John Maguire e7e3ab1a68 Parse embedded tags from Akamai streams.
Fixes #4804
2015-05-26 17:40:35 +01:00
Andreas 4c9f7e6a5e Revert "Fix mono playback. This was broken with commit eaad4c32eeeb83302632aba887d51d2eccb55eed."
Spotify doesn't work with this fix anymore, gstreamer throws `gst_segment_to_stream_time: assertion 'segment->format == format' failed`. Using `audio/*` for caps doesn't work either, the channes property is ignored. An `if (url_.scheme == "spotify")` would work, but maybe there is a more elegant solution.

This reverts commit 8799222d64.
2015-05-02 17:12:55 +02:00
Andreas 8799222d64 Fix mono playback. This was broken with commit eaad4c32ee. 2015-05-02 16:14:44 +02:00
John Maguire e1ea116bfb Remove Grooveshark support.
Well that was nice while it lasted.
2015-05-01 11:57:59 +01:00
John Maguire 8d2e3373a8 Use a GTlsDatabase for gstreamer SSL on mac. 2015-04-27 11:21:22 +01:00
Chocobozzz e986ab5a4b Merge master branch and adapt it to qt5 2015-04-16 17:16:34 +02:00
Chocobozzz 8b226c2171 Update non optionnals sources to qt5 2015-04-11 23:24:07 +02:00
John Maguire 8d3fd00956 Amazon Cloud Drive support.
Squashed commit of the following:

commit 451a327fabb5f9aba077d93a33d75d8a6a288f5f
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:55:36 2015 +0100

    Revert debug console changes.

commit 52f643c3dc524a837f56268b6da4881187204165
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:49:28 2015 +0100

    Revert extra logging

commit 23645f9fea
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:47:55 2015 +0100

    How did you get there

commit 8153388f19
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:45:12 2015 +0100

    Update copyright headers.

commit fa9e279259
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:43:27 2015 +0100

    Remove logging

commit 47a405543c
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:42:05 2015 +0100

    Show login state correctly for Amazon.

commit 748d88d993
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:28:55 2015 +0100

    Ensure Amazon is connected before serving URLs.

commit 25ec9c65f4
Author: John Maguire <john.maguire@gmail.com>
Date:   Fri Mar 27 14:22:28 2015 +0100

    Refresh Amazon authorisation & follow changes.

commit 27c1a37173
Author: John Maguire <john.maguire@gmail.com>
Date:   Thu Mar 26 18:27:27 2015 +0100

    Revert unneeded OAuthenticator change.

commit 3594af5be1
Author: John Maguire <john.maguire@gmail.com>
Date:   Thu Mar 26 16:52:19 2015 +0100

    Initial support for Amazon Cloud Drive.
2015-03-27 14:56:08 +01:00
Krzysztof Sobiecki fa9ea6ec5f Fix compilation with moved files in internet/ 2014-12-18 23:35:21 +01:00
Chocobozzz 50b7b7d889 Make format after update to avoid conflicts 2014-10-15 21:57:57 +02:00
David Sansome 88a6300509 Completely revert the Spotify seeking stuff - it's hacky and I don't like
waiting 4 seconds to have my songs start.  I'll reimplement it properly later.

Reverts commits 96387803cd and 160b151652.
2014-10-14 19:33:03 +11:00
David Sansome c428e536ab When replacing a decodebin, offset the timestamps on the new element's buffers
so they match up with the buffers produced by the old element.  Fixes #4542.
2014-10-14 19:22:43 +11:00
Andreas d32c3236ef Fix little dropout when transition to next track. Updates #4542.
SourceDrainedCallback() has a valid next url and calls TransitionToNext(). This sets a new decode bin for the pipeline. The pipeline then buffers the new track and sends GST_MESSAGE_BUFFERING. BufferingMessageReceived() then pauses the pipeline because it's buffering. But we are buffering the next track and not the current one, so the pipeline has still data and doesn't need to be paused.
2014-10-05 11:57:57 +02:00
David Sansome eec246718a Fix track transitions with gstreamer-1.0. The segment-start event is now a stream-start bus message. Fixes #4542 2014-10-04 21:21:21 +10:00
John Maguire b4784e82fd Make Soup check SSL against our shipped root certs. 2014-10-01 15:06:22 +02:00
Arnaud Bienner 96387803cd Disable this Spotify hack for now, as it is useless anyway.
Somewhat related to issue #4545, but when plugin was installed by user wasn't logged in.
2014-09-30 21:35:27 +02:00
Andreas 4bb3147006 Fix Spotify Blob installation promt. Fixes #4538. 2014-09-22 21:20:48 +02:00
David Sansome eaad4c32ee Merge branch 'gstreamer-1.2'
Fixes #3332
2014-09-22 22:45:28 +10:00
David Sansome bb08a0f416 Fix misleading offset_bytes names 2014-09-22 00:13:00 +10:00
David Sansome 3f0dc01b06 Make Spotify work with gstreamer-1.0. 2014-09-21 22:39:30 +10:00
David Sansome a2408f7c0e Merge branch 'master' into gstreamer-1.2
Conflicts:
	src/moodbar/moodbarloader.cpp
2014-09-21 19:39:27 +10:00
David Sansome 6b32ecec27 Various bits for gstreamer-1.0 compatability 2014-09-21 19:38:13 +10:00
Arnaud Bienner bfaf127ed7 Remove few Ubuntu One things remaining 2014-09-14 21:43:13 +02:00
Arnaud Bienner 3e17a0adb5 Remove dead code 2014-09-14 02:39:35 +02:00
Arnaud Bienner 160b151652 Add seek ability to Spotify tracks.
This is functional but pretty hacky.
And, as noted in the comments, there is a small delay (depends, but usually several seconds) to have the seek taken into account. But IMHO it's better than nothing.
Fixes #2503
2014-09-14 02:15:58 +02:00
pie.or.paj cbc6e5cf4d Pause spotify track (issue 2503)
(patch slightly modified, not sure why it wasn't applied before: it looks good to me)
2014-09-06 19:21:23 +02: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
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
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 2c55688601 Make the GPL spotify code non-optional 2013-09-18 00:49:29 +10:00
David Sansome 246e0808d2 Emit EOS when the buffer timestamps go backwards, as well as when a DISCONT buffer arrives. Fixes issue 3721. 2013-06-08 14:31:29 +10:00
David Sansome e7dcac4f15 When transitioning to a preloaded song, emit the EOS event at the time the
audio actually changes to the next song instead of when the src changes songs.

Fixes issue 3716
2013-06-04 22:17:44 +10:00
John Maguire 36975c41d2 Add stereo balance slider as part of equalizer. 2013-04-26 20:28:57 -07:00
Andreas ec481d5874 Fixed issue 578: fade-in fade-out on (un)pause. 2013-04-22 21:42:04 +02:00
John Maguire 90803fa0e0 Remove use of deprecated gstreamer functions. 2013-01-29 13:19:26 +01:00
John Maguire 24ac9adbe5 Beginnings of playback from Ubuntu One file store. 2012-11-27 18:35:06 +01:00
David Sansome df21da786e Increase the priority of streaming threads on OS X to reduce audio stuttering a bit.
Fixes issue 3275
2012-11-18 11:06:46 +11:00
John Maguire 371b63e159 Use access_token URL param instead of header hack for Google Drive. 2012-11-02 16:47:40 +01:00
John Maguire 27f60c281e Set the user agent for gstreamer HTTP streams. 2012-10-23 17:34:58 +02:00
John Maguire 517252ccc1 Merge branch 'master' into drive
Conflicts:
	data/data.qrc
2012-07-25 15:36:57 +02:00
Arnaud Bienner 0e3dc5a8be Add new ConcurrentRun templates for void functions, and functions with 3 arguments + corresponding test cases.
+ SongLoader now has its own QThreadPool to load folders/playlist in background.
Update issue 2598
This should fix slowliness problems reported.
2012-07-16 00:06:55 +02:00
John Maguire 145f1efaf5 Basic support for Google Drive & OAuth. 2012-07-12 14:09:20 +02:00
David Sansome 5984aecbb8 Make the spotify blob send 5 seconds of audio ahead of the clock time to fill up Clementine's buffer when starting playback. Fixes issue 2671 2012-06-09 17:52:39 +01:00
John Maguire cbc650f44b Use CHECKED_GCONNECT instead of g_signal_connect everywhere. 2012-06-08 15:34:00 +02:00
Arnaud Bienner 7f56833125 Nicer 'if' block for setting monoplayback 2012-05-21 02:07:00 +02:00
Arnaud Bienner 26639503d0 Update issue 2137
Mono playback implemented; available in preferences
2012-05-20 20:50:25 +02:00
Arnaud Bienner 01daea7090 Commit missing modifications/change ConcurrentRun description a bit 2012-04-25 00:29:19 +02:00
David Sansome 96eccdfabf When receiving a buffering message, do the pipeline state change in a different thread to avoid a deadlock with the main thread when the user is seeking.
Fixes issue 2709
2012-02-13 20:49:25 +00:00
David Sansome 69b16fdabc Add some better comments to the buffering stuff in gstenginepipeline 2012-01-27 14:30:28 +00:00
David Sansome 03b0e51b7d Ignore buffering messages from the magic queue2 element that's created by the uridecodebin. Also lower the threshold for buffering to start. 2012-01-27 11:08:18 +00: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
David Sansome 5ee6064a50 Fix compilation errors when compiling without spotify 2011-11-28 19:09:52 +00: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
Arnaud Bienner bac6095491 Rename GrooveShark to Grooveshark everywhere, as it is actually named like this 2011-10-05 21:59:15 +02: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
Arnaud Bienner 10c141e1c1 Fix leak 2011-09-20 19:48:07 +02:00
Arnaud Bienner d380c2e49d Add 'Range' field to HTTP header when playing GrooveShark streaming URL 2011-09-19 23:52:21 +02:00
Arnaud Bienner 3dc4e3aa0b Merge branch 'master' of https://code.google.com/p/clementine-player 2011-08-26 00:23:30 +02:00
Arnaud Bienner 21f5345da4 Also work with cdda URLs which doesn't contain device inside URL 2011-08-26 00:11:18 +02:00
David Sansome 73a1052f70 Use a fakesink instead of an appsink in the probe pipeline to fix a memory leak and make it work on Windows where we don't bundle appsink.
Fixes issue 2177
2011-08-22 22:40:33 +01:00
Andrew Gaydenko 41a151840f Split the gstreamer pipeline - one path is converted to 16-bit int samples for the scope. The other is kept at float32 to preserve the bit depth of the audio.
Fixes issue 2114
2011-08-19 22:02:42 +01:00
Arnaud Bienner 07ce755060 Work with multiple CD devices 2011-08-10 00:49:36 +02: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 6f1f4484f4 Allow songs from the spotify service to be added to the playlist, and bodge a tcpserversrc into GstEnginePipeline 2011-04-26 18:39:38 +00:00
David Sansome 3eedc916ad Add a new logging system 2011-04-22 16:50:29 +00:00
David Sansome 8f4c1dbbf6 When doing gapless playback, fix a bug where the TrackEnded signal would be emitted too early, before the track had actually ended. This caused the song after the current song to get scrobbled and its playcount increased. Fixes issue 1771 2011-04-17 14:11:37 +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 008d396077 Use a monotonically increasing ID to identify pipelines, instead of their pointer value. 2011-03-20 21:40:53 +00:00
David Sansome e761f2bdc8 Fix a bug where the engine would skip a song that didn't exist, but then not play the next song. 2011-03-20 19:18:54 +00:00
David Sansome a2d62883c2 Ignore subsequent errors by setting a flag instead of setting the pipeline state, which may deadlock if the pipeline is also being destroyed at the same time. Fixes issue #1584 2011-03-17 19:52:05 +00:00
Paweł Bara 8ed6eca57e fixing skipping songs for library songs
another "silent" GST error type
David's POT
2011-03-13 22:57:49 +00:00
Paweł Bara e25e9efffc Clementine now skips broken streams (radios for example). At least I hope it always does. ;) Fixes issue #1562. 2011-03-12 13:24:30 +00:00
Paweł Bara 8722e00103 Clementine now skips songs that don't exist anymore (updates issue #250) 2011-03-10 18:01:35 +00:00
David Sansome 6a64b8f8f3 Fix a bug that made it sometimes impossible to seek a track 2011-03-07 20:00:03 +00:00
David Sansome 5672fa90e7 Wait for the gstreamer pipeline to be connected and in either the PAUSED or PLAYING state before trying to do the initial seek. This should stop the occasional "seek failed" messages when playing tracks. Fixes issue #1292 2011-03-06 18:11:53 +00:00
David Sansome 2cb8b8dba7 Stop cue sections at exactly the right place, and move seamlessly between consecutive sections of the same file. Fixes issue #1233. Fixes issue #1419. 2011-03-06 16:35:47 +00:00
David Sansome 8c691d2b3e Use constants instead of "1eN" literals for converting between time units. 2011-02-14 19:34:37 +00:00
David Sansome 37618dae96 Use nanoseconds instead of seconds or milliseconds throughout the Player and Engine. 2011-02-13 18:29:27 +00:00
Paweł Bara 34d496aadc cleaner forced end-of-track when media stream is past it's 'end' marker 2011-01-03 18:03:15 +00:00