Massive refactor to use SihnonFramework and PEAR's Net_Gearman
This commit is contained in:
77
source/lib/RippingCluster/Rips/SourceAudioTrack.class.php
Normal file
77
source/lib/RippingCluster/Rips/SourceAudioTrack.class.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
class RippingCluster_Rips_SourceAudioTrack {
|
||||
|
||||
protected $id;
|
||||
protected $name;
|
||||
protected $format;
|
||||
protected $channels;
|
||||
protected $language;
|
||||
protected $samplerate;
|
||||
protected $bitrate;
|
||||
|
||||
public function __construct($id, $name, $format, $channels, $language, $samplerate, $bitrate) {
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
$this->format = $format;
|
||||
$this->channels = $channels;
|
||||
$this->language = $language;
|
||||
$this->samplerate = $samplerate;
|
||||
$this->bitrate = $bitrate;
|
||||
}
|
||||
|
||||
public function id() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function name() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName($name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function format() {
|
||||
return $this->format;
|
||||
}
|
||||
|
||||
public function setFormat($format) {
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
public function channels() {
|
||||
return $this->channels;
|
||||
}
|
||||
|
||||
public function setChannels($channels) {
|
||||
$this->channels = $channels;
|
||||
}
|
||||
|
||||
public function language() {
|
||||
return $this->language;
|
||||
}
|
||||
|
||||
public function setLanguage($language) {
|
||||
$this->language = $language;
|
||||
}
|
||||
|
||||
public function samplerate() {
|
||||
return $this->samplerate;
|
||||
}
|
||||
|
||||
public function setSampleRate($sample_rate) {
|
||||
$this->samplerate = $sample_rate;
|
||||
}
|
||||
|
||||
public function bitrate() {
|
||||
return $this->bitrate;
|
||||
}
|
||||
|
||||
public function setBitRate($bit_rate) {
|
||||
$this->bitrate = $bit_rate;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
?>
|
||||
47
source/lib/RippingCluster/Rips/SourceSubtitleTrack.class.php
Normal file
47
source/lib/RippingCluster/Rips/SourceSubtitleTrack.class.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
class RippingCluster_Rips_SourceSubtitleTrack {
|
||||
|
||||
protected $id;
|
||||
protected $name;
|
||||
protected $language;
|
||||
protected $format;
|
||||
|
||||
public function __construct($id, $name, $language, $format) {
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
$this->language = $language;
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
public function id() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function name() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName($name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function language() {
|
||||
return $this->language;
|
||||
}
|
||||
|
||||
public function setLanguage($language) {
|
||||
$this->language = $language;
|
||||
}
|
||||
|
||||
public function format() {
|
||||
return $this->format;
|
||||
}
|
||||
|
||||
public function setFormat($format) {
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
?>
|
||||
147
source/lib/RippingCluster/Rips/SourceTitle.class.php
Normal file
147
source/lib/RippingCluster/Rips/SourceTitle.class.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
class RippingCluster_Rips_SourceTitle {
|
||||
|
||||
protected $id;
|
||||
//protected $vts;
|
||||
//protected $ttn;
|
||||
//protected $cell_count;
|
||||
//protected $blocks;
|
||||
|
||||
protected $angles;
|
||||
protected $duration;
|
||||
protected $width;
|
||||
protected $height;
|
||||
protected $pixel_aspect;
|
||||
protected $display_aspect;
|
||||
protected $framerate;
|
||||
protected $autocrop;
|
||||
|
||||
protected $chapters = array();
|
||||
protected $audio = array();
|
||||
protected $subtitles = array();
|
||||
|
||||
public function __construct($id) {
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function id() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function angles() {
|
||||
return $this->angles;
|
||||
}
|
||||
|
||||
public function setAngles($angles) {
|
||||
$this->angles = $angles;
|
||||
}
|
||||
|
||||
public function duration() {
|
||||
return $this->duration;
|
||||
}
|
||||
|
||||
public function durationInSeconds() {
|
||||
$time = explode(":", $this->duration);
|
||||
return ($time[0] * 3600) + ($time[1] * 60) + $time[2];
|
||||
}
|
||||
|
||||
public function setDuration($duration) {
|
||||
$this->duration = $duration;
|
||||
}
|
||||
|
||||
public function width() {
|
||||
return $this->width;
|
||||
}
|
||||
|
||||
public function setWidth($width) {
|
||||
$this->width = $width;
|
||||
}
|
||||
|
||||
public function height() {
|
||||
return $this->height;
|
||||
}
|
||||
|
||||
public function setHeight($height) {
|
||||
$this->height = $height;
|
||||
}
|
||||
|
||||
public function displayAspect() {
|
||||
return $this->display_aspect;
|
||||
}
|
||||
|
||||
public function setDisplayAspect($display_aspect) {
|
||||
$this->display_aspect = $display_aspect;
|
||||
}
|
||||
|
||||
public function pixelAspect() {
|
||||
return $this->pixel_aspect;
|
||||
}
|
||||
|
||||
public function setPixelAspect($pixel_aspect) {
|
||||
$this->pixel_aspect = $pixel_aspect;
|
||||
}
|
||||
|
||||
public function framerate() {
|
||||
return $this->framerate;
|
||||
}
|
||||
|
||||
public function setFramerate($framerate) {
|
||||
$this->framerate = $framerate;
|
||||
}
|
||||
|
||||
public function setDisplayInfo($width, $height, $display_aspect, $pixel_aspect, $framerate) {
|
||||
$this->width = $width;
|
||||
$this->height = $height;
|
||||
$this->pixel_aspect = $pixel_aspect;
|
||||
$this->display_aspect = $display_aspect;
|
||||
$this->framerate = $framerate;
|
||||
}
|
||||
|
||||
public function autocrop() {
|
||||
return $this->autocrop;
|
||||
}
|
||||
|
||||
public function setAutocrop($autocrop) {
|
||||
$this->autocrop = $autocrop;
|
||||
}
|
||||
|
||||
public function chapterCount() {
|
||||
return count($this->chapters);
|
||||
}
|
||||
|
||||
public function chapters() {
|
||||
return $this->chapters;
|
||||
}
|
||||
|
||||
public function addChapter($chapter_id, $duration) {
|
||||
$this->chapters[$chapter_id] = $duration;
|
||||
}
|
||||
|
||||
public function audioTrackCount() {
|
||||
return count($this->audio);
|
||||
}
|
||||
|
||||
public function audioTracks() {
|
||||
return $this->audio;
|
||||
}
|
||||
|
||||
public function addAudioTrack(RippingCluster_Rips_SourceAudioTrack $audio_track) {
|
||||
$this->audio[] = $audio_track;
|
||||
}
|
||||
|
||||
public function subtitleTrackCount() {
|
||||
return count($this->subtitles);
|
||||
}
|
||||
|
||||
public function subtitleTracks() {
|
||||
return $this->subtitles;
|
||||
}
|
||||
|
||||
public function addSubtitleTrack(RippingCluster_Rips_SourceSubtitleTrack $subtitle_track) {
|
||||
$this->subtitles[] = $subtitle_track;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user