Skip to content

Commit

Permalink
Merge pull request #6938 from kaltura/Mercury-13.15.0-PLAT-8651-Chop-…
Browse files Browse the repository at this point in the history
…And-Slice

Mercury 13.15.0 plat 8651 chop and slice
  • Loading branch information
RoieBeck committed Apr 2, 2018
2 parents 30654b5 + 9f559b3 commit f7772e3
Show file tree
Hide file tree
Showing 32 changed files with 1,649 additions and 62 deletions.
1 change: 1 addition & 0 deletions admin_console/configs/lang/en.php
Expand Up @@ -67,6 +67,7 @@
'Kaltura_Client_Enum_BatchJobType::CLEAR_BEACONS' => 'Clear Beacons',
'Kaltura_Client_Enum_BatchJobType::COPY_CAPTIONS' => 'Copy Caption Assets',
'Kaltura_Client_Enum_BatchJobType::USERS_CSV' => 'Users Csv',
'Kaltura_Client_Enum_BatchJobType::COPY_CUE_POINTS' => 'Copy cue Points',

'Kaltura_Client_Enum_ConversionEngineType::FFMPEG' => 'Convert - FFMpeg',
'Kaltura_Client_Enum_ConversionEngineType::FFMPEG_AUX' => 'Convert - FFMpeg Aux',
Expand Down
8 changes: 6 additions & 2 deletions alpha/apps/kaltura/lib/batch2/kJobsManager.php
Expand Up @@ -1037,20 +1037,24 @@ public static function addConvertLiveSegmentJob(BatchJob $parentJob = null, live
$batchJob->setObjectType(BatchJobObjectType::ENTRY);
return self::addJob($batchJob, $jobData, BatchJobType::CONVERT_LIVE_SEGMENT);
}

/**
* @param BatchJob $parentJob
* @param flavorAsset $asset
* @param array $files
* @param bool $shouldSort
* @param null $offset
* @param null $duration
* @return BatchJob
*/
public static function addConcatJob(BatchJob $parentJob = null, flavorAsset $asset, array $files, $offset = null, $duration = null)
public static function addConcatJob(BatchJob $parentJob = null, flavorAsset $asset, array $files, $shouldSort = true , $offset = null, $duration = null)
{
$jobData = new kConcatJobData();
$jobData->setSrcFiles($files);
$jobData->setFlavorAssetId($asset->getId());
$jobData->setOffset($offset);
$jobData->setDuration($duration);
$jobData->setShouldSort($shouldSort);

$entry = $asset->getentry();
if($entry && $entry->getStatus() != entryStatus::READY)
Expand Down
140 changes: 140 additions & 0 deletions alpha/apps/kaltura/lib/batch2/model/kClipConcatJobData.php
@@ -0,0 +1,140 @@
<?php
/**
* @package Core
* @subpackage model.data
*/

class kClipConcatJobData extends kJobData
{
/**$destEntryId
* @var string
*/
private $destEntryId;

/**$tempEntryId
* @var string
*/
private $tempEntryId;

/**sourceEntryId
* @var string
*/
private $sourceEntryId;

/** $partnerId
* @var int
*/
private $partnerId;

/** $priority
* @var int
*/
private $priority;


/** clip operations
* @var array $operationAttributes
*/
private $operationAttributes;

/**
* @return string $entryId
*/
public function getDestEntryId()
{
return $this->destEntryId;
}

/**
* @param string $entryId
*/
public function setDestEntryId($entryId)
{
$this->destEntryId = $entryId;
}

/**
* @return string $entryId
*/
public function getTempEntryId()
{
return $this->tempEntryId;
}

/**
* @param string $sourceEntryId
*/
public function setSourceEntryId($sourceEntryId)
{
$this->sourceEntryId = $sourceEntryId;
}

/**
* @return string $sourceEntryId
*/
public function getSourceEntryId()
{
return $this->sourceEntryId;
}

/**
* @param string $entryId
*/
public function setTempEntryId($entryId)
{
$this->tempEntryId = $entryId;
}

/**
* @return string $partnerId
*/
public function getPartnerId()
{
return $this->partnerId;
}

/**
* @param string $partnerId
*/
public function setPartnerId($partnerId)
{
$this->partnerId = $partnerId;
}


/**
* @return string $priority
*/
public function getPriority()
{
return $this->priority;
}

/**
* @param string $priority
*/
public function setPriority($priority)
{
$this->priority = $priority;
}


/**
* @return kOperationAttributes[] $operationAttributes
*/
public function getOperationAttributes()
{
return $this->operationAttributes;
}

/**
* @param kOperationAttributes[] $operationAttributes
*/
public function setOperationAttributes($operationAttributes)
{
$this->operationAttributes = $operationAttributes;
}



}
25 changes: 23 additions & 2 deletions alpha/apps/kaltura/lib/batch2/model/kConcatJobData.php
Expand Up @@ -19,17 +19,22 @@ class kConcatJobData extends kJobData
* @var string
*/
private $flavorAssetId;

/**
* @var float
*/
private $offset;

/**
* @var float
*/
private $duration;

/**
* @var bool
*/
private $shouldSort;

/**
* duration of the concated video
* @var float
Expand Down Expand Up @@ -131,4 +136,20 @@ public function setConcatenatedDuration($concatenatedDuration)
{
$this->concatenatedDuration = $concatenatedDuration;
}

/**
* @return bool $sortNeeded
*/
public function getShouldSort()
{
return $this->shouldSort;
}

/**
* @param bool $shouldSort
*/
public function setShouldSort($shouldSort)
{
$this->shouldSort = $shouldSort;
}
}

0 comments on commit f7772e3

Please sign in to comment.