[fpc-pascal] Pipe vs Memory buffer.

fredvs fiens at hotmail.com
Wed Jan 25 23:13:35 CET 2017


Hello

In a C method:

OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char
*_data,
 size_t _size,int *_error);

translated in Pascal with this:

var
 op_test_memory: function(const _data; const size: cuint; out error: cint):
TOggOpusFile;

How to use a pipe for _data ?

The pipe is a TInputPipeStream.

Using this does not work:
pipein was created and linked to a url.

var
pipein :TInputPipeStream; /
PipeBufferSize := $4000;
...
op_test_memory(pointer(InPipe),PipeBufferSize, Err);

The error is -129 which is a null pointer or other generic internal error.

Thanks.

Fre;D




-----
Many thanks ;-)
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list