Changeset 107194 in spip-zone
- Timestamp:
- Oct 28, 2017, 5:54:40 PM (3 years ago)
- Location:
- _plugins_/spipmotion/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/spipmotion/trunk/inc/spipmotion_ffmpeg_infos.php
r103468 r107194 6 6 * Auteurs : 7 7 * kent1 (http://www.kent1.info - kent1@arscenic.info) 8 * 2008-201 4- Distribué sous licence GNU/GPL8 * 2008-2017 - Distribué sous licence GNU/GPL 9 9 * 10 10 */ … … 112 112 */ 113 113 if (lire_fichier($chemin_fichier.'_formats', $contenu_formats)) { 114 preg_match_all('/ (DE|D|E) (.*) {1,} (.*)/', $contenu_formats, $formats);114 $contenu_formats = explode("\n", $contenu_formats); 115 115 $data['spipmotion_formats'] = array(); 116 for ($i=0, $a=count($formats[0]); $i<$a; $i++) { 117 $data['spipmotion_formats'][strtolower(trim($formats[2][$i]))] = array( 118 'encode' => $formats[1][$i] == 'DE' || $formats[1][$i] == 'E', 119 'decode' => $formats[1][$i] == 'DE' || $formats[1][$i] == 'D', 120 'fullname' => $formats[3][$i] 116 foreach ($contenu_formats as $contenu_format) { 117 preg_match('/ (DE|D|E) (.*) {1,} (.*)/', $contenu_format, $formats); 118 $data['spipmotion_formats'][strtolower(trim($formats[2]))] = array( 119 'encode' => $formats[1] == 'DE' || $formats[1] == 'E', 120 'decode' => $formats[1] == 'DE' || $formats[1] == 'D', 121 'fullname' => $formats[3] 121 122 ); 123 $formats = false; 122 124 } 123 125 ecrire_config('/spipmotion_metas/spipmotion_formats', serialize($data['spipmotion_formats'])); 124 126 } 127 $contenu_formats = false; 125 128 126 129 /** … … 128 131 */ 129 132 if (lire_fichier($chemin_fichier.'_codecs', $contenu_codecs)) { 130 preg_match_all('/ (D| |\.)(E| |\.)(V|A|S|\.)(S| |\.|I)(D|L| |\.)(T|S| ) (.*) {1,} (.*)/', $contenu_codecs, $codecs);133 $contenu_codecs = explode("\n", $contenu_codecs); 131 134 $data['spipmotion_codecs'] = array(); 132 135 $data['spipmotion_codecs_audio_decode'] = array(); … … 134 137 $data['spipmotion_codecs_audio_encode'] = array(); 135 138 $data['spipmotion_codecs_video_encode'] = array(); 136 for ($i=0, $a=count($codecs[0]); $i<$a; $i++) { 137 $data['spipmotion_codecs'][strtolower(trim($codecs[7][$i]))] = array( 138 'decode' => $codecs[1][$i] == 'D', 139 'encode' => $codecs[2][$i] == 'E', 140 'type' => $codecs[3][$i], 141 'draw_horiz_band' => $codecs[4][$i] == 'S', 142 'direct_rendering' => $codecs[5][$i] == 'D', 143 'weird_frame_truncation' => $codecs[6][$i] == 'T', 144 'fullname' => $codecs[8][$i] 139 foreach ($contenu_codecs as $contenu_codec) { 140 preg_match('/ (D| |\.)(E| |\.)(V|A|S|\.)(S| |\.|I)(D|L| |\.)(T|S| ) (.*) {1,} (.*)/', $contenu_codec, $codecs); 141 $data['spipmotion_codecs'][strtolower(trim($codecs[7]))] = array( 142 'decode' => $codecs[1] == 'D', 143 'encode' => $codecs[2] == 'E', 144 'type' => $codecs[3], 145 'draw_horiz_band' => $codecs[4] == 'S', 146 'direct_rendering' => $codecs[5] == 'D', 147 'weird_frame_truncation' => $codecs[6] == 'T', 148 'fullname' => $codecs[8] 145 149 ); 146 if (($codecs[1] [$i] == 'D') && ($codecs[3][$i] == 'A')) {147 $data['spipmotion_codecs_audio_decode'][] = trim($codecs[7] [$i]);150 if (($codecs[1] == 'D') && ($codecs[3] == 'A')) { 151 $data['spipmotion_codecs_audio_decode'][] = trim($codecs[7]); 148 152 } 149 if (($codecs[1] [$i] == 'D') && ($codecs[3][$i] == 'V')) {150 $data['spipmotion_codecs_video_decode'][] = trim($codecs[7] [$i]);153 if (($codecs[1] == 'D') && ($codecs[3] == 'V')) { 154 $data['spipmotion_codecs_video_decode'][] = trim($codecs[7]); 151 155 } 152 if (($codecs[2] [$i] == 'E') && ($codecs[3][$i] == 'A')) {153 $data['spipmotion_codecs_audio_encode'][] = trim($codecs[7] [$i]);156 if (($codecs[2] == 'E') && ($codecs[3] == 'A')) { 157 $data['spipmotion_codecs_audio_encode'][] = trim($codecs[7]); 154 158 } 155 if (($codecs[2] [$i] == 'E') && ($codecs[3][$i] == 'V')) {156 $data['spipmotion_codecs_video_encode'][] = trim($codecs[7] [$i]);159 if (($codecs[2] == 'E') && ($codecs[3] == 'V')) { 160 $data['spipmotion_codecs_video_encode'][] = trim($codecs[7]); 157 161 } 158 162 } … … 256 260 */ 257 261 $ffprobe = exec('ffprobe --version', $retour_ffprobe, $int_ffprobe); 258 if ($int_ mediainfo== 0) {262 if ($int_ffprobe == 0) { 259 263 $data['spipmotion_ffprobe']['ffprobe'] = true; 260 264 $data['spipmotion_ffprobe']['version'] = 'present'; -
_plugins_/spipmotion/trunk/paquet.xml
r105222 r107194 2 2 prefix="spipmotion" 3 3 categorie="multimedia" 4 version="1.7. 1"4 version="1.7.2" 5 5 etat="stable" 6 6 compatibilite="[3.0.0;3.2.*]"
Note: See TracChangeset
for help on using the changeset viewer.