Skip to content
Snippets Groups Projects
Commit 431b81c4 authored by Ron Tapia's avatar Ron Tapia
Browse files

fix string formatting syntax in source.py

parent f76b2386
No related branches found
No related tags found
1 merge request!151fix string formatting syntax in source.py
Pipeline #348099 passed with warnings
......@@ -355,8 +355,8 @@ def fake(pipeline: pipetools.Pipeline, instrument: str, channel_name: str, block
caps = filters.caps(pipeline,
audio_test(pipeline, samples_per_buffer=int(blocksize / 8), wave=wave,
volume=volume, is_live=is_live, **properties),
"audio/x-raw, format=F64%s, rate=%d".format(BYTE_ORDER, rate))
return transform.tag_inject(pipeline, caps, "instrument=%s,channel-name=%s,units=strain".format(instrument, channel_name))
"audio/x-raw, format=F64%s, rate=%d" % (BYTE_ORDER, rate))
return transform.tag_inject(pipeline, caps, "instrument=%s,channel-name=%s,units=strain" % (instrument, channel_name))
def files(pipeline: pipetools.Pipeline, paths: Iterable[Union[str, pathlib.Path]], instrument: str, channel_name: str,
......@@ -381,11 +381,11 @@ def files(pipeline: pipetools.Pipeline, paths: Iterable[Union[str, pathlib.Path]
cache_path = laltools.create_cache(entries=paths, cache_path=cache_path)
src = cache(pipeline, location=cache_path.as_posix())
demux = mux.framecpp_channel_demux(pipeline, src, do_file_checksum=False, channel_list=["%s:%s".format(instrument, channel_name)])
demux = mux.framecpp_channel_demux(pipeline, src, do_file_checksum=False, channel_list=["%s:%s" % (instrument, channel_name)])
mux.FrameCPPChannelDemuxSetUnitsHandler(demux, dict.fromkeys(demux.get_property("channel-list"), "strain"))
# allow frame reading and decoding to occur in a different thread
src = transform.queue(pipeline, None, max_size_buffers=0, max_size_bytes=0, max_size_time=8 * pipetools.Gst.SECOND)
SrcDeferredLink(demux, "%s:%s".format(instrument, channel_name), src.get_static_pad("sink"))
SrcDeferredLink(demux, "%s:%s" % (instrument, channel_name), src.get_static_pad("sink"))
return src
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment