class video_preset in Video 6.5
Same name and namespace in other branches
- 6.4 includes/preset.inc \video_preset
- 7 includes/preset.inc \video_preset
Hierarchy
- class \video_preset
Expanded class hierarchy of video_preset
3 string references to 'video_preset'
- video_admin_preset_submit in ./
video.admin.inc - video_install in ./
video.install - Implementation of hook_install().
- video_update_6500 in ./
video.install - Implementation of hook_update_N().
File
- ./
video.lib.inc, line 108 - File containing Video module interfaces and classes
View source
class video_preset {
public $id = 0;
public $name = '';
public $help = '';
public $extension = '';
public $filenamesuffix = '';
/**
* Settings for the current transcoder
*
* @var array
*/
private $settings = NULL;
public function __construct(stdClass $dbdata) {
$this->id = $dbdata->id;
$this->name = $dbdata->name;
$this->help = $dbdata->help;
$this->extension = $dbdata->extension;
$this->filenamesuffix = $dbdata->filenamesuffix;
}
public function getSettings() {
if ($this->settings == NULL) {
$transcoder = variable_get('vid_convertor', 'video_localcommand');
$settings = db_result(db_query('SELECT data FROM {video_preset_settings} WHERE presetid = %d AND transcoder = "%s"', $this->id, $transcoder));
if ($settings) {
$this->settings = unserialize($settings);
}
else {
$this->settings = array();
}
}
return $this->settings;
}
public function setSettings(array $settings) {
$transcoder = variable_get('vid_convertor', 'video_localcommand');
$this->settings = $settings;
db_query('REPLACE INTO {video_preset_settings} SET data = "%s", presetid = %d, transcoder = "%s"', serialize($settings), $this->id, $transcoder);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
video_preset:: |
public | property | ||
video_preset:: |
public | property | ||
video_preset:: |
public | property | ||
video_preset:: |
public | property | ||
video_preset:: |
public | property | ||
video_preset:: |
private | property | Settings for the current transcoder | |
video_preset:: |
public | function | ||
video_preset:: |
public | function | ||
video_preset:: |
public | function |