Cheetah
functions.inc.php
Go to the documentation of this file.
1 <?php
2 
8 function prepareCommand($sTemplate, $aOptions)
9 {
10  foreach($aOptions as $sKey => $sValue)
11  $sTemplate = str_replace("#" . $sKey . "#", $sValue, $sTemplate);
12  return $sTemplate;
13 }
14 
15 function usex264()
16 {
18  //return getSettingValue($sModule, "usex264") == TRUE_VAL;
19  return 'on' == getParam('usex264') ? true : false;
20 }
21 
22 function getEmbedThumbnail($sUserId, $sImageUrl, $aFilesConfig = array())
23 {
26 
27  if (!$aFilesConfig)
28  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
29 
30  $sFileName = $sUserId . TEMP_FILE_NAME;
31  $sFilePath = $sFilesPath . $sFileName;
32  copy($sImageUrl, $sFilePath . IMAGE_EXTENSION);
33  @chmod($sFilePath, 0666);
34 
35  // generate tmp images
36  if(!grabImages($sFilePath . IMAGE_EXTENSION, $sFilePath, 0, false, $aFilesConfig))
37  return false;
38 
39  return $sFilesUrl . $sFileName . THUMB_FILE_NAME . IMAGE_EXTENSION;
40 }
41 
42 function getRecordThumbnail($sUserId)
43 {
46 
47  $sFileName = $sUserId . TEMP_FILE_NAME . THUMB_FILE_NAME . IMAGE_EXTENSION;
48  if(file_exists($sFilesPath . $sFileName))
49  return $sFilesUrl . $sFileName;
50  else
51  return false;
52 }
53 
54 function embedVideo($sUserId, $sVideoId, $iDuration, $aFilesConfig = array())
55 {
58 
59  if (!$aFilesConfig)
60  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
61 
62  $sDBModule = DB_PREFIX . ucfirst($sModule);
63  //$sStatus = getSettingValue($sModule, "autoApprove") == TRUE_VAL ? STATUS_APPROVED : STATUS_DISAPPROVED;
64  $sStatus = 'on' == getParam('videoAutoApprove') ? STATUS_APPROVED : STATUS_DISAPPROVED;
65  getResult("INSERT INTO `" . $sDBModule . "Files` SET `Date`='" . time() . "', `Owner`='" . $sUserId . "', `Status`='" . $sStatus . "', `Source`='youtube', `Video`='" . $sVideoId . "', `Time`='" . ($iDuration * 1000) . "'");
66 
67  $sFileId = getLastInsertId();
68 
69  // rename tmp images into real ones
70  foreach ($aFilesConfig as $a)
71  if (isset($a['image']) && $a['image'])
72  @rename($sFilesPath . $sUserId . TEMP_FILE_NAME . $a['postfix'], $sFilesPath . $sFileId . $a['postfix']);
73 
74  return $sFileId;
75 }
76 
77 function recordVideo($sUserId, $aFilesConfig = array())
78 {
81 
82  if (!$aFilesConfig)
83  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
84 
85  $sDBModule = DB_PREFIX . ucfirst($sModule);
86  getResult("INSERT INTO `" . $sDBModule . "Files` SET `Date`='" . time() . "', `Owner`='" . $sUserId . "', `Status`='" . STATUS_PENDING . "'");
87  $sFileId = getLastInsertId();
88 
89  @rename($sFilesPath . $sUserId . TEMP_FILE_NAME . FLV_EXTENSION, $sFilesPath . $sFileId . FLV_EXTENSION);
90 
91  // rename tmp images into real ones
92  foreach ($aFilesConfig as $a)
93  if (isset($a['image']) && $a['image'])
94  @rename($sFilesPath . $sUserId . TEMP_FILE_NAME . $a['postfix'], $sFilesPath . $sFileId . $a['postfix']);
95 
96  return $sFileId;
97 }
98 
99 function uploadVideo($sFilePath, $sUserId, $isMoveUploadedFile = false, $sImageFilePath = '', $sFileName = '', $aFilesConfig = array())
100 {
103 
104  if (!$aFilesConfig)
105  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
106 
107  $sTempFileName = $sFilesPath . $sUserId . TEMP_FILE_NAME;
108  @unlink($sTempFileName);
109  if(file_exists($sFilePath) && filesize($sFilePath) > 0) {
110  if(is_uploaded_file($sFilePath)) {
111  move_uploaded_file($sFilePath, $sTempFileName);
112  } else {
113  @rename($sFilePath, $sTempFileName);
114  }
115  @chmod($sTempFileName, 0666);
116  if(file_exists($sTempFileName) && filesize($sTempFileName)>0) {
117 
118  if(!grabImages($sTempFileName, $sTempFileName, 0, false, $aFilesConfig))
119  return false;
120 
121  $sDBModule = DB_PREFIX . ucfirst($sModule);
122  $sUri = video_genUri($sFileName);
123  $sUriPart = empty($sUri) ? "" : "`Uri`='" . $sUri . "', ";
124 
125  getResult("INSERT INTO `" . $sDBModule . "Files` SET `Title`='" . $sFileName . "', " . $sUriPart . "`Description`='" . $sFileName . "', `Date`='" . time() . "', `Owner`='" . $sUserId . "', `Status`='" . STATUS_ONHOLD . "'");
126  $sFileId = getLastInsertId();
127  rename($sTempFileName, $sFilesPath . $sFileId);
128 
129  foreach ($aFilesConfig as $a)
130  if (isset($a['image']) && $a['image'])
131  @rename($sFilesPath . $sUserId . TEMP_FILE_NAME . $a['postfix'], $sFilesPath . $sFileId . $a['postfix']);
132 
133  return $sFileId;
134  }
135  }
136  return false;
137 }
138 
139 function publishRecordedVideo($sUserId, $sTitle, $sCategory, $sTags, $sDesc, $aFilesConfig = array())
140 {
143 
144  $sPlayFile = $sFilesPath . $sUserId . TEMP_FILE_NAME . FLV_EXTENSION;
145  if(file_exists($sPlayFile) && filesize($sPlayFile)>0) {
146 
147  if (!$aFilesConfig)
148  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
149 
150  $sDBModule = DB_PREFIX . ucfirst($sModule);
151  $sUri = video_genUri($sTitle);
152  $sUriPart = empty($sUri) ? "" : "`Uri`='" . $sUri . "', ";
153  getResult("INSERT INTO `" . $sDBModule . "Files` SET `Categories`='" . $sCategory . "', `Title`='" . $sTitle . "', " . $sUriPart . "`Tags`='" . $sTags . "', `Description`='" . $sDesc . "', `Date`='" . time() . "', `Owner`='" . $sUserId . "', `Status`='" . STATUS_PENDING . "'");
154  $sFileId = getLastInsertId();
155 
156  rename($sPlayFile, $sFilesPath . $sFileId);
157 
158  foreach ($aFilesConfig as $a)
159  if (isset($a['image']) && $a['image'])
160  @rename($sFilesPath . $sUserId . TEMP_FILE_NAME . $a['postfix'], $sFilesPath . $sFileId . $a['postfix']);
161 
162  return $sFileId;
163  }
164 
165  return false;
166 }
167 
168 function initVideo($sId, $sTitle, $sCategory, $sTags, $sDesc)
169 {
171 
173 
174  $sUri = video_genUri($sTitle);
175  $sUriPart = empty($sUri) ? "" : "`Uri`='" . $sUri . "', ";
176 
177  $sDBModule = DB_PREFIX . ucfirst($sModule);
178 
179  getResult("UPDATE `" . $sDBModule . "Files` SET `Categories`= ?, `Title`= ?, " . $sUriPart . "`Tags`= ?, `Description`= ? WHERE `ID`= ?", [
180  $sCategory,
181  $sTitle,
182  $sTags,
183  $sDesc,
184  $sId
185  ]);
186 
187  return $oDb->getAffectedRows() > 0 ? true : false;
188 }
189 
190 function getVideoSize($sInputFile)
191 {
193 
194  if(!file_exists($sInputFile) || filesize($sInputFile)==0) {
195  if(strpos($sInputFile, $sFilesPath) === FALSE) return $sInputFile;
196  else return VIDEO_SIZE_16_9;
197  }
198 
199  $sFile = $sFilesPath . time() . IMAGE_EXTENSION;
200  $sTmpl = prepareCommand($GLOBALS['aConvertTmpls']['image'], array("input" => $sInputFile, "size" => "", "second" => 0, "output" => $sFile));
201  if(convertVideoFile($sFile, $sTmpl)) {
202  $aSize = getimagesize($sFile);
203  @unlink($sFile);
204  $iRelation = $aSize[0]/$aSize[1];
205  $i169Dif = abs($iRelation - 16/9);
206  $i916Dif = abs($iRelation - 9/16);
207  $i43Dif = abs($iRelation - 4/3);
208 
209  if($i43Dif > $i916Dif) return VIDEO_SIZE_9_16;
210  else if($i169Dif > $i43Dif) return VIDEO_SIZE_4_3;
211  else return VIDEO_SIZE_16_9;
212  }
213  return VIDEO_SIZE_16_9;
214 }
215 
216 function getConverterTmpl($sInputFile, $sSize, $bSound = true, $bRecorded = false)
217 {
219  $bUsex264 = usex264();
220  if($bSound)
221  $sSound = $bUsex264 ? " -acodec aac -strict experimental -b:a 128k -ar 44100 " : " -acodec libmp3lame -b:a 128k -ar 44100 ";
222  else
223  $sSound = " -an ";
224 
225  return prepareCommand($GLOBALS['aConvertTmpls'][$bUsex264 ? 'playX264' : 'play'], array("input" => $sInputFile, "bitrate" => getVideoBitrate(), "size" => getVideoSize($sSize), "audio_options" => $sSound));
226 }
227 
228 function getVideoBitrate()
229 {
231 
232  //$iBitrate = (int)getSettingValue($sModule, "bitrate");
233  $iBitrate = (int)getParam('videoBitrate');
234  if(!$iBitrate)
235  $iBitrate = 512;
236 
237  return $iBitrate;
238 }
239 
240 function convertVideoFile($sFile, $sCommand)
241 {
242  popen($sCommand, "r");
243  if(file_exists($sFile))
244  @chmod($sFile, 0666);
245  return file_exists($sFile) && filesize($sFile) > 0;
246 }
247 
248 function convertMainVideo($sId, $sTmpl = "", $bRecorded = false)
249 {
252 
253  $sTempFile = $sFilesPath . $sId;
254  $sResultFile = $sTempFile . (usex264() ? M4V_EXTENSION : FLV_EXTENSION);
255 
256  $bResult = true;
257  if(!file_exists($sResultFile) || filesize($sResultFile)==0) {
258  if(empty($sTmpl))
259  $sTmpl = getConverterTmpl($sTempFile, $sTempFile, true, $bRecorded);
260  $sTmpl = prepareCommand($sTmpl, array("output" => $sResultFile));
261  $bResult = convertVideoFile($sResultFile, $sTmpl);
262  if(!$bResult) {
263  $sTmpl = getConverterTmpl($sTempFile, $sTempFile, false);
264  $sTmpl = prepareCommand($sTmpl, array("output" => $sResultFile));
265  $bResult = convertVideoFile($sResultFile, $sTmpl);
266  }
267  }
268  if($bResult && usex264())
269  $bResult = moveMp4Meta($sResultFile);
270 
271  return $bResult && grabImages($sResultFile, $sTempFile);
272 }
273 
275 {
278 
279  $sTempFile = $sFilesPath . $sId;
280  $sSourceFile = $sTempFile;
281 
282  $bUseX264 = usex264();
283  $sTmpl = prepareCommand($GLOBALS['aConvertTmpls'][$bUseX264 ? "playX264" : "play"], array("bitrate" => getVideoBitrate(), "audio_options" => $bUseX264 ? " -acodec aac -strict experimental -b:a 128k -ar 44100 " : "-acodec libmp3lame -b:a 128k -ar 44100 "));
284 
285  if(file_exists($sTempFile) && filesize($sTempFile)>0)
286  $sTmpl = prepareCommand($sTmpl, array("input" => $sTempFile, "size" => getVideoSize($sTempFile)));
287  else {
288  $sSourceFile .= FLV_EXTENSION;
289  if(file_exists($sSourceFile) && filesize($sSourceFile)>0)
290  $sTmpl = prepareCommand($sTmpl, array("input" => $sSourceFile, "size" => getVideoSize($sSourceFile)));
291  }
292  if(empty($sTmpl)) return false;
293 
294  $sDBModule = DB_PREFIX . ucfirst($sModule);
295  getResult("UPDATE `" . $sDBModule . "Files` SET `Date`='" . time() . "', `Status`='" . STATUS_PROCESSING . "' WHERE `ID`='" . $sId . "'");
296 
297  $bResult = convertMainVideo($sId, $sTmpl);
298  if(!$bResult) return false;
299 
300  $oAlert = new ChWsbAlerts('ch_videos', 'convert', $sId, getLoggedId(), array(
301  'result' => &$bResult,
302  'ffmpeg' => $GLOBALS['sFfmpegPath'],
303  'tmp_file' => $sTempFile,
304  'bitrate' => getVideoBitrate(),
305  'size' => getVideoSize($sTempFile),
306  ));
307  $oAlert->alert();
308 
309  if($bResult) {
310  //$sAutoApprove = getSettingValue($sModule, "autoApprove") == TRUE_VAL ? STATUS_APPROVED : STATUS_DISAPPROVED;
311  $sAutoApprove = 'on' == getParam('videoAutoApprove') ? STATUS_APPROVED : STATUS_DISAPPROVED;
312  getResult("UPDATE `" . $sDBModule . "Files` SET `Date`='" . time() . "', `Status`='" . $sAutoApprove . "' WHERE `ID`='" . $sId . "'");
313  } else {
314  getResult("UPDATE `" . $sDBModule . "Files` SET `Status`='" . STATUS_FAILED . "' WHERE `ID`='" . $sId . "'");
315  }
317  return $bResult;
318 }
319 
320 function grabImages($sInputFile, $sOutputFile, $iSecond = 0, $bForse = false, $aFilesConfig = array())
321 {
322  if (!$aFilesConfig)
323  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
324 
325  $fRatio = 0;
326  foreach ($aFilesConfig as $a) {
327  if (!isset($a['image']) || !$a['image'])
328  continue;
329 
330  $sResize = '';
331  if ($fRatio && isset($a['square']) && $a['square'] && isset($a['w']) && $a['w'] && $fRatio < 1)
332  $sResize = "-vf crop=out_h=in_w -s {$a['w']}x{$a['w']}";
333  elseif ($fRatio && isset($a['square']) && $a['square'] && isset($a['w']) && $a['w'])
334  $sResize = "-vf crop=out_w=in_h -s {$a['w']}x{$a['w']}";
335  elseif (isset($a['w']) && isset($a['h']) && $a['w'] && $a['h'])
336  $sResize = "-s {$a['w']}x{$a['h']}";
337 
338  if ($sInputFile != $sOutputFile . $a['postfix'])
339  @unlink($sOutputFile . $a['postfix']);
340 
341  if (!grabImage($sInputFile, $sOutputFile . $a['postfix'], $sResize, $iSecond, $bForse))
342  return false;
343 
344  if (!$fRatio) {
345  $aSize = getimagesize($sOutputFile . $a['postfix']);
346  $fRatio = $aSize[0]/$aSize[1];
347  }
348  }
349 
350  return true;
351 }
352 
353 function grabImage($sInputFile, $sOutputFile, $sSize = "", $iSecond = 0, $bForse = false)
354 {
355  if(!$bForse && file_exists($sOutputFile) && filesize($sOutputFile) > 0)
356  return true;
357 
358  ch_import('ChWsbImageResize');
359  $oImage = ChWsbImageResize::instance();
360 
361  $bResult = true;
362  $aSeconds = $iSecond != 0 ? array($iSecond) : array(0, 3, 5, 0);
363  foreach($aSeconds as $iSecond) {
364  $bResult = convertVideoFile($sOutputFile, getGrabImageTmpl($sInputFile, $sOutputFile, $sSize, $iSecond));
365  if(!$bResult)
366  continue;
367 
368  $aRgb = $oImage->getAverageColor($sOutputFile);
369  $fRgb = ($aRgb['r'] + $aRgb['g'] + $aRgb['b']) / 3;
370  if($fRgb > 32 && $fRgb < 224)
371  break;
372  }
373 
374  return $bResult;
375 }
376 
377 function getGrabImageTmpl($sInputFile, $sOutputFile, $sSize = "", $iSecond = 0)
378 {
379  global $aConvertTmpls;
380 
381  return prepareCommand($aConvertTmpls["image"], array("input" => $sInputFile, "second" => $iSecond, "size" => (empty($sSize) ? "" : $sSize), "output" => $sOutputFile));
382 }
383 
384 function deleteTempFiles($sUserId, $bSourceOnly = false, $aFilesConfig = array())
385 {
387 
388  if (!$aFilesConfig)
389  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
390 
391  $sTempFile = $sUserId . TEMP_FILE_NAME;
392  @unlink($sFilesPath . $sUserId);
393  @unlink($sFilesPath . $sTempFile);
394  if($bSourceOnly) return;
395 
396  foreach ($aFilesConfig as $a)
397  @unlink($sFilesPath . $sTempFile . $a['postfix']);
398 }
399 
405 function deleteVideo($sFile, $aFilesConfig = array())
406 {
409 
411 
412  if (!$aFilesConfig)
413  $aFilesConfig = ChWsbService::call('videos', 'get_files_config');
414 
415  $sDBModule = DB_PREFIX . ucfirst($sModule);
416  getResult("DELETE FROM `" . $sDBModule . "Files` WHERE `ID`='" . $sFile . "'");
417  if($oDb->getAffectedRows())
419  $sFileName = $sFilesPath . $sFile;
420  @unlink($sFileName);
421 
422  $bResult = false;
423  foreach ($aFilesConfig as $a)
424  $bResult |= @unlink($sFileName . $a['postfix']);
425 
426  return $bResult;
427 }
428 
429 function getToken($sId)
430 {
433  $sDBModule = DB_PREFIX . ucfirst($sModule);
434 
435  if(file_exists($sFilesPath . $sId . FLV_EXTENSION) || file_exists($sFilesPath . $sId . M4V_EXTENSION)) {
436  $iCurrentTime = time();
437  $sToken = md5($iCurrentTime);
438  getResult("INSERT INTO `" . $sDBModule . "Tokens`(`ID`, `Token`, `Date`) VALUES('" . $sId . "', '" . $sToken . "', '" . $iCurrentTime . "')");
439  return $sToken;
440  }
441  return "";
442 }
getLastInsertId
getLastInsertId()
Definition: db.inc.php:66
$sToken
$sToken
Definition: get_file.php:13
true
if(!defined("TRUE_VAL")) define("TRUE_VAL" true
Definition: constants.inc.php:8
video_parseTags
video_parseTags($iId)
Definition: customFunctions.inc.php:13
uploadVideo
uploadVideo($sFilePath, $sUserId, $isMoveUploadedFile=false, $sImageFilePath='', $sFileName='', $aFilesConfig=array())
Definition: functions.inc.php:99
$sFilesUrl
$sFilesUrl
Definition: header.inc.php:11
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
$oAlert
$oAlert
Definition: embed.php:15
getConverterTmpl
getConverterTmpl($sInputFile, $sSize, $bSound=true, $bRecorded=false)
Definition: functions.inc.php:216
php
$sModule
if(!file_exists($sRayHeaderPath)) $sModule
Definition: index.php:14
recordVideo
recordVideo($sUserId, $aFilesConfig=array())
Definition: functions.inc.php:77
deleteTempFiles
deleteTempFiles($sUserId, $bSourceOnly=false, $aFilesConfig=array())
Definition: functions.inc.php:384
copy
and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to copy
Definition: license.txt:50
getGrabImageTmpl
getGrabImageTmpl($sInputFile, $sOutputFile, $sSize="", $iSecond=0)
Definition: functions.inc.php:377
initVideo
initVideo($sId, $sTitle, $sCategory, $sTags, $sDesc)
Definition: functions.inc.php:168
video_genUri
video_genUri($s)
Definition: customFunctions.inc.php:18
ChWsbAlerts
Definition: ChWsbAlerts.php:39
$sFile
$sFile
Definition: index.php:20
ChWsbImageResize\instance
static instance()
Definition: ChWsbImageResize.php:60
getParam
getParam($sParamName, $bUseCache=true)
Definition: db.inc.php:130
usex264
usex264()
Definition: functions.inc.php:15
getLoggedId
getLoggedId()
Definition: profiles.inc.php:32
$sTitle
$sTitle
Definition: actions.inc.php:13
grabImage
grabImage($sInputFile, $sOutputFile, $sSize="", $iSecond=0, $bForse=false)
Definition: functions.inc.php:353
$sTags
$sTags
Definition: actions.inc.php:12
$oDb
global $oDb
Definition: db.inc.php:39
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
$bResult
$bResult
Definition: get_file.php:11
time
that in the case of a Adaptation or at a minimum such credit will if a credit for all contributing authors of the Adaptation or Collection then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors For the avoidance of You may only use the credit required by this Section for the purpose of attribution in the manner set out above by exercising Your rights under this You may not implicitly or explicitly assert or imply any connection sponsorship or endorsement by the Original Licensor and or Attribution as of You or Your use of the without the express prior written permission of the Original Licensor and or Attribution Parties Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable if You Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or You must not modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author s honor or reputation Licensor agrees that in those in which any exercise of the right granted in modification or other derogatory action prejudicial to the Original Author s honor and the Licensor will waive or not as this to the fullest extent permitted by the applicable national to enable You to reasonably exercise Your right under Warranties and Disclaimer UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN LICENSOR OFFERS THE WORK AS IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE STATUTORY OR WITHOUT WARRANTIES OF FITNESS FOR A PARTICULAR OR THE ABSENCE OF LATENT OR OTHER OR THE PRESENCE OF ABSENCE OF WHETHER OR NOT DISCOVERABLE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED SO SUCH EXCLUSION MAY NOT APPLY TO YOU Limitation on Liability EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Termination This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License Individuals or entities who have received Adaptations or Collections from You under this will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses and will survive any termination of this License Subject to the above terms and the license granted here is Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time
Definition: license.txt:56
deleteVideo
deleteVideo($sFile, $aFilesConfig=array())
Definition: functions.inc.php:405
convertMainVideo
convertMainVideo($sId, $sTmpl="", $bRecorded=false)
Definition: functions.inc.php:248
getRecordThumbnail
getRecordThumbnail($sUserId)
Definition: functions.inc.php:42
grabImages
grabImages($sInputFile, $sOutputFile, $iSecond=0, $bForse=false, $aFilesConfig=array())
Definition: functions.inc.php:320
publishRecordedVideo
publishRecordedVideo($sUserId, $sTitle, $sCategory, $sTags, $sDesc, $aFilesConfig=array())
Definition: functions.inc.php:139
$sDBModule
$sDBModule
Definition: header.inc.php:26
moveMp4Meta
moveMp4Meta($sFilePath)
Definition: apiFunctions.inc.php:268
$sId
$sId
Definition: actions.inc.php:8
getVideoSize
getVideoSize($sInputFile)
Definition: functions.inc.php:190
$sFilesPath
$sFilesPath
Definition: header.inc.php:10
convertVideoFile
convertVideoFile($sFile, $sCommand)
Definition: functions.inc.php:240
getToken
getToken($sId)
Definition: functions.inc.php:429
embedVideo
embedVideo($sUserId, $sVideoId, $iDuration, $aFilesConfig=array())
Definition: functions.inc.php:54
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32
$sDesc
$sDesc
Definition: actions.inc.php:21
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChWsbDb\getInstance
static getInstance()
Definition: ChWsbDb.php:82
getVideoBitrate
getVideoBitrate()
Definition: functions.inc.php:228
$sStatus
$sStatus
Definition: actions.inc.php:11
getEmbedThumbnail
getEmbedThumbnail($sUserId, $sImageUrl, $aFilesConfig=array())
Definition: functions.inc.php:22
convertVideo
convertVideo($sId)
Definition: functions.inc.php:274
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10
prepareCommand
prepareCommand($sTemplate, $aOptions)
Definition: functions.inc.php:8
getResult
getResult($sQuery)
Definition: db.inc.php:45