]> git.parisson.com Git - timeside.git/commitdiff
Fix(test): skip live doctests on decoder and encoder
authorThomas Fillon <thomas@parisson.com>
Tue, 28 Oct 2014 14:21:00 +0000 (15:21 +0100)
committerThomas Fillon <thomas@parisson.com>
Tue, 28 Oct 2014 14:21:00 +0000 (15:21 +0100)
timeside/decoder/live.py
timeside/encoder/audiosink.py

index 0f3558be19f95e84831f8dab22152f90d82bd4bd..f5999cd6bb4dc79e461763dc2632b02a3d51aab2 100644 (file)
@@ -39,6 +39,12 @@ from gst import _gst as gst
 GST_APPSINK_MAX_BUFFERS = 10
 QUEUE_SIZE = 10
 
+#  TODO:
+# check if a soundcard device is available
+# alsasrc = gst.element_factory_make("alsasrc", "alsasrc")
+# alsasrc.probe_get_values_name('device')
+# ['hw:0,0']
+
 
 class LiveDecoder(FileDecoder):
     """Live source Decoder based on Gstreamer
@@ -69,7 +75,7 @@ class LiveDecoder(FileDecoder):
     >>> mp3_encoder = timeside.encoder.mp3.Mp3Encoder('/tmp/test_live.mp3',
     ...                                               overwrite=True)
     >>> pipe = (live_decoder | waveform | mp3_encoder)
-    >>> pipe.run()
+    >>> pipe.run()  # doctest: +SKIP
     >>> # Show the audio as captured by the decoder
     >>> import matplotlib.pyplot as plt # doctest: +SKIP
     >>> plt.plot(a.results['waveform_analyzer'].time, # doctest: +SKIP
index 08c7023bafe0ac7aa95bf849806c5b31acc672ea..5c1319782f182200a92e18a36615e3341d243bb7 100644 (file)
@@ -24,6 +24,13 @@ from timeside.core import implements, interfacedoc
 from timeside.encoder.core import GstEncoder
 from timeside.api import IEncoder
 
+#  TODO:
+# check if a soundcard device is available
+# alsasink = gst.element_factory_make("alsasink", "alsasink")
+# alsasink.probe_get_values_name('device')
+# ['hw:0,0', 'hw:0,3', 'hw:0,7', 'hw:0,8']
+
+
 
 class AudioSink(GstEncoder):
 
@@ -44,7 +51,7 @@ class AudioSink(GstEncoder):
     >>> wav_file = samples['sine440Hz_mono_1s.wav']
     >>> d = get_processor('file_decoder')(wav_file)
     >>> e = get_processor('live_encoder')()
-    >>> (d|e).run()
+    >>> (d|e).run()  # doctest: +SKIP
     """
 
     implements(IEncoder)