danog\MadelineProto\OggWriter: Async OGG stream writer.
Author: Daniil Gentili daniil@daniil.it
Async OGG stream writer.
Properties
$streamId:int
Method list:
__construct(\Amp\ByteStream\WritableStream|\danog\MadelineProto\LocalFile $out, ?int $streamId = NULL)resume(): boolwriteHeader(int $channels, int $sampleRate, string $opusVersion, (string|null) $opusHead = NULL): voidwriteChunk(string $chunk, int $granuleDiff, bool $eos): void
Methods:
__construct(\Amp\ByteStream\WritableStream|\danog\MadelineProto\LocalFile $out, ?int $streamId = NULL)
Write an ogg OPUS file.
Parameters:
$out:\Amp\ByteStream\WritableStream|\danog\MadelineProto\LocalFile$streamId:?int
See also:
\Amp\ByteStream\WritableStream\danog\MadelineProto\LocalFile: Indicates a local file to upload.
resume(): bool
Reopen the file at its end to continue the stream, after a restart. Returns false if it can’t continue (it was ended, written to a stream, or the file no longer exists): the owner should then start a new one.
writeHeader(int $channels, int $sampleRate, string $opusVersion, (string|null) $opusHead = NULL): void
Write the OpusHead and OpusTags header pages.
Parameters:
$channels:int$sampleRate:int$opusVersion:string$opusHead:(string|null)A complete OpusHead packet to use verbatim (for a multichannel or pre-existing stream), instead of building a family-0 one from$channelsand$sampleRate.
writeChunk(string $chunk, int $granuleDiff, bool $eos): void
Parameters:
$chunk:string$granuleDiff:int$eos:bool
Generated by danog/phpdoc