[fpc-pascal] Pipe vs Memory buffer.
Michael Van Canneyt
michael at freepascal.org
Thu Jan 26 08:51:42 CET 2017
On Wed, 25 Jan 2017, fredvs wrote:
>> That will never work.
>
>> OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char
>> *_data, size_t _size,int *_error);
>
>> expects a memory buffer; you cannot pass it a stream.
>
> Ha, ok.
>
> And how to convert a pipe into a memory buffer ?
Read from it and append the content to the buffer.
This probably means some polling mechanism:
fpSelect on unix, WaitForObject on windows.
Or maybe using a thread. But that will require some synchronisation.
Michael.
More information about the fpc-pascal
mailing list