This interface represents the DVD video recorder and is used to carry out the DVD recording.
More...
This interface represents the DVD video recorder and is used to carry out the DVD recording.
An instance of VideoRecorder can be created through Library::createVideoRecorder
- Version
- 2.0
- See also
- Library::createVideoRecorder
virtual bool_t allowMuxBufferUnderflow |
( |
| ) |
|
|
pure virtual |
Returns the value set with the SetAllowMuxBufferUnderflow method.
- See also
- SetAllowMuxBufferUnderflow
- Version
- 2.0.5
virtual uint32_t averageBitrate |
( |
| ) |
|
|
pure virtual |
Gets the average bitrate of the video since the start of the recording.
The returned bitrate may be 0 when the first several seconds of the input video has not been processed yet by the video recorder. This should be checked explicitly when calculating the remaining recording time.
- Returns
- The average bitrate (bits per second) since the start of the recording.
- Version
- 2.0
- See also
- VideoRecorder::mediaFreeSpace
-
VideoRecorder::start
-
VideoRecorder::stop
virtual ErrorInfo* deviceError |
( |
int |
deviceIndex | ) |
|
|
pure virtual |
Gets an object that can be used to query the error state of a specified device after a parallel operation of the video recorder.
The lifetime of the error state object is controlled by the video recorder.
This method should be used immediately after one of the following parallel operations: prepareMedia , start , write , stop , and finalizeMedia . Only in this case the deviceError() method is guaranteed to return a consistent error state for the specified device.
- Parameters
-
deviceIndex | [in] A zero-based index of the device for which the error state is requested. |
- Returns
- An object that contains information about the error state of a video recording device or NULL if the error state is not available.
- Version
- 2.0
Gets the device list of the video recorder.
The device list can be used to add or remove devices. The video recorder needs at least one device in order to start the recording process.
- Returns
- A pointer to the recorder device list.
- Version
- 2.0
Returns the error information for the last operation.
- Returns
- A pointer to an ErrorInfo object.
virtual bool_t finalized |
( |
| ) |
|
|
pure virtual |
Gets information whether the video is finalized.
With no argument the method returns true when the video in all attached devices is finalized. With a device index the method returns true when the video in the specified device is finalized. If the finalized state cannot be obtained VideoRecorder::error facility is non zero.
- Parameters
-
deviceIndex | [in] The index of the device that will be checked for a finalized video content. |
- Returns
- The return value is 1 when the video is finalized and 0 when it's not finalized.
- Version
- 2.0
- See also
- VideoRecorder::finalizeMedia
-
VideoRecorder::finalizeSupported
-
VideoRecorder::error
virtual bool_t finalizeMedia |
( |
| ) |
|
|
pure virtual |
Finalizes VideoRecorder instance.
This is required for DVD-Video so that the content can be played by a conventional DVD player or even read by the operating system. The media used by the video recorder cannot be ejected manually while the finalization is in progress.
- Returns
- The return value is 1 when the video is finalized successfully.
-
The return value is 0 when the video could not be finalized.
- Version
- 2.0
- See also
- VideoRecorder::finalizeSupported
-
VideoRecorder::finalized
virtual bool_t finalizeSupported |
( |
| ) |
|
|
pure virtual |
Creates a device plugin instance.
- Parameters
-
path | [in] A file system path to the plugin library. |
- Returns
- A pointer to device plugin instance
- Version
- 2.0
virtual uint64_t mediaFreeSpace |
( |
| ) |
|
|
pure virtual |
Gets the usable free space (in bytes) for video recording.
When a device index is specified the returned value is the free space for the specified device. When there's no device index the free space is the minimum free space of all attached devices. The video recorder can successfully stop the recording and finalize the video content even when the free space is zero.
This value can be used to estimate the remaining recording time as well (in combination with averageBitrate()). A good estimate of the available recording time in seconds is: MediaFreeSpace*8/AverageBitrate.
During recording this method should be used to estimate the remaining recording space instead of VRDevice::mediaFreeSpace.
- Parameters
-
deviceIndex | [in] A zero-based index in the video recorder device list. Specifies the device for which the remaining free space is requested. |
- Returns
- The remaining free space (in bytes) that can be used for video recording.
- Version
- 2.0
- See also
- VideoRecorder::averageBitrate
-
VideoRecorder::stop
-
VideoRecorder::finalizeMedia
-
VRDevice::mediaFreeSpace
virtual bool_t prepareMedia |
( |
| ) |
|
|
pure virtual |
Prepares the media in the attached devices for writing.
It is an integral part of the start() and startAsync() methods. It is not neccesary to call prepareMedia() in order to start the recording. However the Start method may take much less time if prepareMedia() has been called beforehand.
- Returns
- The return value is 1 when the media in all attached devices have been prepared successfully.
-
The return value is 0 when the media preparation has failed.
- Version
- 2.0
- See also
- VideoRecorder::start
virtual void setAllowMuxBufferUnderflow |
( |
bool_t |
allowUnderflow | ) |
|
|
pure virtual |
Indicates that a multiplexer buffer underflow is allowed.
- Version
- 2.0.5
Starts the recording process.
All devices (VideoRecorder::devices ) must be initialized before this method is called. After the recording has been started data must be passed to the recorder using the write() method. When the Start method returns successfully the media in VideoRecorder::devices are locked and cannot be ejected manually. The media are unlocked when the recording is stopped.
- Returns
- The return value is 1 when the recording process has started successfully. The media used in the recording are locked and cannot be ejected manually.
-
The return value is 0 when the the recording process has failed to start.
- See also
- VideoRecorder::Write
-
VideoRecorder::Stop
- Version
- 2.0
virtual bool_t startAsync |
( |
| ) |
|
|
pure virtual |
Starts the recording process asynchronously.
It is identical to VideoRecorder::start except that startAsync has a non-blocking behaviour. VideoRecorder starts a background task to prepare the media in all attached devices for writing. This is a potentially lengthy operation (especially for DVD+R discs) and StartAsync does not wait for it to finish. VideoRecorder is ready to accept data through the write() method as soon as startAsync returns even though the actual recording process is postponed after all media is prepared. If the video recorder cannot accept more data it will set the VideoRecorderError::StartAsyncBufferFull error when data is passed through the write() method. Then the Stop method should be called to stop the recording. The video recorder is designed to accept at least 2 minutes of MPEG-2 video at max birate.
- Returns
- The return value is 1 when the recording process has started successfully. The media used in the recording are locked and cannot be ejected manually.
-
The return value is 0 when the the recording process has failed to start.
- Version
- 2.0
- See also
- VideoRecorder::write
-
VideoRecorder::stop
-
VideoRecorder::start
Stops the recording process.
All data buffered in the video recorder is flushed to the attached devices (VideoRecorder::devices ). This method is synchronous and it may take a while (approx. 20 sec.) before the method returns. All media used in the recording are unlocked after the method returns successfully.
- Returns
- The return value is 1 when the recording has stopped successfully. The media used in the recording are unlocked and can be ejected manually.
-
The return value is 0 when an error has ocurred while trying to stop the recording.
- Version
- 2.0
- See also
- VideoRecorder::start
Gets an object that can be used to enumerate all DVD-Video titles in the specified device.
The object returned by this method must be released (TitleEnum::release) when it's not needed anymore in order to free the occupied memory.
- Parameters
-
deviceIndex | [in] A zero-based index in the video recorder device list. Specifies the device for which the DVD-Video titles will be retrieved. The device must be initialized before calling this method. |
- Returns
- An object that contains information about all titles on the specified disc.
- Version
- 2.0
- See also
- TitleEnum::release
virtual bool_t write |
( |
uint8_t * |
pData, |
|
|
uint32_t |
dataSize |
|
) |
| |
|
pure virtual |
Passes data to the video recorder to be written to all devices.
This method must be called continuously after Start has been called successfully and as long as there is available data to be written. If there is no more data stop() must be called.
- Parameters
-
pData | [in] A pointer to data buffer that has to be written. |
dataSize | [in] The size (in bytes) of the data buffer specified by the pData parameter. |
- Returns
- The return value is 1 when the data has been accepted by the recorder.
-
The return value is 0 when the recorder has failed to accept the data or one or more of the attached devices have failed. Use the VideoRecorder::deviceError method to inspect the error state of the attached device when the write() method returns 0. If all devices have failed the recording process has to be stopped using the stop() method and no more data must be passed to the recorder by calling the write() method. The recording may continue as long as there's at least one active (non-failed) device.
- Version
- 2.0
- See also
- VideoRecorder::start
-
VideoRecorder::stop
-
VideoRecorder::deviceError