From 7235ebc06e881ebefe1d2c45a3b0f5304e26b936 Mon Sep 17 00:00:00 2001 From: Heshan Date: Sun, 6 Mar 2011 23:22:38 +0530 Subject: Completed general video upload with Video field and auto thumbnails creation using FFMPEG --- video.install | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to 'video.install') diff --git a/video.install b/video.install index 3250513..828496b 100644 --- a/video.install +++ b/video.install @@ -61,9 +61,10 @@ function video_schema() { 'default' => 0, ), 'data' => array( - 'type' => 'text', + 'type' => 'blob', 'not null' => FALSE, 'size' => 'big', + 'serialize' => TRUE, 'description' => 'A serialized array of converted files. Use of this field is discouraged and it will likely disappear in a future version of Drupal.', ), @@ -98,10 +99,11 @@ function video_schema() { 'translatable' => TRUE, ), 'settings' => array( - 'type' => 'text', - 'size' => 'medium', + 'type' => 'blob', + 'not null' => FALSE, + 'size' => 'big', 'serialize' => TRUE, - 'description' => 'Serialized player settings that do not warrant a dedicated column. + 'description' => 'Serialized preset settings that do not warrant a dedicated column. Use of this field is discouraged and it will likely disappear in a future version of Drupal.', ), ), @@ -110,6 +112,35 @@ function video_schema() { ), 'primary key' => array('pid'), ); + // video thumbnails + $schema['video_thumbnails'] = array( + 'description' => 'The video thumbnails table.', + 'fields' => array( + 'vid' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'description' => 'Foreign Key {video_files}.fid.', + ), + 'thumbnails' => array( + 'type' => 'blob', + 'not null' => FALSE, + 'size' => 'big', + 'serialize' => TRUE, + 'description' => 'Serialized array of thumbnails data. + Use of this field is discouraged and it will likely disappear in a future version of Drupal.', + ), + ), + 'indexes' => array( + 'thumbnail' => array('vid'), + ), + 'foreign keys' => array( + 'thumbnails' => array( + 'table' => 'video_files', + 'columns' => array('vid' => 'vid'), + ), + ), + ); return $schema; } -- cgit v1.2.3