示例#1
0
/**
 * Save file info for video conversion
 * 
 * @param string  $file
 * @param array   $video
 * @param integer $defined_access_id
 * @param array   $izapvideo
 * 
 * @return boolean
 * 
 * @version 5.0
 */
function izap_save_fileinfo_for_converting_izap_videos($file, $video, $defined_access_id = 2, $izapvideo)
{
    // this will not let save any thing if there is no file to convert
    if (!file_exists($file) || !$video) {
        return false;
    }
    $queue = new izapQueue();
    $queue->put($video, $file, $defined_access_id, $izapvideo->getURL($izapvideo->getOwnerEntity(), GLOBAL_IZAP_VIDEOS_PAGEHANDLER));
    //set state processing for video
    $izapvideo->converted = 'in_processing';
    //run queue
    izap_trigger_video_queue();
}
示例#2
0
<?php

/*
 *    This file is part of izap-videos plugin for Elgg.
 *
 *    izap-videos for Elgg is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    izap-videos for Elgg is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with izap-videos for Elgg.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * Trigger queue for conversion
 * 
 * @version 5.0
 */
elgg_load_library('elgg:izap_video');
izap_trigger_video_queue();
system_message(elgg_echo('izap_videos:adminSettings:reset_queue'));
forward(REFERER);
exit;