When an item is ingested into yospaceCDS, it is acquired and encoded into a variety of formats managed automatically by yospaceCDS in order for it to be available to a wide range of connected devices.
yospaceCDS R2.6 introduced the ability for the MediaItem API to make status update callbacks allowing your software to determine when the item is ready for end users. This may be used in preference to polling the item status method repeatedly.
Furthermore, yospaceCDS will send callbacks for each interim stage of processing, although your software to estimate the timeframe in which it will be processed. These interim updates can be ignored, of course.
The callback method operates as follows:
The following parameters are added to all callbacks made:
ideventCONVERSION_START - an encoding job has started.CONVERSION_SUCCESSFUL - an encoding job has successfully completed.CONVERSION_FAILED - an encoding job has failed. All further pending jobs will be cancelled and the item will be set to a failed state.acquirePROCESSING - the item is being acquired.SUCCESSFUL - the item was acquired successfully (and processing will begin)FAILED - the item could not be acquired. All further processing will stop. If this occurs, check that the URL you supplied is correct and internet accessible.The following parameters are added to callbacks except the first.
queueprocesssuccessfailedIn the event of a failure, the additional parameter message containing a textual description of the reason for failure.
The purpose of this message is to assist developers during testing and debugging. The error descriptions may change over time and therefore
should be subject only to human interpretation.
The final notification will contain the parameter complete (set to TRUE if successful). Your callback handler can simply ignore all
other callbacks except this one if it simply wants to know when the content is ready.
This example assumes that the callback URL (as set by the stateChangeUrl parameter) is:
http://myserver.net/cds
The acquisition of the content starts. Callback is:
http://myserver.net/cds?id=13300836&event=CONVERSION_START&acquire=PROCESSING
The acquisition of the content succeeds, the callback is:
http://myserver.net/cds?process=0&id=13300836&queue=100&event=CONVERSION_SUCCESSFUL
&acquire=SUCCESSFUL&failed=0&success=0
However, if the content acquistion fails, the following callback is made:
http://myserver.net/cds?message=DOWNLOAD_404_FILE_NOT_FOUND&id=13300872
&event=CONVERSION_FAILED&acquire=FAILED
Each encoding job that commences is notified as such:
http://myserver.net/cds?process=18&id=13300836&queue=54&event=CONVERSION_START
&acquire=SUCCESSFUL&failed=0&success=27
When this encoding job completes, it is notified as shown below. Please note that jobs may run in parallel, so you cannot always guarantee that a job start notification will be followed by its corresponding job completed notification.
http://myserver.net/cds?process=18&id=13300836&queue=18&event=CONVERSION_SUCCESSFUL
&acquire=SUCCESSFUL&failed=0&success=63
In the event a conversion fails, the following callback is made:
http://myserver.net/cds?message=VIDEO_TRANSCODE_FAILED&process=18&id=13300836&queue=18
&event=CONVERSION_FAILED&acquire=SUCCESSFUL&failed=0&success=63
The final notification that informs you that the content is available to end users is made as:
http://myserver.net/cds?process=0&id=13300836&queue=0&complete=TRUE
&event=CONVERSION_SUCCESSFUL&acquire=SUCCESSFUL
&failed=0&success=100