Model/StreamService.php
public function startRecording($stream)
    {
        $parts = explode('/', $this->streamserver_config[$stream->getRtmpServer()]['rtmp_url']);
        $rtmp_app = end($parts);
        $success = $this->record(
            $this->streamserver_config[$stream->getRtmpServer()]['rtmp_control'],
            $rtmp_app,
            $stream->getUniqID()
        );
        if ($success) {
            $stream->setTechnicalStatus(Stream::STATE_RECORDING);
            $this->em->persist($stream);
            $this->em->flush();

            $event = new StartRecordingStreamEvent($stream);
            $this->dispatcher->dispatch(
                OktolabMediaEvent::STREAM_START_RECORDING,
                $event
            );
            return true;
        }
        return false;
    }
public function startRecording($stream)
    {
        $parts = explode('/', $this->streamserver_config[$stream->getRtmpServer()]['rtmp_url']);
        $rtmp_app = end($parts);
        $success = $this->record(
            $this->streamserver_config[$stream->getRtmpServer()]['rtmp_control'],
            $rtmp_app,
            $stream->getUniqID()
        );
        if ($success) {
            $stream->setTechnicalStatus(Stream::STATE_RECORDING);
            $this->em->persist($stream);
            $this->em->flush();

            $event = new StartRecordingStreamEvent($stream);
            $this->dispatcher->dispatch(
                OktolabMediaEvent::STREAM_START_RECORDING,
                $event
            );
            return true;
        }
        return false;
    }
public function startRecording ( $ stream ) { $ parts = explode ( '/' , $ this -> streamserver_config [ $ stream -> getRtmpServer ( ) ] [ 'rtmp_url' ] ) ; $ rtmp_app = end ( $ parts ) ; $ success = $ this -> record ( $ this -> streamserver_config [ $ stream -> getRtmpServer ( ) ] [ 'rtmp_control' ] , $ rtmp_app , $ stream -> getUniqID ( ) ) ; if ( $ success ) { $ stream -> setTechnicalStatus ( Stream :: STATE_RECORDING ) ; $ this -> em -> persist ( $ stream ) ; $ this -> em -> flush ( ) ; $ event = new StartRecordingStreamEvent ( $ stream ) ; $ this -> dispatcher -> dispatch ( OktolabMediaEvent :: STREAM_START_RECORDING , $ event ) ; return true ; } return false ; }
start recording a stream.
start recording a stream .