Creation of a waveform method in FFMpeg\Media\Video
This commit is contained in:
		
					parent
					
						
							
								b7a8be46aa
							
						
					
				
			
			
				commit
				
					
						9f970c5d5a
					
				
			
		
					 4 changed files with 16 additions and 6 deletions
				
			
		|  | @ -3,7 +3,7 @@ | ||||||
| /* | /* | ||||||
|  * This file is part of PHP-FFmpeg. |  * This file is part of PHP-FFmpeg. | ||||||
|  * |  * | ||||||
|  * (c) Alchemy <dev.team@alchemy.fr> |  * (c) Strime <contact@strime.io> | ||||||
|  * |  * | ||||||
|  * For the full copyright and license information, please view the LICENSE |  * For the full copyright and license information, please view the LICENSE | ||||||
|  * file that was distributed with this source code. |  * file that was distributed with this source code. | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
| /* | /* | ||||||
|  * This file is part of PHP-FFmpeg. |  * This file is part of PHP-FFmpeg. | ||||||
|  * |  * | ||||||
|  * (c) Alchemy <dev.team@alchemy.fr> |  * (c) Strime <contact@strime.io> | ||||||
|  * |  * | ||||||
|  * For the full copyright and license information, please view the LICENSE |  * For the full copyright and license information, please view the LICENSE | ||||||
|  * file that was distributed with this source code. |  * file that was distributed with this source code. | ||||||
|  | @ -23,16 +23,16 @@ class WaveformFilters | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * Fixes the display ratio of the output frame. |      * Fixes the display ratio of the output waveform. | ||||||
|      * |      * | ||||||
|      * In case the sample ratio and display ratio are different, image may be |      * In case the sample ratio and display ratio are different, image may be | ||||||
|      * anamorphozed. This filter fixes this by specifying the output size. |      * anamorphozed. This filter fixes this by specifying the output size. | ||||||
|      * |      * | ||||||
|      * @return FrameFilters |      * @return WaveformFilters | ||||||
|      */ |      */ | ||||||
|     public function fixDisplayRatio() |     public function fixDisplayRatio() | ||||||
|     { |     { | ||||||
|         $this->frame->addFilter(new DisplayRatioFixerFilter()); |         $this->waveform->addFilter(new DisplayRatioFixerFilter()); | ||||||
| 
 | 
 | ||||||
|         return $this; |         return $this; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
| /* | /* | ||||||
|  * This file is part of PHP-FFmpeg. |  * This file is part of PHP-FFmpeg. | ||||||
|  * |  * | ||||||
|  * (c) Alchemy <dev.team@alchemy.fr> |  * (c) Strime <contact@strime.io> | ||||||
|  * |  * | ||||||
|  * For the full copyright and license information, please view the LICENSE |  * For the full copyright and license information, please view the LICENSE | ||||||
|  * file that was distributed with this source code. |  * file that was distributed with this source code. | ||||||
|  |  | ||||||
|  | @ -181,4 +181,14 @@ class Video extends Audio | ||||||
|     { |     { | ||||||
|         return new Frame($this, $this->driver, $this->ffprobe, $at); |         return new Frame($this, $this->driver, $this->ffprobe, $at); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * Gets the waveform of the video. | ||||||
|  |      * | ||||||
|  |      * @return Waveform | ||||||
|  |      */ | ||||||
|  |     public function waveform() | ||||||
|  |     { | ||||||
|  |         return new Waveform($this, $this->driver, $this->ffprobe); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue