Support for fadeInfo added to playlist editing methods.
This commit is contained in:
parent
0a3c35395d
commit
ed9cc68fc3
1 changed files with 22 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.43 $
|
Version : $Revision: 1.44 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/GreenBox.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/GreenBox.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -35,7 +35,7 @@ require_once "BasicStor.php";
|
||||||
* LiveSupport file storage module
|
* LiveSupport file storage module
|
||||||
*
|
*
|
||||||
* @author $Author: tomas $
|
* @author $Author: tomas $
|
||||||
* @version $Revision: 1.43 $
|
* @version $Revision: 1.44 $
|
||||||
* @see BasicStor
|
* @see BasicStor
|
||||||
*/
|
*/
|
||||||
class GreenBox extends BasicStor{
|
class GreenBox extends BasicStor{
|
||||||
|
@ -485,9 +485,14 @@ class GreenBox extends BasicStor{
|
||||||
* @param token string, playlist access token
|
* @param token string, playlist access token
|
||||||
* @param acId string, local ID of added file
|
* @param acId string, local ID of added file
|
||||||
* @param sessid string, session ID
|
* @param sessid string, session ID
|
||||||
|
* <span style="color:red">
|
||||||
|
* @param fadeIn string, optional, in time format hh:mm:ss.ssssss
|
||||||
|
* @param fadeOut string, dtto
|
||||||
|
* </span>
|
||||||
* @return string, generated playlistElement gunid
|
* @return string, generated playlistElement gunid
|
||||||
*/
|
*/
|
||||||
function addAudioClipToPlaylist($token, $acId, $sessid)
|
function addAudioClipToPlaylist($token, $acId, $sessid,
|
||||||
|
$fadeIn=NULL, $fadeOut=NULL)
|
||||||
{
|
{
|
||||||
$acGunid = $this->_gunidFromId($acId);
|
$acGunid = $this->_gunidFromId($acId);
|
||||||
if(PEAR::isError($acGunid)) return $acGunid;
|
if(PEAR::isError($acGunid)) return $acGunid;
|
||||||
|
@ -551,6 +556,7 @@ class GreenBox extends BasicStor{
|
||||||
$r = $pl->md->insertMetadataEl(
|
$r = $pl->md->insertMetadataEl(
|
||||||
$plElId, 'relativeOffset', $plLen, 'A');
|
$plElId, 'relativeOffset', $plLen, 'A');
|
||||||
if(PEAR::isError($r)){ return $r; }
|
if(PEAR::isError($r)){ return $r; }
|
||||||
|
// insert audioClip element into playlistElement
|
||||||
$r = $pl->md->insertMetadataEl($plElId, 'audioClip');
|
$r = $pl->md->insertMetadataEl($plElId, 'audioClip');
|
||||||
if(PEAR::isError($r)){ return $r; }
|
if(PEAR::isError($r)){ return $r; }
|
||||||
$acId = $r;
|
$acId = $r;
|
||||||
|
@ -560,6 +566,19 @@ class GreenBox extends BasicStor{
|
||||||
if(PEAR::isError($r)){ return $r; }
|
if(PEAR::isError($r)){ return $r; }
|
||||||
$r = $pl->md->insertMetadataEl($acId, 'title', $acTit, 'A');
|
$r = $pl->md->insertMetadataEl($acId, 'title', $acTit, 'A');
|
||||||
if(PEAR::isError($r)){ return $r; }
|
if(PEAR::isError($r)){ return $r; }
|
||||||
|
if(!is_null($fadeIn) || !is_null($fadeOut)){
|
||||||
|
// insert fadeInfo element into playlistElement
|
||||||
|
$r = $pl->md->insertMetadataEl($plElId, 'fadeInfo');
|
||||||
|
if(PEAR::isError($r)){ return $r; }
|
||||||
|
$fiId = $r;
|
||||||
|
$fiGunid = StoredFile::_createGunid();
|
||||||
|
$r = $pl->md->insertMetadataEl($fiId, 'id', $fiGunid, 'A');
|
||||||
|
if(PEAR::isError($r)){ return $r; }
|
||||||
|
$r = $pl->md->insertMetadataEl($fiId, 'fadeIn', $fadeIn, 'A');
|
||||||
|
if(PEAR::isError($r)){ return $r; }
|
||||||
|
$r = $pl->md->insertMetadataEl($fiId, 'fadeOut', $fadeOut, 'A');
|
||||||
|
if(PEAR::isError($r)){ return $r; }
|
||||||
|
}
|
||||||
// calculate and insert total length:
|
// calculate and insert total length:
|
||||||
$newPlLen = $this->_secsToPlTime(
|
$newPlLen = $this->_secsToPlTime(
|
||||||
$this->_plTimeToSecs($plLen) + $this->_plTimeToSecs($acLen)
|
$this->_plTimeToSecs($plLen) + $this->_plTimeToSecs($acLen)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue