aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2009-05-27 01:48:29 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2009-05-27 01:48:29 +0000
commit8cd94d3aabb438fc8efa275c1b57e44d33e2fac5 (patch)
tree5447578ec99698510b79d8c4d26d802e5294fed8 /plugins
parent4caf05931d7bfff98084edcf0c31f5e8c4e38aae (diff)
downloadvideo-8cd94d3aabb438fc8efa275c1b57e44d33e2fac5.tar.gz
video-8cd94d3aabb438fc8efa275c1b57e44d33e2fac5.tar.bz2
updating 6--2 dev
Diffstat (limited to 'plugins')
-rw-r--r--plugins/video_ffmpeg_helper/video_ffmpeg_helper.info4
-rw-r--r--plugins/video_ffmpeg_helper/video_ffmpeg_helper.install43
-rw-r--r--plugins/video_ffmpeg_helper/video_ffmpeg_helper.module5
-rw-r--r--plugins/video_ffmpeg_helper/video_render.php2
-rw-r--r--plugins/video_ffmpeg_helper/video_scheduler.php2
-rw-r--r--plugins/video_image/video_image.info4
-rw-r--r--plugins/video_image/video_image.module46
-rw-r--r--plugins/video_multidownload/video_multidownload.info3
-rw-r--r--plugins/video_multidownload/video_multidownload.module1
-rw-r--r--plugins/video_optmetadata/video_optmetadata.info4
-rw-r--r--plugins/video_optmetadata/video_optmetadata.module2
-rw-r--r--plugins/video_params/video_params.info4
-rw-r--r--plugins/video_params/video_params.module1
13 files changed, 69 insertions, 52 deletions
diff --git a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.info b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.info
index e5ce7aa..9706e09 100644
--- a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.info
+++ b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.info
@@ -1,6 +1,8 @@
+;$Id$
name = Video ffmpeg Helper
description = Provide apis for ffmpeg. Simplify video nodes creation.
dependencies[] = video
dependencies[] = video_upload
package = "Video"
-core = 6.x \ No newline at end of file
+core = 6.x
+
diff --git a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.install b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.install
index 36289d5..f4b2ed9 100644
--- a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.install
+++ b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.install
@@ -1,11 +1,11 @@
<?php
+//$Id$
/**
* @file
* Provide installation functions for video_ffmpeg_helper.module .
*
- * @author Fabio Varesano <fvaresano at yahoo dot it>
- * porting to Drupal 6
- * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw@gmail.com>
+ * @author Heshan Wanigasooriya <heshan at heidisoft dot com>
+ * <heshanmw at gmail dot com>
* @todo
*/
@@ -14,64 +14,83 @@
*/
function video_ffmpeg_helper_schema() {
$schema['video_rendering'] = array(
- 'description' => t('TODO'),
+ 'description' => t('Store video transcoding queue'),
'fields' => array(
'vid' => array(
- 'description' => t('TODO'),
+ 'description' => t('video id : primary key'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
- 'description' => t('TODO'),
+ 'description' => t('Node id : index of the {node}.nid'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'fid' => array(
+ 'description' => t('FIle id, index to the {files}.fid'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'origfile' => array(
- 'description' => t('TODO'),
+ 'description' => t('original file path'),
'type' => 'text',
'not null' => TRUE,
'default' => '',
),
'pid' => array(
- 'description' => t('TODO'),
+ 'description' => t('Pid'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'status' => array(
- 'description' => t('TODO'),
+ 'description' => t('status of the transcoding'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'started' => array(
- 'description' => t('TODO'),
+ 'description' => t('Started transcodings'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'completed' => array(
- 'description' => t('TODO'),
+ 'description' => t('Transcoding completed'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
+ 'indexes' => array(
+ 'fid' => array('fid'),
+ 'nid' => array('nid'),
+ ),
'primary key' => array('vid'),
);
return $schema;
}
-
+/**
+ * Implementation of hook_install().
+ */
function video_ffmpeg_helper_install() {
// Create tables.
drupal_install_schema('video_ffmpeg_helper');
}
+/**
+ * Implementation of hook_uninstall().
+ */
+function video_ffmpeg_helper_uninstall() {
+ drupal_uninstall_schema('video_ffmpeg_helper');
+} \ No newline at end of file
diff --git a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module
index 446058d..b22a0f4 100644
--- a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module
+++ b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module
@@ -1,5 +1,5 @@
<?php
-
+//$Id$
/**
* @file
* Provide some api for use ffmpeg. Simplify video nodes creation.
@@ -405,9 +405,6 @@ function _video_ffmpeg_helper_get_video_info(&$node, $value=null) {
* Return the video resolution
*/
function _video_ffmpeg_helper_auto_resolution(&$node) {
- if(!$node->new_video_upload_file && !$node->new_video_upload_file_fid) { // no new files uploaded. skipping auto resolution process
- return null;
- }
if(variable_get('video_ffmpeg_helper_auto_resolution', false)) {
diff --git a/plugins/video_ffmpeg_helper/video_render.php b/plugins/video_ffmpeg_helper/video_render.php
index bba9220..83bae31 100644
--- a/plugins/video_ffmpeg_helper/video_render.php
+++ b/plugins/video_ffmpeg_helper/video_render.php
@@ -1,5 +1,5 @@
<?php
-
+//$Id$
/**
* @file
* Renders a video. This script is called concurrently by video_scheduler.php
diff --git a/plugins/video_ffmpeg_helper/video_scheduler.php b/plugins/video_ffmpeg_helper/video_scheduler.php
index 7faf446..b33da11 100644
--- a/plugins/video_ffmpeg_helper/video_scheduler.php
+++ b/plugins/video_ffmpeg_helper/video_scheduler.php
@@ -1,5 +1,5 @@
<?php
-
+//$Id$
/**
* @file
* Implement video rendering scheduling.
diff --git a/plugins/video_image/video_image.info b/plugins/video_image/video_image.info
index 8840ccd..f158ede 100644
--- a/plugins/video_image/video_image.info
+++ b/plugins/video_image/video_image.info
@@ -1,6 +1,8 @@
+;$Id$
name = Video Image
description = Enable thumbnails support for video module.
dependencies[] = image
dependencies[] = video
package = "Video"
-core = 6.x \ No newline at end of file
+core = 6.x
+
diff --git a/plugins/video_image/video_image.module b/plugins/video_image/video_image.module
index 705ceba..7e0d82d 100644
--- a/plugins/video_image/video_image.module
+++ b/plugins/video_image/video_image.module
@@ -1,13 +1,12 @@
<?php
-
+// $Id$
/**
- * @file
- * Enable image support for video module.
+ * @file video_image.module
*
- * @author Fabio Varesano <fvaresano at yahoo dot it>
- * porting to Drupal 6
- * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw@gmail.com>
+ * @author Heshan Wanigasooriya <heshan at heidisoft dot com>
+ * <heshanmw at gmail dot com>
* @todo
+ * implement the help of the video upload (Implement the internal hook for the help video_upload_v_help()).
*/
@@ -179,6 +178,7 @@ function video_image_form_alter(&$form, &$form_state, $form_id) {
function video_image_nodeapi(&$node, $op, $teaser) {
//print_r($op);
//exit;
+ //db_query("INSERT INTO {op} (id, name) VALUES (%d, '%s')", NULL, $op);
if($node->type == 'video') {
switch ($op) {
case 'load':
@@ -192,7 +192,7 @@ function video_image_nodeapi(&$node, $op, $teaser) {
case 'presave':
//exit;
- _video_image_submit($node);
+ _video_image_presave($node);
break;
case 'view':
@@ -273,11 +273,9 @@ function _video_image_prepare(&$node) {
}
}
-function _video_image_submit(&$node) {
- //print_r($node);
- //exit;
- // ############# PREPARE #######################
- // ------------- MOVED -------------------------
+function _video_image_presave(&$node) {
+
+ // ############# PREPARE #######################
if (count($_POST)) {
$validators = array(
@@ -295,19 +293,7 @@ function _video_image_submit(&$node) {
}
if ($field_name) {
- /*
- if($node->iid){
-
- // Remove all the existing images.
- $result = db_query("SELECT f.fid, f.filepath FROM {image} i INNER JOIN {files} f ON i.fid = f.fid WHERE i.nid = %d", $node->iid);
- while ($file = db_fetch_object($result)) {
- file_delete(file_create_path($file->filepath));
- db_query("DELETE FROM {files} WHERE fid = %d", $file->fid);
- }
- //db_query("DELETE FROM {image} WHERE nid = %d", $node->iid);
- }
- *
- */
+
$node->tempimage = _video_image_temp_image_store($field_name);
$node->new_image = TRUE;
//print_r($node);
@@ -430,8 +416,11 @@ function _video_image_thumbnail_debug($msg) {
}
function _video_image_temp_image_store(&$file) {
+ // Update the node to reflect the actual filename, it may have been changed
+
$image = new stdClass();
$image->images[IMAGE_ORIGINAL] = $file->filepath;
+ //using image module
$image->images =_image_build_derivatives($image);
$image->type = 'image';
$image->uid = 1;
@@ -451,11 +440,12 @@ function _video_image_temp_image_store(&$file) {
// save the images in the files table
foreach ($image->images as $l => $f) {
$info = image_get_info($f);
- $file->fid = db_last_insert_id('files','fid');
- if($l=="_original"){
+ $original_path = $node->images[IMAGE_ORIGINAL];
+ if (file_move($file->filepath, _image_filename($original_path, $size))) {
+ $file->fid = db_last_insert_id('files','fid');
db_query("INSERT INTO {files} (fid, filename, filepath, filemime, filesize) VALUES (%d, '%s', '%s', '%s', '%s')",
$fid, "video_image_temp.$l", $f, $info['mime_type'], $info['file_size']);
- }
+ }
$image->fids[$l] = $file->fid;
}
}
diff --git a/plugins/video_multidownload/video_multidownload.info b/plugins/video_multidownload/video_multidownload.info
index eac3f33..5c87e9c 100644
--- a/plugins/video_multidownload/video_multidownload.info
+++ b/plugins/video_multidownload/video_multidownload.info
@@ -1,5 +1,6 @@
+;$Id$
name = Video Multidownload
description = Enable multiple file download in video module.
dependencies[] = video
package = "Video"
-core = 6.x \ No newline at end of file
+core = 6.x
diff --git a/plugins/video_multidownload/video_multidownload.module b/plugins/video_multidownload/video_multidownload.module
index 1d3a245..682caba 100644
--- a/plugins/video_multidownload/video_multidownload.module
+++ b/plugins/video_multidownload/video_multidownload.module
@@ -1,4 +1,5 @@
<?php
+//$Id$
/**
* @file
* Enable multiple file download in video module.
diff --git a/plugins/video_optmetadata/video_optmetadata.info b/plugins/video_optmetadata/video_optmetadata.info
index 0dece56..7d6bf7f 100644
--- a/plugins/video_optmetadata/video_optmetadata.info
+++ b/plugins/video_optmetadata/video_optmetadata.info
@@ -1,5 +1,7 @@
+;$Id$
name = Video Opt Metadata
description = Enable addition of optional metadata on video nodes created by video module. Optional metadata are Video Bitrate, Audio Bitrate, Audio Sampling Rate and Audio Channels.
dependencies[] = video
package = "Video"
-core = 6.x \ No newline at end of file
+core = 6.x
+
diff --git a/plugins/video_optmetadata/video_optmetadata.module b/plugins/video_optmetadata/video_optmetadata.module
index 9967e23..1ab6265 100644
--- a/plugins/video_optmetadata/video_optmetadata.module
+++ b/plugins/video_optmetadata/video_optmetadata.module
@@ -1,5 +1,5 @@
<?php
-
+//$Id$
/**
* @file
* Enable addition of optional metadata on video nodes created by video module.
diff --git a/plugins/video_params/video_params.info b/plugins/video_params/video_params.info
index 222f5ac..612462e 100644
--- a/plugins/video_params/video_params.info
+++ b/plugins/video_params/video_params.info
@@ -1,5 +1,7 @@
+;$Id$
name = Video Params
description = Enable addition of html params to object generated by video module. Useful if you need to use swf videos which needs params to be passed.
dependencies[] = video
package = "Video"
-core = 6.x \ No newline at end of file
+core = 6.x
+
diff --git a/plugins/video_params/video_params.module b/plugins/video_params/video_params.module
index 4fa71a1..e0acf96 100644
--- a/plugins/video_params/video_params.module
+++ b/plugins/video_params/video_params.module
@@ -1,4 +1,5 @@
<?php
+//$Id$
/**
* @file
* Enable addition of params to object generated by video module