public function endInput($source)
    {
        $this->streamingSource = $source;
        $sourceAllEnded = true;
        foreach ($this->sources as $src) {
            $sourceAllEnded &= $src->isEnded();
        }
        if ($sourceAllEnded) {
            $this->is_ended = true;
            $this->onInputEnd();
            foreach ($this->destinations as $node) {
                $node->endInput($this);
            }
        }
    }