AVBlocks for C++
1.9
Audio and Video Software Development Kit
|
The TranscoderCallback provides a way to receive notifications from the Transcoder and also to control its operation while it is running (Transcoder::run). More...
Inherits Reference.
Public Member Functions | |
virtual void | onProgress (double currentTime, double totalTime) |
This method is called periodically by the Transcoder to report transcoding progress. | |
virtual void | onStatus (TranscoderStatus::Enum status) |
This method is called by the Transcoder to report the status of current operation. | |
virtual bool_t | onContinue (double currentTime) |
This method is called by the Transcoder to give the user code a chance to stop the transcoding process started by Transcoder::run(). | |
int32_t | retain () const |
The default implementation keeps a constant reference count of 1. | |
int32_t | release () const |
The default implementation keeps a constant reference count of 1. | |
int32_t | retainCount () const |
The default implementation keeps a constant reference count of 1. |
The TranscoderCallback provides a way to receive notifications from the Transcoder and also to control its operation while it is running (Transcoder::run).
This class is meant to be inherited by the user code and only the required notifications/methods can be overridden.
When a TranscoderCallback instance is set (Transcoder::setCallback) it is retained by the Transcoder. The TranscoderCallback instance is released when the Transcoder itself is being destroyed.
The default implementation of primo::Reference keeps a constant reference count of 1. This can be used when the client code is the sole owner of the implemented callback and does not need to manage it through the primo::Reference interface.
The TranscoderCallback is used only when the transcoding is performed via Transcoder::run.
virtual bool_t onContinue | ( | double | currentTime | ) | [virtual] |
This method is called by the Transcoder to give the user code a chance to stop the transcoding process started by Transcoder::run().
currentTime | [in] The duration of the media stream that has been processed so far. Time is in seconds. |
When instructed the Transcoder stops the transcoding process gracefully so that the media data processed is valid (playable).
This notification is called as often as possible so that the user code may stop the transcoding process as soon as it is required. For this reason there should be minimal processing in this method if it is overridden by the user code, otherwise the overall transcoding may be slowed down.
virtual void onProgress | ( | double | currentTime, |
double | totalTime | ||
) | [virtual] |
This method is called periodically by the Transcoder to report transcoding progress.
See Transcoder::run.
currentTime | [in] The duration of the media stream that has been processed so far. Time is in seconds. |
totalTime | [in] The total duration of the media stream that will be processed eventually. Time is in seconds. |
For performance reasons this notification is not called for every processed media sample. Currently it is called once for every 0.5 seconds of processed media data. This notification is intended for user interface updates.
The transcoding progress in percents is given by: (currentTime / totalTime * 100).
The Transcoder does not guarantee that currentTime will ever reach totalTime even when the transcoding completes successfully.
virtual void onStatus | ( | TranscoderStatus::Enum | status | ) | [virtual] |
This method is called by the Transcoder to report the status of current operation.
status | [in] Transcoder status. |
int32_t release | ( | ) | const [virtual] |
int32_t retain | ( | ) | const [virtual] |
int32_t retainCount | ( | ) | const [virtual] |