Lukas Prediger
5705d4fd85
Fix: Detaching bus callback in ~GstEnginePipeline
2021-10-09 12:07:56 +01:00
Jim Broadus
2804a4d89f
gstengine: Make output format configurable
...
Add an output format option in playback settings. The options are
Detect, S16LE, and F32LE. Selecting Detect will use the existing
behavior and detect the native format when the pipeline starts. The
other options will set the format when the pipeline is built.
2021-04-03 13:56:22 +01:00
Jim Broadus
5ffdb7d98c
gstengine: Move pipeline id handling to base class
...
Move the id and the global counter from GstEnginePipeline to GstPipelineBase.
Make counter atomic.
2021-01-13 22:59:49 +00:00
Jim Broadus
f9e9dae73d
gstengine: Add a base class for pipelines
...
This allows debug functionality to be shared.
2021-01-10 18:14:57 +00:00
Jim Broadus
25d3fca079
gstengine: Fix output audio depth
...
When the decoder bin's src pad becomes available, check its caps
for a format. If the format is not S16LE, then apply F32LE caps
before the tee. This prevents the pipeline from negotiating
S16LE when the decoder produces other formats.
2021-01-06 20:39:33 +00:00
Jim Broadus
06066dfba4
gstengine: Add a caps filter in pipeline before tee
2021-01-06 20:39:33 +00:00
Jim Broadus
c353deba0c
gstengine: Add a DumpGraph method to GstEnginePipeline
...
This will write a .dot graph and can be integrated with the debug console.
2021-01-01 16:26:29 +00:00
Jim Broadus
a012e7e273
gstengine: Fix InitFromString return value
...
GstEnginePipeline::InitFromString was attempting to link the decoder and audio
bins twice and returning the result of the failed second attempt as it's own
status. The return value was also being ignored by the caller.
2020-12-27 21:50:06 +00:00
John Maguire
341dc7326f
Reformat all C++
2020-09-22 14:56:06 +01:00
Jim Broadus
236cfa7adf
Don't include cdda code if HAVE_AUDIOCD isn't defined
2020-06-01 22:09:46 +01:00
Jim Broadus
6a5cb0712d
gstengine: Fix gtreamer request pad leak
...
According to the gst_element_request_pad documentation, request pads must be
released after usage. They aren't automatically released and dereferenced when
the element is destroyed.
2020-05-15 11:12:34 +01:00
Jim Broadus
9ed5503ee3
Add MediaPlaybackRequest class.
...
Add a class to wrap the URL in the playback engines. In the future, this will
contain authentication information for the specified URL. It can also include
the start and end time as well as other data that is currently specified along
with the URL.
2020-03-11 10:57:21 +00: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
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
Eduardo Sánchez Muñoz
5db60bf365
GstEnginePipeline: Rename last_known_position_ to last_known_position_ns_.
2015-07-02 12:34:24 +02:00
Eduardo Sánchez Muñoz
4af4e185da
Fix song continuously rewinding when seeking using keyboard arrow keys.
2015-07-01 20:24:17 +02: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
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
David Sansome
a2408f7c0e
Merge branch 'master' into gstreamer-1.2
...
Conflicts:
src/moodbar/moodbarloader.cpp
2014-09-21 19:39:27 +10: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
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
2d7be1502f
Get audio device names on OS X too.
2014-03-29 22:44:08 +11: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
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
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
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
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
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
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
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
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
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