On Wed, 25 Jan 2017, fredvs wrote:

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.

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.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to