1<?php 2// =================================================================================================== 3// _ __ _ _ 4// | |/ /__ _| | |_ _ _ _ _ __ _ 5// | ' </ _` | | _| || | '_/ _` | 6// |_|\_\__,_|_|\__|\_,_|_| \__,_| 7// 8// This file is part of the Kaltura Collaborative Media Suite which allows users 9// to do with audio, video, and animation what Wiki platfroms allow them to do with 10// text. 11// 12// Copyright (C) 2006-2017 Kaltura Inc. 13// 14// This program is free software: you can redistribute it and/or modify 15// it under the terms of the GNU Affero General Public License as 16// published by the Free Software Foundation, either version 3 of the 17// License, or (at your option) any later version. 18// 19// This program is distributed in the hope that it will be useful, 20// but WITHOUT ANY WARRANTY; without even the implied warranty of 21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22// GNU Affero General Public License for more details. 23// 24// You should have received a copy of the GNU Affero General Public License 25// along with this program. If not, see <http://www.gnu.org/licenses/>. 26// 27// @ignore 28// =================================================================================================== 29 30/** 31 * @namespace 32 */ 33namespace Kaltura\Client\Type; 34 35/** 36 * @package Kaltura 37 * @subpackage Client 38 */ 39class FlavorAsset extends \Kaltura\Client\Type\Asset 40{ 41 public function getKalturaObjectType() 42 { 43 return 'KalturaFlavorAsset'; 44 } 45 46 public function __construct(\SimpleXMLElement $xml = null) 47 { 48 parent::__construct($xml); 49 50 if(is_null($xml)) 51 return; 52 53 if(count($xml->flavorParamsId)) 54 $this->flavorParamsId = (int)$xml->flavorParamsId; 55 if(count($xml->width)) 56 $this->width = (int)$xml->width; 57 if(count($xml->height)) 58 $this->height = (int)$xml->height; 59 if(count($xml->bitrate)) 60 $this->bitrate = (int)$xml->bitrate; 61 if(count($xml->frameRate)) 62 $this->frameRate = (float)$xml->frameRate; 63 if(count($xml->isOriginal)) 64 { 65 if(!empty($xml->isOriginal)) 66 $this->isOriginal = true; 67 else 68 $this->isOriginal = false; 69 } 70 if(count($xml->isWeb)) 71 { 72 if(!empty($xml->isWeb)) 73 $this->isWeb = true; 74 else 75 $this->isWeb = false; 76 } 77 if(count($xml->containerFormat)) 78 $this->containerFormat = (string)$xml->containerFormat; 79 if(count($xml->videoCodecId)) 80 $this->videoCodecId = (string)$xml->videoCodecId; 81 if(count($xml->status)) 82 $this->status = (int)$xml->status; 83 if(count($xml->language)) 84 $this->language = (string)$xml->language; 85 if(count($xml->label)) 86 $this->label = (string)$xml->label; 87 } 88 /** 89 * The Flavor Params used to create this Flavor Asset 90 * @var int 91 * @insertonly 92 */ 93 public $flavorParamsId = null; 94 95 /** 96 * The width of the Flavor Asset 97 * @var int 98 * @readonly 99 */ 100 public $width = null; 101 102 /** 103 * The height of the Flavor Asset 104 * @var int 105 * @readonly 106 */ 107 public $height = null; 108 109 /** 110 * The overall bitrate (in KBits) of the Flavor Asset 111 * @var int 112 * @readonly 113 */ 114 public $bitrate = null; 115 116 /** 117 * The frame rate (in FPS) of the Flavor Asset 118 * @var float 119 * @readonly 120 */ 121 public $frameRate = null; 122 123 /** 124 * True if this Flavor Asset is the original source 125 * @var bool 126 * @readonly 127 */ 128 public $isOriginal = null; 129 130 /** 131 * True if this Flavor Asset is playable in KDP 132 * @var bool 133 * @readonly 134 */ 135 public $isWeb = null; 136 137 /** 138 * The container format 139 * @var string 140 * @readonly 141 */ 142 public $containerFormat = null; 143 144 /** 145 * The video codec 146 * @var string 147 * @readonly 148 */ 149 public $videoCodecId = null; 150 151 /** 152 * The status of the Flavor Asset 153 * @var \Kaltura\Client\Enum\FlavorAssetStatus 154 * @readonly 155 */ 156 public $status = null; 157 158 /** 159 * The language of the flavor asset 160 * @var \Kaltura\Client\Enum\Language 161 */ 162 public $language = null; 163 164 /** 165 * The label of the flavor asset 166 * @var string 167 */ 168 public $label = null; 169 170} 171