public function nextFrame()
    {
        if ($this->parse()) {
            $frame = $this->getFrame();
            $this->frame = null;
            if ($this->observer) {
                $this->observer->receivedFrame($frame);
            }
            return $frame;
        }
        return null;
    }