Commit Graph

153 Commits

Author SHA1 Message Date
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
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
John Maguire 65c7e6007c Maybe working gstreamer buffer setting. 2010-10-11 15:58:05 +00:00
David Sansome 4f943795bc Fix a handle + memory + whatever else leak when automatically changing tracks in Windows. Fixes issue #782 2010-09-22 22:22:02 +00:00
David Sansome be83655c57 Ignore tag messages from gstreamer when we're switching to a preloaded track - otherwise the Player receives the messages while it still thinks it's playing the old song, and gets the wrong track number. 2010-09-04 13:50:53 +00:00
John Maguire c801ce1a2d Rollback analyzer changes. 2010-08-28 18:48:16 +00:00
John Maguire 831c5221bb Add header to fix build on Linux. 2010-08-20 12:30:42 +00:00
John Maguire 59233f5192 Disable FFT when no analyzer in use. 2010-08-20 12:14:43 +00:00
John Maguire 652f09b926 Fix memory leak from spectrum element.
Fixes issue #638
2010-08-19 10:14:56 +00:00
John Maguire 2db2354e0b Move spectrum before volume element.
Tweak new analyzer.
2010-08-18 19:12:28 +00:00
John Maguire 459a134201 Remove FHT and use gstreamer's FFT for all analyzers. 2010-08-18 18:21:30 +00:00
John Maguire 03274b0831 Add new analyzer API and example using gstreamer spectrum element. 2010-08-18 16:09:45 +00:00
John Maguire 35e87b2a77 Start gstreamer playing from a separate thread. 2010-08-04 12:13:43 +00:00
David Sansome aad6093b63 Give each gstreamer element a unique name 2010-08-02 18:13:40 +00:00
John Maguire 41ab99e62e Generate Hypnotoad rather than streaming it. 2010-07-14 11:16:56 +00:00
David Sansome 36604f7ec8 Oops, fix the preamp 2010-07-12 21:00:15 +00:00
David Sansome 553184c7db Remove amarok's equalizer and use gstreamer's one instead for vastly reduced CPU usage. Fixes issue #494 2010-07-12 20:55:09 +00:00
David Sansome 8b36f12cc3 Stop the old decodebin after starting the new one to (hopefully) fix an occasional race condition/deadlock. 2010-07-12 19:10:32 +00:00
David Sansome fbd6b46e20 Only take notice of the first segment start event, to fix seeking 2010-07-12 19:09:59 +00:00
David Sansome b62263540f Use the segment start time when calculating the timestamp of data buffers in the scope. Fixes a memory leak and makes the scope work again when playing ogg streams. Fixes issue #495. 2010-07-11 13:31:03 +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 9106abb1a0 Handle redirect messages from mmssrc properly. Fixes issue #385. 2010-06-23 11:47:54 +00:00
John Maguire 5307ca3db0 Return the correct type from GstBusFunc()s 2010-06-15 22:32:20 +00:00
John Maguire a8f7df9e28 Remove incorrect gst_message_unref. It should only be called from *sync* handlers that are returning GST_BUS_DROP. 2010-06-15 22:30:06 +00:00
David Sansome 08dddac981 Fix a small memory leak 2010-06-08 12:12:47 +00:00
David Sansome 1895582eb9 Basic support for ProjectM visualisations 2010-06-06 14:06:23 +00:00
David Sansome eb78ace541 Replay Gain support 2010-05-23 13:07:15 +00:00
David Sansome 9b224fd87d Fix the fader behaviour a bit 2010-05-19 13:26:23 +00:00
David Sansome 694c5e9f9e Wait 2 seconds after the fadeout finished before destroying the pipeline, to allow for delays in the sound server/driver. Fixes issue #294. 2010-05-15 17:55:36 +00:00
David Sansome 980d61a583 If we're not crossfading, keep the same pipeline when changing tracks and just swap out the gstreamer source - this should allow for completely gapless playback. 2010-05-08 17:39:12 +00:00
David Sansome 5cbed1c6b3 Use uridecodebin to pick the right source for us, rather than using giosrc sometimes, and soup/neon for http. Fixes issue #290 2010-05-08 13:54:12 +00:00
David Sansome 266ad640de Fix character decoding from gstreamer errors.
Update issue 263
Status: Fixed
Nevermind, I worked out out - should be fixed now!
2010-04-30 15:37:57 +00:00
David Sansome a56107c598 Fix UTF8 characters in metadata received from gstreamer. Affects issue #229 2010-04-22 20:48:35 +00:00
David Sansome 99743d49aa Nasty hack to hopefully prevent "seek failed" errors - just don't allow two seeks to happen within 100ms of each other. 2010-04-22 16:54:09 +00:00
David Sansome 4eedddd57c Make the gst engine emit Error() instead of showing its own dialog when a plugin couldn't be found. 2010-04-21 11:14:12 +00:00
David Sansome 4234700e24 Trim the metadata received from tags 2010-04-20 22:20:20 +00:00
David Sansome f4e9de8e5b Free the error messages properly, since they aren't owned by gstreamer. Thanks john :) 2010-04-19 12:30:19 +00:00
David Sansome 4bc704d7e3 Actually show error messages that come from gstreamer. Fixes issue #230 2010-04-19 12:04:35 +00:00
David Sansome 44ffc5be75 Get metadata from shoutcast streams (like somafm) 2010-04-14 23:59:11 +00:00
John Maguire 4862c41477 Tidy up http gstreamer source element. 2010-04-14 15:42:49 +00:00
David Sansome 00b19ae83e Fix somafm playback on linux. Might merge this with the mac ifdef if possible? 2010-04-12 17:40:08 +00:00
John Maguire 821baa2211 Mac deployment fixes for gstreamer. 2010-04-12 12:36:30 +00:00
David Sansome d51c7444ab Fix some confusion with auto/manual track changes 2010-04-12 01:59:21 +00:00
David Sansome 1b0b8979df Codereview comments from r637 2010-04-12 00:20:52 +00:00
David Sansome 23880b3cb5 Crossfading in gstreamer backend 2010-04-11 23:03:39 +00:00