Commit Graph

171 Commits

Author SHA1 Message Date
Jim Broadus d3d6c1ff3c Fix UNC paths.
The fix-up for URLs for files that that begin with // no longer works since the
QUrl class determines that these modifications are invalid, resulting in an
empty string when converted. Instead of attempting to modify the QUrl, add a
utility function that makes the correction on the encoded byte array at time of
usage.
2020-01-29 00:38:43 -08:00
Jonas Kvinge 2a2a71281a Switch to queue2 for probe queue and set properties 2019-11-11 21:26:11 +01:00
Dmitry Valter 18c2b41615 Revert "Attempt to fix track change hang"
Queue2 tends to hang up on pause, unable to start playing
again. Pipeline actually stays PLAYING with ASYNC state
change, so it becomes impossible to unpause the player
without stop or forward/backward seeks.

This reverts commit 2b280de663.
2019-11-02 10:16:42 +03:00
John Maguire cb6cd7c485 Merge remote-tracking branch 'origin/master' into qt5 2019-10-04 16:51:43 +01:00
luz.paz fb93ae4b02 Fix misc. source comment typos
Typos found via `codespell`
2019-08-21 23:43:16 -04:00
Jonas Kvinge 66fdc935ac Fix formatting 2019-07-21 14:38:15 +02:00
Jonas Kvinge 1a2274bd2b Merge branch 'master' into qt5-update 2019-07-21 14:20:59 +02:00
Jim Broadus 5c2ceb3490 Fix several gstreamer object leaks.
There are a number of cases where gst_pipeline_get_bus,
gst_element_get_static_pad, and g_object_get are called without releasing
references. In addition to memory usage, some of these elements hold file
descriptors. In normal operation, two file descriptors are leaked for each
played track. The default fd ulimit for many linux distros is 1024. This
is likely the cause of the crash reported in issue 6309.

This change fixes the obvious and consistent leaks, but it's probably not a
complete solution. There are many error and corner conditions that need to be
examined.
2019-03-25 23:22:09 -07:00
Jim Broadus ca8db288d5 Free decoder bin if error occurs during setup.
In the case that an error occurs in ReplaceDecodeBin before the bin is added to
the pipeline, unreference the object to allow cleanup. This change also separates
CreateDecodeBinFromUrl from ReplaceDecodeBin, following the pattern of
CreateDecodeBinFromString.
2019-03-23 22:33:17 -07:00
Jim Broadus 102c529f80 Fix potential use of streamer element after deletion.
If ReplaceDecodeBin fails from TransitionToNext, uridecodebin_ will not be
replaced with a new element. Since TransitionToNext does not check the return
value, it unknowingly deletes uridecodebin_.
2019-03-19 18:47:19 -07:00
Jonas Kvinge 9f946a2898 Improvements to makefiles and make components optional (#6221) 2018-11-29 21:32:12 +00:00
Jonas Kvinge 8c198a99a5 Qt 5 fixes 2018-11-21 10:31:17 +00:00
Jonas Kvinge c29c2e95cc Fixed merge conflicts 2018-09-30 15:11:06 +02:00
Eoin O'Neill 8902776b32 SPC playback fix to prevent end-of-track signal hang.
This fixes an issue with SPC playback where tracks would not properly register End-of-track
notifications when a new track begins.
2018-09-03 01:17:51 -07:00
Mark Furneaux 2b280de663 Attempt to fix track change hang
When switching between tracks with different sample rates, the probe queue blocks before the pipeline can emit EOS.
This prevents the track change from proceeding without manual intervention. This appears to be because the queue
element doesn't handle the rate change correctly (either due to buffer length, or cap negotiation).
The queue2 element however does handle this without blocking indefinitely.
2018-07-09 12:05:48 +01:00
Jonas Kvinge b897651cdb Device fixes for MacOs (#6098)
* Fix setting device for newer MacOs

* Fix setting device if there is an empty description
2018-07-06 10:04:40 +01:00
Jonas Kvinge a5e8eba91c Merge remote-tracking branch 'upstream/master' into qt5-update 2018-06-29 02:38:19 +02:00
Jonas Kvinge da648fd08f Fix setting device on windows (#6081) 2018-06-12 09:27:10 +01:00
Jonas Kvinge 925e74f909 Fix crash when uridecodebin fails. (#6077)
Let's the user see the error message what failed instead of Clementine crashing.

Also don't do gst_object_unref unless bin is set.
This fixes GStreamer-CRITICAL gst_object_unref: assertion 'object != NULL' failed
2018-06-06 23:53:25 +01:00
Jonas Kvinge 335bc89c97 Workaround for broken CD playback in Qt5 (#6021)
* Workaround for cdda URL in qUrl()

* Workaround for cdda URL in qUrl()

* Fix code formatting

* Fix code style
2018-03-09 23:09:55 +00:00
Florian Bigard 69b2a832db Merge branch 'master' into qt5 2017-01-18 15:57:07 +01:00
Santiago Gil 1c0891202d Let the audio sink autonegotiate the bit depth. (Possible fix for #5533) (#5541) 2016-12-21 14:40:40 +00:00
Chocobozzz 18a89f78a9 Merge remote-tracking branch 'upstream/master' into qt5 2016-10-07 14:30:09 +02:00
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