public static function video_jobs::create in Video 7.2
Create new transcoder job in the database.
2 calls to video_jobs::create()
- TranscoderAbstractionFactoryZencoderTestCase::setUp in tests/
TranscoderAbstractionFactoryZencoder.test - Sets up a Drupal site for running functional and integration tests.
- _video_field_file_autoconversion in ./
video.field.inc - Video file save to the video_queue table for conversions
File
- includes/
jobs.inc, line 11 - Static class containing transcoding job related operations.
Class
- video_jobs
- @file Static class containing transcoding job related operations.
Code
public static function create($fid, $dimensions, $entity_id, $entity_type, $field_name, $langcode, $delta) {
$video = new stdClass();
$video->fid = intval($fid);
$video->entity_id = intval($entity_id);
$video->entity_type = $entity_type;
$video->status = VIDEO_RENDERING_PENDING;
$video->statusupdated = time();
$video->dimensions = $dimensions;
$video->data = array(
'field_name' => $field_name,
'langcode' => $langcode,
'delta' => intval($delta),
);
return drupal_write_record('video_queue', $video) === SAVED_NEW ? $video : FALSE;
}