1
0
mirror of https://github.com/Rudloff/alltube.git synced 2024-06-22 07:06:40 +02:00

Missing doc

This commit is contained in:
Pierre Rudloff 2016-12-26 15:58:07 +01:00
parent e54df9b531
commit 20820d90f0
2 changed files with 16 additions and 2 deletions

View File

@ -293,6 +293,13 @@ class VideoDownload
return popen($chain->getProcess()->getCommandLine(), 'r');
}
/**
* Get video stream from an M3U playlist.
*
* @param \stdClass $video Video object returned by getJSON
*
* @return resource popen stream
*/
public function getM3uStream(\stdClass $video)
{
if (!shell_exec('which '.$this->config->avconv)) {
@ -312,8 +319,6 @@ class VideoDownload
]
);
//dump($procBuilder->getProcess()->getCommandLine()); die;
return popen($procBuilder->getProcess()->getCommandLine(), 'r');
}
}

View File

@ -217,6 +217,15 @@ class FrontController
return $response->withStatus(500);
}
/**
* Get a video/audio stream piped through the server.
* @param string $url URL of the video
* @param string $format Requested format
* @param Response $response PSR-7 response
* @param Request $request PSR-7 request
* @param string $password Video password
* @return Response
*/
private function getStream($url, $format, $response, $request, $password = null)
{
if (!isset($format)) {