kopia lustrzana https://gitlab.com/sane-project/website
141 wiersze
5.6 KiB
HTML
141 wiersze
5.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||
<HTML>
|
||
<HEAD>
|
||
<TITLE>sane-devel: Passing duplex data from reader process</TITLE>
|
||
<META NAME="Author" CONTENT="Frederik Ramm (frederik@remote.org)">
|
||
<META NAME="Subject" CONTENT="Passing duplex data from reader process">
|
||
</HEAD>
|
||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
||
<H1>Passing duplex data from reader process</H1>
|
||
<!-- received="Fri Mar 2 10:09:35 2001" -->
|
||
<!-- isoreceived="20010302180935" -->
|
||
<!-- sent="Fri, 2 Mar 2001 18:20:45 +0000" -->
|
||
<!-- isosent="20010302182045" -->
|
||
<!-- name="Frederik Ramm" -->
|
||
<!-- email="frederik@remote.org" -->
|
||
<!-- subject="Passing duplex data from reader process" -->
|
||
<!-- id="20010302182045.A10623@aruba.remote.org" -->
|
||
<STRONG>From:</STRONG> Frederik Ramm (<A HREF="mailto:frederik@remote.org?Subject=Re:%20Passing%20duplex%20data%20from%20reader%20process&In-Reply-To=<20010302182045.A10623@aruba.remote.org>"><EM>frederik@remote.org</EM></A>)<BR>
|
||
<STRONG>Date:</STRONG> Fri Mar 02 2001 - 10:20:45 PST
|
||
<P>
|
||
<!-- next="start" -->
|
||
<LI><STRONG>Next message:</STRONG> <A HREF="0035.html">Shea A Martin: "Acer 640U: Oliver & Sebastion"</A>
|
||
<UL>
|
||
<LI><STRONG>Previous message:</STRONG> <A HREF="0033.html">Shea A Martin: "Re: Preview-when scanning?"</A>
|
||
<!-- nextthread="start" -->
|
||
<LI><STRONG>Next in thread:</STRONG> <A HREF="0037.html">Oliver Rauch: "Re: Passing duplex data from reader process"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0037.html">Oliver Rauch: "Re: Passing duplex data from reader process"</A>
|
||
<!-- reply="end" -->
|
||
<LI><STRONG>Messages sorted by:</STRONG>
|
||
<A HREF="date.html#34">[ date ]</A>
|
||
<A HREF="index.html#34">[ thread ]</A>
|
||
<A HREF="subject.html#34">[ subject ]</A>
|
||
<A HREF="author.html#34">[ author ]</A>
|
||
</UL>
|
||
<HR NOSHADE><P>
|
||
<!-- body="start" -->
|
||
<P>
|
||
Hi,
|
||
<BR>
|
||
<P> we've discussed how to handle duplex in a backend; the almost-
|
||
<BR>
|
||
consensus was to have the scanner scan both sides when the first
|
||
<BR>
|
||
"sane_start" is issued, but only return the front page, and then when
|
||
<BR>
|
||
a second "sane_start" follows, return the back side.
|
||
<BR>
|
||
<P>As mentioned earlier, my driver uses a separate process for reading
|
||
<BR>
|
||
from the scanner; that process also decodes the image in front and
|
||
<BR>
|
||
back, and caches the back page. It writes its output to a pipe,
|
||
<BR>
|
||
which is read from the other process, within "sane_read". "sane_read"
|
||
<BR>
|
||
normally reads until the other end closes the pipe. Currently, for
|
||
<BR>
|
||
testing, I just write the front and back pages to the pipe, resulting
|
||
<BR>
|
||
in an image that is twice as high as requested.
|
||
<BR>
|
||
<P>I have to change that somehow, to let sane_read know when to stop
|
||
<BR>
|
||
reading *although there's still data available* (and return that
|
||
<BR>
|
||
additional data only after another sane_start has been called).
|
||
<BR>
|
||
<P>There's a myriad of ways to possibly do it and I am not sure how to
|
||
<BR>
|
||
proceed. Some ideas:
|
||
<BR>
|
||
<P>+ Let sane_start calculate the number of bytes expected, and
|
||
<BR>
|
||
let sane_read stop reading after that number of bytes. This
|
||
<BR>
|
||
would be easy to implement but what if e.g. the paper in the
|
||
<BR>
|
||
scanner is shorter than expected?
|
||
<BR>
|
||
<P>+ Instead of sending raw image data over the pipe, let the reader
|
||
<BR>
|
||
process send a header first - something that describes the
|
||
<BR>
|
||
nature and amount of data to follow. However, such a header
|
||
<BR>
|
||
would be most useful if it was already available when the
|
||
<BR>
|
||
front-end calls "sane_get_parameters", wouldn't it?
|
||
<BR>
|
||
<P>+ Open a second pipe between the backend and its reader process
|
||
<BR>
|
||
and use that pipe to transfer control information - either FROM
|
||
<BR>
|
||
the reader process ("image 01 follows, 123456 bytes") or TO
|
||
<BR>
|
||
the reader process ("send image 01 now").
|
||
<BR>
|
||
<P>+ Use IPC to communicate between reader process and backend...
|
||
<BR>
|
||
<P>Any suggestions?
|
||
<BR>
|
||
<P>Thanks
|
||
<BR>
|
||
Frederik
|
||
<BR>
|
||
<P><PRE>
|
||
--
|
||
Frederik Ramm ## eMail <A HREF="mailto:frederik@remote.org?Subject=Re:%20Passing%20duplex%20data%20from%20reader%20process&In-Reply-To=<20010302182045.A10623@aruba.remote.org>">frederik@remote.org</A> ## N57<35>48.10' W005<30>40.32'
|
||
<P><P>--
|
||
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
||
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Passing%20duplex%20data%20from%20reader%20process&In-Reply-To=<20010302182045.A10623@aruba.remote.org>">majordomo@mostang.com</A>
|
||
</PRE>
|
||
<P><!-- body="end" -->
|
||
<HR NOSHADE>
|
||
<UL>
|
||
<!-- next="start" -->
|
||
<LI><STRONG>Next message:</STRONG> <A HREF="0035.html">Shea A Martin: "Acer 640U: Oliver & Sebastion"</A>
|
||
<LI><STRONG>Previous message:</STRONG> <A HREF="0033.html">Shea A Martin: "Re: Preview-when scanning?"</A>
|
||
<!-- nextthread="start" -->
|
||
<LI><STRONG>Next in thread:</STRONG> <A HREF="0037.html">Oliver Rauch: "Re: Passing duplex data from reader process"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0037.html">Oliver Rauch: "Re: Passing duplex data from reader process"</A>
|
||
<!-- reply="end" -->
|
||
<LI><STRONG>Messages sorted by:</STRONG>
|
||
<A HREF="date.html#34">[ date ]</A>
|
||
<A HREF="index.html#34">[ thread ]</A>
|
||
<A HREF="subject.html#34">[ subject ]</A>
|
||
<A HREF="author.html#34">[ author ]</A>
|
||
</UL>
|
||
<!-- trailer="footer" -->
|
||
<HR NOSHADE>
|
||
<P>
|
||
<SMALL>
|
||
<EM>
|
||
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
||
: <EM>Fri Mar 02 2001 - 10:10:43 PST</EM>
|
||
</EM>
|
||
</SMALL>
|
||
</BODY>
|
||
</HTML>
|