From 7d839a5fb72611ede0a092c7617354b622e1607e Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Tue, 28 Oct 2014 15:21:00 +0100 Subject: [PATCH] Fix(test): skip live doctests on decoder and encoder --- timeside/decoder/live.py | 8 +++++++- timeside/encoder/audiosink.py | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/timeside/decoder/live.py b/timeside/decoder/live.py index 0f3558b..f5999cd 100644 --- a/timeside/decoder/live.py +++ b/timeside/decoder/live.py @@ -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 diff --git a/timeside/encoder/audiosink.py b/timeside/encoder/audiosink.py index 08c7023..5c13197 100644 --- a/timeside/encoder/audiosink.py +++ b/timeside/encoder/audiosink.py @@ -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) -- 2.39.5