DVDBuilder for .NET
3.4
DVD Authoring Software Development Kit
|
This class represents the DVD video recorder and is used to carry out the DVD recording. More...
Public Member Functions | |
VideoRecorder () | |
Creates a VideoRecorder object. More... | |
void | Dispose () |
Disposes the VideoRecorder and reclaims the resources used by the object. More... | |
bool | FinalizeMedia () |
Finalizes VideoRecorder instance. More... | |
ErrorInfo | GetDeviceError (int deviceIndex) |
Gets an object that can be used to query the error state of a specified device after a parallel operation of the video recorder. More... | |
bool | GetIsFinalized (int deviceIndex) |
Gets information whether the video in all attached devices is finalized. More... | |
Int64 | GetMediaFreeSpace (int deviceIndex) |
Gets the usable free space (in bytes) for video recording. More... | |
IList< Title > | GetTitles (int deviceIndex) |
Gets an object that can be used to enumerate all DVD-Video titles in the specified device. More... | |
VRDevicePlugin | LoadDevicePlugin (string path) |
The LoadDevicePlugin method creates a device plugin object. More... | |
bool | PrepareMedia () |
Prepares the media in the attached devices for writing. More... | |
bool | Start () |
Starts the recording process. More... | |
bool | StartAsync () |
Starts the recording process asynchronously. More... | |
bool | Stop () |
Stops the recording process. More... | |
bool | Write (IntPtr dataPtr, Int32 dataSize) |
Passes data to the VideoRecorder to be written to all devices. More... | |
bool | Write (byte[] data) |
Passes data to the VideoRecorder to be written to all devices. More... | |
Properties | |
bool | AllowMuxBufferUnderflow [get, set] |
Indicates whether or not a multiplexer buffer underflow is allowed. More... | |
Int32 | AverageBitrate [get] |
Gets the average bitrate (bits per second) of the video since the start of the recording. More... | |
IList< VRDevice > | Devices [get] |
Gets the device list of the VideoRecorder. More... | |
ErrorInfo | Error [get] |
The error information for the last operation. More... | |
bool | IsFinalized [get] |
Gets information whether the video is finalized. More... | |
bool | IsFinalizeSupported [get] |
Gets information whether the video supports finalization. More... | |
Int64 | MediaFreeSpace [get] |
Gets the usable free space (in bytes) for video recording. More... | |
This class represents the DVD video recorder and is used to carry out the DVD recording.
VideoRecorder | ( | ) |
Creates a VideoRecorder object.
void Dispose | ( | ) |
Disposes the VideoRecorder and reclaims the resources used by the object.
bool FinalizeMedia | ( | ) |
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 VideoRecorder cannot be ejected manually while the finalization is in progress.
ErrorInfo GetDeviceError | ( | int | deviceIndex | ) |
Gets an object that can be used to query the error state of a specified device after a parallel operation of the video recorder.
This method should be used immediately after one of the following parallel operations:
VideoRecorder.PrepareMedia VideoRecorder.Start VideoRecorder.Write VideoRecorder.Stop VideoRecorder.FinalizeMedia
Only in this case the GetDeviceError method is guaranteed to return a consistent error state for the specified device.
deviceIndex | A zero-based index of the device for which the error state is requested. |
bool GetIsFinalized | ( | int | deviceIndex | ) |
Gets information whether the video in all attached devices is finalized.
If the finalized state cannot be obtained then VideoRecorder.Error facilicty is not ErrorFacility.Success.
deviceIndex | The index of the device that will be checked for a finalized video content. |
Int64 GetMediaFreeSpace | ( | int | deviceIndex | ) |
Gets the usable free space (in bytes) for video recording.
The returned value is the free space for the specified device. 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
.
deviceIndex | A zero-based index in the video recorder device list. Specifies the device for which the remaining free space is requested. |
IList<Title> GetTitles | ( | int | deviceIndex | ) |
Gets an object that can be used to enumerate all DVD-Video titles in the specified device.
deviceIndex | 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.
VRDevicePlugin LoadDevicePlugin | ( | string | path | ) |
The LoadDevicePlugin method creates a device plugin object.
path | A file system path to the plugin library. |
bool PrepareMedia | ( | ) |
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.
bool Start | ( | ) |
Starts the recording process.
All 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.
bool StartAsync | ( | ) |
Starts the recording process asynchronously.
It is identical to VideoRecorder.Start except that StartAsync has a non-blocking behaviour. The video recorder 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. A VideoRecorder object is ready to accept data through the Write method as soon as StartSync 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.
bool Stop | ( | ) |
Stops the recording process.
All data buffered in the VideoRecorder is flushed to 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.
bool Write | ( | IntPtr | dataPtr, |
Int32 | dataSize | ||
) |
Passes data to the VideoRecorder 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.
dataPtr | A pointer to data buffer that has to be written. The data is in the unmanaged memory. |
dataSize | The size (in bytes) of the data buffer specified by the dataPtr parameter |
Use the VideoRecorder.GetDeviceError method to inspect the error state of the attached device when the Write method returns false. 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.
bool Write | ( | byte[] | data | ) |
Passes data to the VideoRecorder 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.
data | The data buffer that has to be written. The data is in the managed memory. |
Use the VideoRecorder.GetDeviceError method to inspect the error state of the attached device when the Write method returns false. 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.
|
getset |
Indicates whether or not a multiplexer buffer underflow is allowed.
|
get |
Gets the average bitrate (bits per second) 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.
|
get |
Gets the device list of the VideoRecorder.
The device list can be used to add or remove devices. The VideoRecorder needs at least one device in order to start the recording process.
|
get |
Gets information whether the video is finalized.
Returns true when the video is finalized, false otherwise. If the finalization state cannot be obtained then VideoRecorder.Error facilicty is not ErrorFacility.Success.
|
get |
Gets information whether the video supports finalization.
If it is supported then the FinalizeMedia method can be used to make discs more compatible for playing/reading. Returns true when the video supports finalization, false otherwise. If the finalization support cannot be obtained then VideoRecorder.Error facilicty is not ErrorFacility.Success.
|
get |
Gets the usable free space (in bytes) for video recording.
The returned value 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 GetAverageBitrate). 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
.