photo/app/Media/QuickTime/Atoms/moov/trak/mdia.php

33 lines
745 B
PHP
Raw Permalink Normal View History

2024-09-16 12:10:19 +00:00
<?php
namespace App\Media\QuickTime\Atoms\moov\trak;
use App\Media\QuickTime\Atoms\moov\trak\mdia\hdlr;
use App\Media\QuickTime\Atoms\SubAtom;
use App\Media\QuickTime\Atoms\Unknown;
class mdia extends SubAtom
{
private const subatom_classes = 'App\\Media\\QuickTime\\Atoms\\moov\\trak\\mdia\\';
public function __construct(int $offset,int $size,string $filename,?string $data)
{
parent::__construct($offset,$size,$filename);
// We'll find atoms
$this->atoms = $this->get_atoms(
self::subatom_classes,
Unknown::class,
$offset,
$size,
$data,
NULL,
fn($atom)=>($atom instanceof hdlr) ? $atom->cache['csubtype'] : NULL
);
// For debugging
if (FALSE)
$this->debug = hex_dump($data ?: $this->data());
}
}