MediaFlagVideoCodec::getIcon()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 7
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 11
rs 10
1
<?php
2
3
/**
4
 * Video codec flag
5
 *
6
 * @author Sam Stenvall <[email protected]>
7
 * @copyright Copyright &copy; Sam Stenvall 2013-
8
 * @license https://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
9
 */
10
class MediaFlagVideoCodec extends MediaFlagStreamDetails
11
{
12
13
	protected function getIcon()
14
	{
15
		$codec = $this->video->codec;
16
17
		$icons = array(
18
			'h264'=>'80px-H264',
19
			'xvid'=>'80px-Xvid',
20
			'dx50'=>'80px-Divx',
21
			'avc1'=>'80px-Avc1');
22
23
		return array_key_exists($codec, $icons) ? $icons[$codec] : false;
24
	}
25
26
}