Flac final class
Minn\Media\Av\Flac · public/minn/src/Minn/Media/Av/Flac.php · 115 lines
FLAC, on its own or as the first packet of an Ogg stream, as the reference's media reader measures it (probe media-meta): the stream information block gives the rate, channels, depth and samples, the comment block names the encoder, and a picture block is the cover.
Public
| static | read(Minn\Media\Av\Source $source): array# | A native FLAC file's analysis: the data after the metadata blocks, the playing time from the sample count and a bitrate over the whole file. @return array<string, mixed> | |||
| static | stream(array $info, int|float|null $bitrate, ?string $vendor): array# | The stream a FLAC stream information block and vendor describe, with the bitrate when one is known.
@return array<string, mixed> | |||
| static | streamInfo(string $block): ?array# | A stream information block's rate, channels, depth and sample count. @return array{sampleRate: int, channels: int, bits: int, samples: int}|null |
Internals 2
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | blocks(Minn\Media\Av\Source $source, int $at): array# | The metadata blocks from $at: the stream information, the comment block's vendor, the first picture, and where the audio begins. @return array{info: ?array, vendor: ?string, picture: ?array, end: int} |
| private | picture(string $body): ?array# | A picture block's image: its type and bytes. @return array<string, mixed>|null |
Nothing matches.