ffmpeg-mappable-media/src/FFMpeg/FFProbe/DataMapping/Stream.php

35 lines
754 B
PHP
Raw Normal View History

2013-06-25 10:03:20 +02:00
<?php
/*
* This file is part of PHP-FFmpeg.
*
* (c) Alchemy <info@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FFMpeg\FFProbe\DataMapping;
class Stream extends AbstractData
{
/**
2013-06-25 10:40:20 +02:00
* Returns true if the stream is an audio stream.
2013-06-25 10:03:20 +02:00
*
* @return Boolean
*/
public function isAudio()
{
return $this->has('codec_type') ? 'audio' === $this->get('codec_type') : false;
}
/**
2013-06-25 10:40:20 +02:00
* Returns true if the stream is a video stream.
2013-06-25 10:03:20 +02:00
*
* @return Boolean
*/
public function isVideo()
{
return $this->has('codec_type') ? 'video' === $this->get('codec_type') : false;
}
}