Creation of a setPasses method for the X264 format.

This commit is contained in:
Romain Biard 2016-11-10 12:19:17 -03:00
commit 010b3b8a6d
2 changed files with 54 additions and 5 deletions

View file

@ -119,7 +119,17 @@
</tr> </tr>
<tr> <tr>
<td class="type"> <td class="type">
string integer
</td>
<td class="last">
<a href="#method_setPasses">setPasses</a>(integer $passes)
<p>Sets the number of passes.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td> </td>
<td class="last"> <td class="last">
<a href="#method_getPasses">getPasses</a>() <a href="#method_getPasses">getPasses</a>()
@ -499,12 +509,37 @@
</div>
</div>
<h3 id="method_setPasses">
<div class="location">in <a href="../../../FFMpeg/Format/Video/X264.html#method_setPasses"><abbr title="FFMpeg\Format\Video\X264">X264</abbr></a> at line 68</div>
<code> public integer
<strong>setPasses</strong>(integer $passes)</code>
</h3>
<div class="details">
<p>Sets the number of passes.</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$passes</td>
</tr>
</table>
</div> </div>
</div> </div>
<h3 id="method_getPasses"> <h3 id="method_getPasses">
<div class="location">at line 68</div> <div class="location">in <a href="../../../FFMpeg/Format/Video/X264.html#method_getPasses"><abbr title="FFMpeg\Format\Video\X264">X264</abbr></a> at line 79</div>
<code> public string <code> public integer
<strong>getPasses</strong>()</code> <strong>getPasses</strong>()</code>
</h3> </h3>
<div class="details"> <div class="details">
@ -517,7 +552,7 @@
<table> <table>
<tr> <tr>
<td>string</td> <td>integer</td>
<td> <td>
</td> </td>
</tr> </tr>

View file

@ -19,6 +19,9 @@ class X264 extends DefaultVideo
/** @var boolean */ /** @var boolean */
private $bframesSupport = true; private $bframesSupport = true;
/** @var integer */
private $passes = 2;
public function __construct($audioCodec = 'libfaac', $videoCodec = 'libx264') public function __construct($audioCodec = 'libfaac', $videoCodec = 'libx264')
{ {
$this $this
@ -62,12 +65,23 @@ class X264 extends DefaultVideo
return array('libx264'); return array('libx264');
} }
/**
* @param $passes
*
* @return X264
*/
public function setPasses($passes)
{
$this->passes = $passes;
return $this;
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function getPasses() public function getPasses()
{ {
return 2; return $this->passes;
} }
/** /**