On Thu, Jan 26, 2017 at 11:52 PM, fredvs <fi...@hotmail.com> wrote: > Hello Silvio: > > Yes, we are on the good way. >
Awesome. :-) > Following your advice, here from https-url-opus the result of : > > var > BufferURL: tbytes; > > setlength(BufferURL, PipeBufferSize); > CreatePipeHandles(InHandle, OutHandle, PipeBufferSize); > InPipe := TInputPipeStream.Create(InHandle); > OutPipe := TOutputPipeStream.Create(OutHandle); > httpget := TThreadHttpGetter.Create(url, OutPipe); > InPipe.Read(BufferURL[0],PipeBufferSize); > > writeln(tencoding.utf8.getstring(BufferURL)); > > ======> > > Lavf57.57.100 encoder=Lavc57.65.100 libopus title=Be Thankful%artist=For > What You GotWilliam De Vau$album=Blaxploitation Vol.3 The Payba > date=1997TRACKNUMBER=11OggS [...] Some streams requires you set its cursor to 0 before writing/reading buffer, so you need to check it: CreatePipeHandles(InHandle, OutHandle, PipeBufferSize); InPipe := TInputPipeStream.Create(InHandle); OutPipe := TOutputPipeStream.Create(OutHandle); httpget := TThreadHttpGetter.Create(url, OutPipe); OutPipe.Seek(0, soBeginning); InPipe.Seek(0, soBeginning); InPipe.Read(BufferURL[0],PipeBufferSize); Notice tencoding was just for testing. :-) -- Silvio Clécio
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal