Skip to content

danog\MadelineProto\OggWriter: Async OGG stream writer.

Back to index

Author: Daniil Gentili daniil@daniil.it

Async OGG stream writer.

Properties

  • $streamId: int

Method list:

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:

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 $channels and $sampleRate.

writeChunk(string $chunk, int $granuleDiff, bool $eos): void

Parameters:

  • $chunk: string
  • $granuleDiff: int
  • $eos: bool

Generated by danog/phpdoc