AW: AW: AW: Serial port interface on frame grabber

James Cameron quozl at laptop.org
Thu Jun 28 22:45:34 UTC 2018


It sounds like a fascinating problem; and the market lack of solutions
demonstrates how hard it is to solve.  I think you need to dig into
the components you are using to find out how they work.

The filesrc element is intended for use with files.  While Linux
exposes serial ports in a file-like manner, they aren't files, because
they don't behave in the same way over time.

Use strace to examine how the filesrc element is reading from the
serial port; it may be making a read syscall, with blocking, for the
value of element properly blocksize; default 4096 bytes.  This would
be the most efficient for reading from a file, but not necessarily
what you want for reading from a serial port.  After each pause in
transmission (and there will be pauses because it is a firmware driven
packet radio), there will be a remainder of bytes in the buffer yet to
be passed into the pipeline.  When enough packets arrive, the read
syscall will complete.  Try a smaller blocksize.  Add a larger queue
element.  Use the filesrc element sources to find out what it does and
why.

Split the problem.  Temporarily exclude the serial link by emulating
it between two GStreamer pipelines.  Locate or write a serial port
emulator which feeds a byte at a time and pauses for a very short time
in order to achieve 115200 baud throughput.  Perhaps the Ubuntu
package trickle could be used for ideas.

Measure the timing of arrival of serial data, and reproduce that same
timing in the emulator.

-- 
James Cameron
http://quozl.netrek.org/


More information about the gstreamer-devel mailing list