Stein Magnus Jodal
bf6e97e5b9
gst1: Fix querying of duration of MP3s
2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
780c493af3
gst1: Replace Structure(...) with Stricture.new_empty(...)
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
eb4c742015
gst1: Run gst.init() if needed everywhere using Gst
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
592f5dec53
gst1: Remove deprecated GObject.threads_init()
...
Ref https://wiki.gnome.org/Projects/PyGObject/Threading
"The requirement to call GObject.threads_init() has been removed from
PyGObject 3.10.2 when using Python native threads with GI (via the
threading module) as well as with GI repositories which manage their own
threads that may call back into Python (like GStreamer callbacks). The
GObject.threads_init() function will still exist for the entire 3.x
series for compatibility reasons but emits a deprecation warning."
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
20b1c21b0b
gst1: Avoid using pipeline.get_clock()
...
Often the clock isn't available for use. gst_pipeline_clock() which is
always available requires Gst 1.6.
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
87b1c9455c
gst1: Update query_duration() usage
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
a0714455cd
gst1: Use methods to get struct fields
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
e6a4042c3e
gst1: Replace message.structure with message.get_structure()
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
1b47b6341e
gst1: Replace message_new_application() with Message.new_application()
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
7c473eed07
gst1: Replace MESSAGE_* with MessageType.*
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
1911ea0c10
gst1: Replace STATE_CHANGE_* with StateChangeReturn.*
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
3c2f83f6a6
gst1: Replace Gst.URI_SRC with Gst.URIType.SRC
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
bd077591d0
gst1: Replace element_make_from_uri() with Element.make_from_uri()
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
2920f83065
gst1: Replace decodebin2 with decodebin
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
c8ad7e3a41
gst1: Replace Caps() with Caps.from_string()
...
And audio/x-raw-int and audio/x-raw-float with audio/x-raw
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
aa3650bf34
gst1: Update query_new_duration()
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
6c59205efe
gst1: Replace 'struct[x] = y' with 'struct.set_value(x, y)'
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
1cf450940a
gst1: Replace get_pad() with get_static_pad()
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
e402c9816c
gst1: Replace get_caps() with query_caps()
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
5d6981d70e
gst1: Update FORMAT_* with Format.*
2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
dfaed1e4c2
gst1: Replace STATE_* with State.*
2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
ab24222eb6
gst1: Replace gst.element_link_many()
2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
f00f24ffde
gst1: Replace element_factory_make() with ElementFactory.make()
2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
1d269af210
gst1: Call Gst.init() and remove sys.argv hack
...
GStreamer no longer use sys.argv directly. If you want GStreamer to
handle command line arguments, you must pass them explicitly to
Gst.init().
2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
8c82f4773f
gst1: Update imports to use PyGI
2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
f62057a9ad
flake8: Fix compat with pep8 1.7.0
...
(cherry picked from commit 18b609fa6e )
2016-01-20 08:21:10 +01:00
Stein Magnus Jodal
92187f2c3f
audio: Add timeout arg to scan()
2015-09-13 11:56:16 +02:00
Thomas Adamcik
e77a4afaf4
audio: Make scanner report MIME for missing plugins
2015-08-18 23:56:42 +02:00
Thomas Adamcik
087ee42882
audio: Fix scan timeout handling
2015-08-16 12:06:14 +02:00
Stein Magnus Jodal
d8bcd7f273
Rename mopidy.utils to mopidy.internal
2015-05-07 23:15:56 +02:00
Stein Magnus Jodal
093c4340cd
Merge branch 'v1.0.x' into develop
...
Conflicts:
mopidy/audio/scan.py
tests/audio/test_scan.py
2015-04-13 08:19:14 +02:00
Stein Magnus Jodal
f85ea2a39d
flake8: Fix new import order warnings
...
(cherry picked from commit 71ab9733c7 )
2015-04-12 23:05:53 +02:00
Stein Magnus Jodal
71ab9733c7
flake8: Fix new import order warnings
2015-04-12 23:03:46 +02:00
Thomas Adamcik
1a1a0753a4
audio: Use print function in scanner
2015-04-12 14:16:35 +02:00
Thomas Adamcik
9bc4d8b713
audio: Make scanner handle all media types.
...
I don't think this makes anything slower, as before we would still decode
anything we came across in the hopes that we find raw audio.
2015-04-11 00:29:07 +02:00
Thomas Adamcik
dfaa3f1433
audio: Have scanner tell us if we found decodeable audio
2015-04-11 00:21:35 +02:00
Thomas Adamcik
05c4af017b
audio: Create fakesinks on the fly for scanner pads
...
This makes us correctly handle say when someone gives us a movie, or something
else that seems to have multiple things that can be encoded internally.
2015-04-11 00:21:35 +02:00
Thomas Adamcik
c77b63f4c8
audio: Add main method to scanner for quick testing
2015-04-11 00:21:35 +02:00
Stein Magnus Jodal
c4940cbea2
autopep8: Add space after class signature/docstring
2015-04-03 00:05:26 +02:00
Thomas Adamcik
7e66b719ea
audio: pipeline.add_many() is deprecated
2015-03-26 21:54:23 +01:00
Thomas Adamcik
faab0b755a
audio: Filter for messages we care about, rest will be dropped
2015-03-13 22:39:52 +01:00
Thomas Adamcik
9e8b3263ab
audio: Use timed pop for message loop and gst clocks
2015-03-13 22:36:35 +01:00
Thomas Adamcik
628c828087
audio: Recreate scan pipeline for each scan
...
Turns out this code runs a lot faster when we fully destroy the decodebins
between scans. And since going to NULL isn't enough I opted to just go for
redoing the whole pipeline instead of adding and removing decodebins all the
time.
As part of this almost all the logic has been ripped out of the scan class and
into internal functions. The external interface has been kept the same for now.
But we could easily switch to `scan(uri, timeout=1000, proxy=None)`
2015-03-13 00:23:01 +01:00
Thomas Adamcik
411bae5a56
audio: Raise error for unknown protocol types
2015-03-12 23:21:53 +01:00
Thomas Adamcik
9c9d05be36
audio: Only warn about missing plugin on errors
2015-03-12 22:11:50 +01:00
Thomas Adamcik
837f2de629
audio: Add typefinder to scanner and add mime to result
...
This should allow us to move playlist handling out of GStreamer
as we will short circuit for text/* and application/xml now.
2015-03-12 22:11:50 +01:00
Thomas Adamcik
c93eaad7ed
audio: Try and reuse source when we can
2015-03-12 22:11:50 +01:00
Thomas Adamcik
24cceb69eb
audio: Going to ready is pointless in this code.
2015-03-12 22:11:50 +01:00
Thomas Adamcik
cd579ff7bb
audio: Going to NULL already handles the flushing for us
2015-03-12 22:11:50 +01:00
Thomas Adamcik
ccd3753b30
audio: Switch to decodebin2 in scanner and handle our own sources
...
This is needed to be able to put in our own typefind and catch playlists before
they make it to the decoder.
2015-03-12 22:11:50 +01:00