UNA
BxDolTranscoder Class Reference
Inheritance diagram for BxDolTranscoder:
BxDolFactory iBxDolFactoryObject BxDolTranscoderImage BxDolTranscoderProxy BxDolTranscoderVideo BxDolTranscoderAudio

Public Member Functions

 onDeleteFileLocal ($iFileId)
 
 onDeleteFileOrig ($mixedHandler)
 
 registerHandlers ()
 
 unregisterHandlers ()
 
 cleanup ()
 
 getStorage ()
 
 getDb ()
 
 isMimeTypeSupported ($sMimeType)
 
 getFileUrl ($mixedHandler)
 
 getFileUrlById ($mixedHandler)
 
 isFileReady ($mixedHandler, $isCheckOutdated=true)
 
 transcode ($mixedHandler, $iProfileId=0)
 
 prune ()
 
 getFileUrlNotReady ($mixedHandler)
 
 getFilterParams ($sName)
 

Static Public Member Functions

static getObjectInstance ($sObject)
 
static pruning ()
 
static processQueue ($bQueuePruning=true)
 
static processCompleted ()
 
static registerHandlersArray ($mixed)
 
static registerHandlersSystem ()
 
static unregisterHandlersArray ($mixed)
 
static cleanupObjectsArray ($mixed)
 
static onAlertResponseFileDeleteLocal ($oAlert, $sObject)
 
static onAlertResponseFileDeleteOrig ($oAlert, $sObject)
 

Protected Member Functions

 __construct ($aObject, $oStorage)
 

Static Protected Member Functions

static getTranscoderObjects ()
 

Detailed Description

Base class for

See also
BxDolTranscoderImage and
BxDolTranscoderVideo transcoders

Constructor & Destructor Documentation

◆ __construct()

BxDolTranscoder::__construct (   $aObject,
  $oStorage 
)
protected

constructor

Member Function Documentation

◆ cleanup()

BxDolTranscoder::cleanup ( )

Delete (queue for deletion) all resized files for the current object

◆ cleanupObjectsArray()

static BxDolTranscoder::cleanupObjectsArray (   $mixed)
static

Cleanup (queue for deletion all resized files) It can be called upon module disbale event.

Parameters
$mixedarray of transcoders objects, or just one object

◆ getDb()

BxDolTranscoder::getDb ( )

Get database object instance

◆ getFileUrl()

BxDolTranscoder::getFileUrl (   $mixedHandler)

Get transcoded file url. If transcoded file is ready then direct url to the file is returned. If there is no transcoded data available, then special url is returned, upon opening this url image is transcoded automatically and redirects to the ready transcoed image.

Parameters
$mixedHandler- file handler
Returns
file url, or false on error.

◆ getFileUrlById()

BxDolTranscoder::getFileUrlById (   $mixedHandler)

alias for

See also
getFileUrl

◆ getFileUrlNotReady()

BxDolTranscoder::getFileUrlNotReady (   $mixedHandler)

Get file url when file isn't transcoded yet

◆ getFilterParams()

BxDolTranscoder::getFilterParams (   $sName)

Get filter params

Parameters
$sNamefilter name
Returns
array of filter params if filter was found, or false if given filter isn't enabled for the transcoder

◆ getObjectInstance()

static BxDolTranscoder::getObjectInstance (   $sObject)
static

Get transcode object instance.

Parameters
$sObject- name of transcode object.
Returns
false on error or instance of transcoder class.

Implements iBxDolFactoryObject.

◆ getStorage()

BxDolTranscoder::getStorage ( )

Get storage object where transcoded data is stored

◆ getTranscoderObjects()

static BxDolTranscoder::getTranscoderObjects ( )
staticprotected

Get transcoder objects array

Returns
array

◆ isFileReady()

BxDolTranscoder::isFileReady (   $mixedHandler,
  $isCheckOutdated = true 
)

Check if transcoded data is available. No need to call it directly, it is called automatically when it is needed.

Parameters
$mixedHandler- file handler
$isCheckOutdated- check if transcoded file is outdated
Returns
false if there is no ready transcoded file is available or it is outdated, true if file is ready

◆ isMimeTypeSupported()

BxDolTranscoder::isMimeTypeSupported (   $sMimeType)

check if transcoder suppors given file mime type

◆ onAlertResponseFileDeleteLocal()

static BxDolTranscoder::onAlertResponseFileDeleteLocal (   $oAlert,
  $sObject 
)
static

Called automatically, upon local(transcoded) file deletetion.

◆ onAlertResponseFileDeleteOrig()

static BxDolTranscoder::onAlertResponseFileDeleteOrig (   $oAlert,
  $sObject 
)
static

Called automatically, upon original file deletetion.

◆ onDeleteFileLocal()

BxDolTranscoder::onDeleteFileLocal (   $iFileId)

Called automatically, upon local(transcoded) file deletetion.

◆ onDeleteFileOrig()

BxDolTranscoder::onDeleteFileOrig (   $mixedHandler)

Called automatically, upon original file deletetion.

◆ processCompleted()

static BxDolTranscoder::processCompleted ( )
static

Store completed files from tmp queue storage to the final storage Must be performed on the actual site.

◆ processQueue()

static BxDolTranscoder::processQueue (   $bQueuePruning = true)
static

Process files queued for transcoding Can be performed on separate server.

◆ prune()

BxDolTranscoder::prune ( )

Delete outdated files by last access time.

Returns
number of pruned/deleted files

◆ pruning()

static BxDolTranscoder::pruning ( )
static

Delete outdated transcoed data from all transcoeeed objects, by last access time. It called on cron, usually every day.

Returns
total number of pruned/deleted files

◆ registerHandlers()

BxDolTranscoder::registerHandlers ( )

Register necessary alert handlers for automatic deletetion of transcoded data if source file is deleted. Make sure that you call it once, before first usage, for example upon module installation.

◆ registerHandlersArray()

static BxDolTranscoder::registerHandlersArray (   $mixed)
static

Register handlers array It can be called upon module enable event.

Parameters
$mixedarray of transcoders objects, or just one object

◆ registerHandlersSystem()

static BxDolTranscoder::registerHandlersSystem ( )
static

Register system handlers

◆ transcode()

BxDolTranscoder::transcode (   $mixedHandler,
  $iProfileId = 0 
)

Transcode file, no need to call it directly, it is called automatically when it is needed.

Parameters
$mixedHandler- file handler
$iProfileId- optional profile id, to assign transcoded file ownership to, usually it is NOT assigned to any particular profile, so just leave it default
Returns
true on success, false on error

◆ unregisterHandlers()

BxDolTranscoder::unregisterHandlers ( )

Unregister alert handlers for automatic deletetion of transcoded data if source file is deleted. Make sure that you call it once, for example upon module uninstallation.

◆ unregisterHandlersArray()

static BxDolTranscoder::unregisterHandlersArray (   $mixed)
static

Unregister handlers array It can be called upon module disbale event.

Parameters
$mixedarray of transcoders objects, or just one object

The documentation for this class was generated from the following file: