public function createStream($serverconfig = null)
    {
        if ($serverconfig == null) {
            $serverconfig = $this->default_streamserver_config;
        }
        $stream = new $this->stream_class;
        $stream->setRtmpServer($this->streamserver_config[$serverconfig]['rtmp_url']);
        $stream->setRtmpApp($this->streamserver_config[$serverconfig]['app']);
        return $stream;
    }