Ejemplo n.º 1
0
 /**
  * Create a new job instance.
  * @param TrackFile $trackFile
  * @param bool $isExpirable
  * @param bool $isForUpload indicates whether this encode job is for an upload
  * @param bool $autoPublish
  */
 public function __construct(TrackFile $trackFile, $isExpirable, $isForUpload = false, $autoPublish = false)
 {
     if (!$isForUpload && $trackFile->is_master || $isForUpload && $trackFile->is_master && !$trackFile->getFormat()['is_lossless']) {
         throw new InvalidEncodeOptionsException("Master files cannot be encoded unless we're generating a lossless master file during the upload process.");
     }
     $this->trackFile = $trackFile;
     $this->isExpirable = $isExpirable;
     $this->isForUpload = $isForUpload;
     $this->autoPublishWhenComplete = $autoPublish;
 }