123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- /******************************************************************************
- |* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- |* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- |* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- |* PARTICULAR PURPOSE.
- |*
- |* Copyright 1995-2005 Nero AG. All Rights Reserved.
- |*-----------------------------------------------------------------------------
- |* NeroSDK / NeroAPI
- |*
- |* PROGRAM: NeroBurnAtOnce.h
- |*
- |* PURPOSE: Interface to BurnAtOnce functionality of Nero API.
- |* BurnAtOnce can burn DVD-Video data directly to DVDs without having
- |* to first generate all files on the harddisc.
- |*
- |* NOTES : This functionality is present up from NeroAPI 6.3.1.11
- ******************************************************************************/
- #ifndef NEROBURNATONCE_H
- #define NEROBURNATONCE_H
- #include "NeroAPI.h"
- #ifdef __cplusplus
- #include "NeroFileSystemContent.h"
- #if defined(__BORLANDC__)
- // NEROAPI expects structs to be 8byte aligned
- #pragma pack(push, 8)
- // tell Borland C++ Builder to treat enums as int
- #pragma option push -b
- #endif
- namespace FileSystemContent
- {
- // ask the IDataInputStream object you get in IFileProducer::ProduceFile
- // with GetOtherInterface("IBurnAtOnceInfo") to get a pointer to this object
- class IBurnAtOnceInfo : public InterfaceBase
- {
- public:
- // returns the offset to start of VIDEO_TS.IFO in blocks
- virtual DWORD GetOffset() const = 0;
- };
- }
- #endif // __cplusplus
- #ifdef __cplusplus
- class CBurnAtOnceRecorder;
- typedef CBurnAtOnceRecorder* NERO_BAO_HANDLE;
- extern "C"
- {
- #else // __cplusplus
- typedef void* NERO_BAO_HANDLE;
- #endif
-
- typedef struct tag_NERO_BURN_AT_ONCE
- {
- /* fill this with sizeof(NERO_BURN_AT_ONCE) */
- DWORD nwbaoSize;
- /* path to a directory to store temporary files
- * If NULL, system temp directory will be used */
- const char *nwbaoTempDirectory;
- /* The content of the filesystem
- * Important:
- * 1) All IFO and BUP files must have set the exact file size
- * 2) All other video files must have set the estimated size which will be
- * updated during burning. Note, that the estimated size should
- * be as exact as possible.
- * 3) For each video title set only add the first VOB file (e.g. VTS_01_1.VOB)
- * to the file system container and pass all the video data of this title set
- * in the file producer of this file. NeroAPI will automatically split the
- * file at the appropriate size (1 GB - logical block size).
- * 4) DVD-Video files will be sorted automatically
- * 5) It is guaranteed that the file data will be requested in the following order:
- * - VMGM_VOB (VIDEO_TS.VOB) [if present]
- * - For each video title set (VTS):
- * - VTSM_VOB (e.g. VTS_01_0.VOB) [if present]
- * - VTSTT_VOBS (e.g. VTS_01_1.VOB) [mandatory]
- * - VTSI file (e.g. VTS_01_0.IFO) [mandatory]
- * - VTSI backup (e.g. VTS_01_0.BUP) [mandatory]
- * - VMGMI (VIDEO_TS.IFO) [mandatory]
- * - Backup for VMGMI (VIDEO_TS.BUP) [mandatory]
- */
- #ifdef __cplusplus
- FileSystemContent::
- #else //__cplusplus
- struct
- #endif//__cplusplus
- IFileSystemDescContainer *nwbaoFSContainer;
- DWORD nwbaoReserved[64]; /* Should be zero */
- } NERO_WRITE_BURN_AT_ONCE;
-
- NEROAPI_API
- NEROAPI_BURN_ERROR NADLL_ATTR NeroBurnAtOnce(NERO_DEVICEHANDLE aDeviceHandle,
- NERO_WRITE_BURN_AT_ONCE *pBurnAtOnce,
- DWORD dwFlags, // set of NBF_ flags. Note, that not all NBF_ flags will be interpreted.
- DWORD dwSpeed, // In KB/s if NBF_SPEED_IN_KBS is present, in multiple of 150 KB/s otherwise
- NERO_PROGRESS* pNeroProgress,
- void *reserved);
- /* This is the second method to do BurnAtOnce with NeroAPI.
- * It allows more control by application but you have to make sure
- * by yourself to deliver the data in the correct order. Additionally,
- * NeroAPI will not cache any data in memory with this method and the
- * methods block until all the data is written. Therefore, your
- * application should implement some caching itself for performance reasons.
- *
- * Howto use:
- * 1) Fill the nwbaoFSContainer of NERO_WRITE_BURN_AT_ONCE to specify the
- * layout of the DVD.
- * 2) Call NeroBAOCreateHandle with the necessary information to get a NERO_BAO_HANDLE
- * 3) For each video file in the VIDEO_TS folder, call NeroBAOOpenFile, then write
- * all the data with NeroBAOWriteToFile and then call NeroBAOCloseFile.
- * Note:
- * it is absolutely important, that this is done in the correct order. See
- * notes on the nwbaoFSContainer above.
- * 4) After all video data is written, call NeroBAOCloseHandle. This will write additional
- * files that are present in the filesystem container and then finalize the disc.
- * 5) If an error occurs on your side and/or you want to cancel burning, just call
- * NeroBAOCloseHandle with dwFlags set to NBAOF_CANCELED or NBAOF_FAILED.
- * 6) If an error occurs on NeroAPI's side, also call NeroBAOCloseHandle to end burning
- * and do some cleanup.
- *
- * Notes:
- * - nwbaoFSContainer needs to be valid until NeroBAOCloseHandle is called.
- */
- NEROAPI_API
- NEROAPI_BURN_ERROR NADLL_ATTR NeroBAOCreateHandle(NERO_DEVICEHANDLE aDeviceHandle,
- NERO_WRITE_BURN_AT_ONCE *pBurnAtOnce,
- DWORD dwFlags, // set of NBF_ flags. Note, that not all NBF_ flags will be interpreted.
- DWORD dwSpeed, // In KB/s if NBF_SPEED_IN_KBS is present, in multiple of 150 KB/s otherwise
- NERO_PROGRESS* pNeroProgress,
- NERO_BAO_HANDLE* pBAOHandle, // will get the handle created by NeroAPI
- void *reserved);
- NEROAPI_API
- NEROAPI_BURN_ERROR NADLL_ATTR NeroBAOOpenFile(NERO_BAO_HANDLE hBAOHandle, const char *name, DWORD* pdwOffset, void *reserved);
- NEROAPI_API
- NEROAPI_BURN_ERROR NADLL_ATTR NeroBAOWriteToFile(NERO_BAO_HANDLE hBAOHandle,
- const void* lpBuffer, // data buffer
- DWORD nNumberOfBytesToWrite, // number of bytes to write
- // Must be multiple of 2048!
- LPDWORD lpNumberOfBytesWritten,
- void *reserved);
- NEROAPI_API
- NEROAPI_BURN_ERROR NADLL_ATTR NeroBAOCloseFile(NERO_BAO_HANDLE hBAOHandle,
- void *reserved);
- NEROAPI_API
- NEROAPI_BURN_ERROR NADLL_ATTR NeroBAOCloseHandle(NERO_BAO_HANDLE hBAOHandle, DWORD dwFlags, void *reserved);
- #define NBAOF_CANCELED (1<<0)
- #define NBAOF_FAILED (1<<1)
- #ifdef __cplusplus
- }
- #endif
- #if defined(__BORLANDC__)
- #pragma pack(pop)
- #pragma option pop
- #endif
- #endif // NEROBURNATONCE_H
|