Commit Graph

139 Commits

Author SHA1 Message Date
Thomas Adamcik
a036e84a20 audio: Update scanner to not use gst.Bus.poll
Turns out poll sets up it's own mainloop in the default context causing us to
segfault.
2013-12-05 22:43:27 +01:00
Thomas Adamcik
10a448f90d audio: Cleanup scanner code and support live sources
- Make attributes internal with _ naming
- Cleanup handling of min durtion. Min set to None disables the check.
- Check state change result for no preroll which indicates a live source which
  must transistion to playing to get tags etc.
2013-12-04 23:41:39 +01:00
Thomas Adamcik
c128668621 listeners: Make listeners async
- Add a common Listener base class
- Make send helper for sending out events with pykka
- Make send async helper for avoiding blocking events

This change ensures all the events now get sent out via the MainThread instead
of blocking the actors.
2013-11-26 15:10:48 +01:00
Stein Magnus Jodal
495c0b627b audio: Change to software mixing by default 2013-11-16 15:05:01 +01:00
Thomas Adamcik
37ba3ca01d Merge branch 'develop' into feature/commands-helper-tmp
Conflicts:
	mopidy/utils/log.py
2013-11-14 23:36:27 +01:00
Lasse Bigum
9ba5f6862f Merge branch 'develop' of https://github.com/mopidy/mopidy into feature/extra_tags 2013-11-13 00:23:44 +01:00
Thomas Adamcik
3945e437de docs: Fix minor doc issues found during review
- Adds autodoc for mopidy.audio.scan
- Updates ``file://`` to ``local:``
- Minor language fix.
2013-11-09 13:30:27 +01:00
Lasse Bigum
2bd1f043ce Updated code with new multiple artist handling and added tests 2013-11-09 03:01:53 +01:00
Lasse Bigum
8b7621c3e3 Merge branch 'develop' of https://github.com/mopidy/mopidy into feature/extra_tags 2013-11-09 02:37:44 +01:00
Lasse Bigum
c776565f65 Another round of review comments 2013-11-09 01:22:27 +01:00
Lasse Bigum
093c0400a9 Fix review comments 2013-11-08 21:43:31 +01:00
Lasse Bigum
03750a8bf2 Fix scan with multiple track artists and add tests 2013-11-08 21:25:21 +01:00
Thomas Adamcik
dc3cf427b6 scanner/mpd: Add TODOs for later and fix flake8 warning 2013-11-06 19:19:17 +01:00
Thomas Adamcik
e6381a1a0a audio: Add mtime to scanner results for file: uris 2013-11-06 19:10:49 +01:00
Thomas Adamcik
469f414c4c audio: Don't do duration conversion to ms in scanner 2013-11-06 19:10:49 +01:00
Thomas Adamcik
16ac5277f6 audio: Make min duration in scanner configurable. 2013-11-06 19:10:49 +01:00
Thomas Adamcik
20b0602842 audio/scanner: Move translator into audio.
Tries to move more of the gst bits and pieces we are leaking into audio.
2013-11-06 19:10:49 +01:00
Thomas Adamcik
0a2d74eff1 scanner: Update to use new mopidy.audio.scan
Also adds the check less than 100ms check back to the scanner.
2013-11-06 19:10:49 +01:00
Thomas Adamcik
d6ab78a86c audio: Re-add improved version of python based scanner.
- Unlike the old python version we do not wait for the first audio handoff, we
  only progress until the PAUSED state. This ensure we don't block on empty files.
- Instead of using the signal watch and running the main loop we simply poll
  the messages from the bus directly allowing for a synchronous code flow.
- Between each file the pipeline is always returned to NULL, this is done as we
  found that gst 0.10 will slow down as the uribin does not cleanup the
  children it creates for handling each file. This issue is not present in 1.0.
- This also works around a segfault that was likely caused by a race condition
  that seems to trigger in the 0.10 version of the pbutils discoverer.
- This version of the scanner also fixes the per track slow down, and works out
  to be considerably faster than even the built in discoverer from 1.0.
- Finally this removes the WMA hack as I kan no longer find any evidence of it
  being needed.
