]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 15 Jan 2013 14:55:34 +0000 (14:55 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 15 Jan 2013 14:55:34 +0000 (14:55 +0000)
fluidbook/tools/webvideo
inc/commons/class.common.tools.php
inc/postconfig.inc.php
inc/ws/Controlleur/class.ws.ajax.php
inc/ws/Controlleur/class.ws.conversion.session.php
inc/ws/Controlleur/class.ws.stats.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/packager/class.ws.packager.win.inst.php

index 5b98aab5ba94516dbff1b665dff9297a03bc927e..23f522acc5a3903e38287e06f2f390306d25b92d 100644 (file)
@@ -20,9 +20,9 @@ echo
 /usr/bin/ffmpeg -i $1 \
 -y \
 -acodec aac \
--ab 64k \
 -vcodec libx264 \
 -b 384k \
+-ab 64k \
 -mbd 2 \
 -cmp 256 \
 -subcmp 2 \
@@ -43,15 +43,29 @@ echo
 -i_qfactor 0.71 \
 -qmin 10 -qmax 51 \
 -qdiff 4 \
--ac 1 \
+-ac 2 \
+-ar 44100 \
 -r 13 \
 $2/$filename.mp4
 fi
-echo 'making ogv'
+echo 'making webm'
 echo
 echo
-/usr/local/bin/ffmpeg2theora $1 -o $2/$filename.ogv
-echo 'making webm'
+/usr/local/bin/ffmpeg -i $1 \
+-keyint_min 0 \
+-g 250 \
+-skip_threshold 0 \
+-qmin 1 \
+-qmax 51 \
+-vcodec libvpx \
+-b 614400 \
+-acodec libvorbis \
+-ar 44100 \
+-ac 2 \
+-ab 64k \
+-y $2/$filename.webm
+
+echo 'making ogv'
 echo
 echo
-/usr/local/bin/ffmpeg -i $1 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -vcodec libvpx -b 614400 -acodec libvorbis -y $2/$filename.webm
\ No newline at end of file
+/usr/local/bin/ffmpeg2theora $1 -o $2/$filename.ogv
index f7082beb956d7b172e4f052eb223c9c9af9162d8..0e784b13ab322cc911069666bf1aa2798d224477 100644 (file)
@@ -62,6 +62,9 @@ class commonTools {
                        if (!file_exists($dir)) {
                                mkdir($dir, 0777, true);
                                $ext = files::getExtension($url);
+                               if (preg_match('#^(\w+)(.*)$#', $ext, $matches)) {
+                                       $ext = $matches[1];
+                               }
                                $original = $dir . 'video.' . $ext;
                                copy($url, $original);
 
@@ -869,4 +872,5 @@ class commonTools {
        }
 
 }
+
 ?>
index 85ec7aef747831fe3f6984e37e24c51a9a869544..8117456d9dd723015f3480eb8a832762967c05c9 100644 (file)
@@ -8,10 +8,13 @@ define('DEV', $dev);
 \r
 // Définition des variables dans l'environnement de production\r
 //define('DB_HOST', ':/var/run/mysqld/mysqld.sock');\r
-if ($_SERVER['SERVER_ADDR'] == '37.59.53.196') {\r
+\r
+if (getenv('HOSTNAME') != 'ks308520.kimsufi.com') {\r
        define('DB_HOST', 'localhost');\r
+       define('SERVER','avanger');\r
 } else {\r
        define('DB_HOST', 'avanger.fluidbook.com');\r
+       define('SERVER','dictator');\r
 }\r
 \r
 define('DB_NAME', 'extranet');\r
index 4b60bf24493689e34114a8da0d2ce630dec3ab06..5ef01b2feeedd3f022fe706dbd167614a5f2014e 100644 (file)
@@ -317,7 +317,7 @@ class wsAjax extends cubeAjax {
                        /**  --del -r -z -v * */\r
                        $cp = new cubeCommandLine('rsync');\r
                        $cp->setPath(CONVERTER_PATH);\r
-                       $cp->setArg('del');\r
+                       //$cp->setArg('del');\r
                        $cp->setArg('t');\r
                        $cp->setArg('r');\r
                        $cp->setArg('z');\r
@@ -342,10 +342,10 @@ class wsAjax extends cubeAjax {
                                'mkdir -p ' . $u['path'],\r
                                'cd ' . $u['path'],\r
                                'lcd ' . $package,\r
-                               'mirror -Rve --parallel=5'\r
+                               //'mirror -Rve --parallel=5'\r
+                               'mirror -Rv --parallel=5'\r
                        );\r
 \r
-\r
                        $lftp = new cubeCommandLine('lftp');\r
                        $lftp->setArg('u', $u['user'] . ',' . $u['pass']);\r
                        $lftp->setArg('p', $u['port']);\r
index e7a79b5b73349d2d4a3963a71f017df2bfd81eed..43603f22c55ab74c4090c1ee46400a97fe300c7c 100644 (file)
@@ -168,14 +168,17 @@ class wsConversionSession {
        }\r
 \r
        public function getProgress() {\r
-               return array("progress" => $this->progress,\r
-                       'currentDoc' => $this->currentDoc->file,\r
+               $res = array("progress" => $this->progress,\r
                        'totalDoc' => $this->totalDoc,\r
                        'currentDocPage' => $this->currentDocPage,\r
                        'totalDocPage' => $this->totalDocPage,\r
                        'totalPages' => $this->totalPages,\r
                        'processedPages' => $this->processedPages,\r
                        'processedDoc' => max($this->processedDoc + 1, $this->totalDoc));\r
+               if ($this->currentDoc) {\r
+                       $res['currentDoc'] = $this->currentDoc->file;\r
+               }\r
+               return $res;\r
        }\r
 \r
        public function setProgress($i) {\r
index e2c86a52b35d7780ece00966c0d43b25ea1c9cd3..c4bfc05df2e65fd9b594f9e1842d8cf0ba512183 100644 (file)
@@ -808,10 +808,10 @@ class wsStats {
                @unlink($img);\r
                if (!file_exists($img) || filemtime($img) < cubeDate::round(null, 'H')) {\r
                        $im = imagecreatetruecolor(944, 306);\r
-                       imagelayereffect($im, IMG_EFFECT_REPLACE);\r
+                       //imagelayereffect($im, IMG_EFFECT_REPLACE);\r
                        $trans = imagecolorallocatealpha($im, 255, 255, 255, 0);\r
                        imagefill($im, 0, 0, $trans);\r
-                       imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
+                       //imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
                        $i = 1;\r
                        $x0 = 0;\r
                        $y0 = 305;\r
@@ -911,10 +911,10 @@ class wsStats {
                }\r
                if (!file_exists($img) || filemtime($img) < cubeDate::round(null, 'H')) {\r
                        $im = imagecreatetruecolor(944, 306);\r
-                       imagelayereffect($im, IMG_EFFECT_REPLACE);\r
+                       //imagelayereffect($im, IMG_EFFECT_REPLACE);\r
                        $trans = imagecolorallocatealpha($im, 255, 255, 255, 0);\r
                        imagefill($im, 0, 0, $trans);\r
-                       imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
+                       //imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
                        $i = 1;\r
                        $x0 = 900;\r
                        $y0 = 305;\r
@@ -1011,10 +1011,10 @@ class wsStats {
                if (!file_exists($img) || filemtime($img) < cubeDate::round(null, 'H')) {\r
                        // Création de l'image\r
                        $im = imagecreatetruecolor(944, 306);\r
-                       imagelayereffect($im, IMG_EFFECT_REPLACE);\r
+                       //imagelayereffect($im, IMG_EFFECT_REPLACE);\r
                        $trans = imagecolorallocatealpha($im, 255, 255, 255, 0);\r
                        imagefill($im, 0, 0, $trans);\r
-                       imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
+                       //imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
                        $i = 1;\r
                        $x0 = 0;\r
                        $y0 = 305;\r
index 241e09df43ede9a1699f0e2df2c8c95b9fbd3cc3..451cd8ed8c82dde3e8b91dbb55055ee4c9d459bb 100644 (file)
@@ -269,7 +269,7 @@ class wsBookParametres extends wsParametres {
                $this->fields['mobileTransitionDuration'] = array('type' => 'float', 'default' => '1.0', 'editable' => true, 'label' => __('Durée de la transition'));\r
 \r
                $this->fields['mobileIconVector'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Utiliser les icônes vectorielles'));\r
-               $this->fields['mobileServerConfig'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Inclure les fichiers de configuration serveur'), 'grade' => 5);\r
+               $this->fields['mobileServerConfig'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Inclure les fichiers de configuration serveur'), 'grade' => 3);\r
 \r
                $this->fields['mobilePlugins'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Plugin'), 'grade' => 5);\r
 \r
index 475d16a055928854ef729811eecde8acea9edbde..b909d74a8580f5ea5c514001c79466a6086fb2dc 100644 (file)
@@ -51,9 +51,19 @@ class wsPackagerWinINST extends wsPackagerWinEXE {
 \r
        public function makePackage($zip) {\r
                $this->preparePackage();\r
-               $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
+               if (SERVER == 'dictator') {\r
+                       $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
+                       file_get_contents($url);\r
+               } else {\r
+                       $tmp=cubeFiles::tempnam();\r
+                       file_put_contents($tmp, $this->nsi);\r
+                       $makensis=new cubeCommandLine('makensis');\r
+                       $makensis->setArg(null,$tmp);\r
+                       $makensis->execute();\r
+                       unlink($tmp);\r
+               }\r
+\r
 \r
-               file_get_contents($url);\r
                return $this->getURLBase('exe');\r
        }\r
 \r