2013-11-06 19:10:49 +01:00
Stein Magnus Jodal
c2173954c8 audio: Reorder methods 2013-10-09 23:06:18 +02:00
Stein Magnus Jodal
076dd56d6b audio: Tweak mute docs, fix set_mute() return type if no mixer_track 2013-10-09 23:06:01 +02:00
Stein Magnus Jodal
56b1d6390c Merge branch 'develop' into feature/audio-mute 2013-10-09 22:57:16 +02:00
Javier Domingo Cansino
7d20f372bd Following thomas' suggestions, correct mixer mute 2013-10-08 11:51:02 +02:00
Javier Domingo Cansino
4305afb81d Now it's also prepared for mixer level, thanks adam 2013-10-08 10:19:25 +02:00
Javier Domingo Cansino
623f960552 Improving a little the mute code, but still don't know how to mute at mixer level 2013-10-08 09:20:02 +02:00
Thomas Adamcik
2e1971af89 audio: Handle min=max when scaling volumes (fixes: #525)
Also add gobject.threads_init() so we can run the audio actor test on its own.
2013-10-06 22:24:36 +02:00
Thomas Adamcik
c235f7259a audo: Remove stale TODOs 2013-10-06 19:56:03 +02:00
Thomas Adamcik
a5e26f9b54 audio: flake8 fixes 2013-10-06 16:57:32 +02:00
Thomas Adamcik
b1b522694e audio: Fix lots of playlist issues and add tests. 2013-10-06 15:22:17 +02:00
Thomas Adamcik
4a94433237 audio: Wrap long line, and explain conidtional instalation of icy element. 2013-10-06 14:19:28 +02:00
Thomas Adamcik
9e682d9248 audio: Check for asx/xspf in data before parsing during detection. 2013-10-06 14:18:53 +02:00
Thomas Adamcik
42a05458a0 Merge branch 'develop' into feature/gstreamer-playlists 2013-10-06 14:00:45 +02:00
Javier Domingo Cansino
390194afc3 Adding the possibility to mute at app level mopidy 2013-09-17 12:37:45 +02:00
Pavol Babincak
0098e76dc7 Properly encode localised mixer names before log 2013-08-15 20:54:10 +02:00
Stein Magnus Jodal
404fb00235 Remove pylint remnants 2013-08-08 21:12:42 +02:00
Stein Magnus Jodal
5c7a496dc2 Fix flake8 warnings 2013-08-08 21:09:01 +02:00
Thomas Adamcik
20729eabe3 audio: Add visualiser support and adjust playbin flags
Sets up playbin to use just audio, soft_volume and downloading.
2013-07-31 23:55:59 +02:00
Thomas Adamcik
6e942a92b3 audio: Post an error if an urilist expands to another urilist 2013-07-04 17:49:10 +02:00
Thomas Adamcik
f3051c9dd3 audio: Only install icysrc when nothing is already supporting the scheme 2013-06-26 23:34:55 +02:00
Thomas Adamcik
0bcb805cf5 audio: Improve xml playlist handling 2013-06-26 23:31:53 +02:00
Thomas Adamcik
f67aa95c2e audio: add basic .asx support 2013-06-26 22:29:13 +02:00
Thomas Adamcik
d3f97c128c audio: Review cleanups 2013-06-02 16:03:29 +02:00
Thomas Adamcik
a112275c25 audio: Add IcySrc.
Quick hack that wraps a regular HTTP src in a custom bin that converts icy://
to http:// - this is needed to get for instance http://somafm.com/m3u/groovesalad.m3u
to work.
2013-05-29 00:18:23 +02:00
Thomas Adamcik
a2b95c3a3a audio: Cleanup playlists elements docs and interace. 2013-05-28 23:54:23 +02:00
Thomas Adamcik
acbaab59e5 audio: A uri list element.
This element "simply" takes the list of uris that our other elements have
already converted to simpler format, picks the first uri and play it. This
is done by ensuring that we block the right EOS messages, and all new segment
messages from the original sources. With these events blocked we can inject
our own nested uridecodebin to play the uri and push our own data. The nested
uridecodebin is setup with caps('any') to ensure that we don't suddenly demux
and end up with multiple streams by accident.
2013-05-28 23:35:47 +02:00
Thomas Adamcik
e2f9a3bad6 audio: Add playlist decoders.
These elements convert their respective formats to an urilist that we can
handle in a genric way.
2013-05-28 23:35:47 +02:00
Thomas Adamcik
1138ff8793 audui: Add BasePlaylistElement
This element is the building block for the "decoders" that will convert
the m3u, pls and xspf files to urilists and also the urilist player.
2013-05-28 23:35:47 +02:00
Thomas Adamcik
0f749702c4 audio: Add simple parsers for m3u, pls, xspf and uri lists.
These parsers, and the detectors should probably be moved out at some point,
but for now the simple version of these will do.
2013-05-28 23:35:47 +02:00
Thomas Adamcik
c376ac4183 audio: Start adding playlist typefinder code.
This allows gstreamer pipelines to determine when they are getting m3u, pls or
xspf files and distinguish them from text/plain content.
2013-05-28 23:06:12 +02:00
Stein Magnus Jodal
370cf133fa docs: Remove mixers' module docs 2013-05-01 21:43:40 +02:00