Burning (s)vcd doesn't work

vbimport

#1

Hello,

I’m using the DelphiNeroAPI and I’m trying to burn a (s)vcd. Unfortunately when I try to burn a *.mpg the debugger is executed before caching (or anything else) is started showing me: please close it down and restart.
When I try to burn a *.jpg on a (s)vcd then it the debugger doesn’t show up, everything seems to work, but then it shows me:
Preparing items
Preparation of item XXX.jpg failed.

Could please someone check my code, or give me an advice how to work with this debugger? That would be really great.

Yours Toastbrot

if Assigned(NeroWriteVideoCD) then
ReallocMem(NeroWriteVideoCD, SizeOf(NERO_WRITE_VIDEO_CD) + SizeOf(NERO_VIDEO_ITEM) * (NumberOfVideoTracks-1))
else
NeroWriteVideoCD :=AllocMem(SizeOf(NERO_WRITE_VIDEO_CD) + SizeOf(NERO_VIDEO_ITEM) * (NumberOfVideoTracks - 1));

NeroWriteVideoCD.nwvcdSVCD:=false;
NeroWriteVideoCD.nwvcdNumItems:=NumberOfVideoTracks;
NeroWriteVideoCD.nwvcdEncodingResolution:=NERO_VIDEO_RESOLUTION_PAL;

for i:=0 to NumberOfVideoTracks-1 do
begin
NeroWriteVideoCD.nwvcdItems[i].nviLongSourceFileName:=PAnsiChar(FileList[i]);

if (LowerCase(ExtractFileExt(ExtractFileName(FileList[i]))) = '.jpg') or
  (LowerCase(ExtractFileExt(ExtractFileName(FileList[i]))) = '.jpeg') then
begin
  NeroWriteVideoCD.nwvcdItems[i].nviItemType := NERO_JPEG_ITEM;
  NeroWriteVideoCD.nwvcdItems[i].nviPauseAfterItem := 0;
end;

if (LowerCase(ExtractFileExt(ExtractFileName(FileList[i]))) = '.mpg') or
  (LowerCase(ExtractFileExt(ExtractFileName(FileList[i]))) = '.mpeg') then
begin
  NeroWriteVideoCD.nwvcdItems[i].nviItemType := NERO_MPEG_ITEM;
  NeroWriteVideoCD.nwvcdItems[i].nviPauseAfterItem := 0;
end;

end;

NeroWriteVideoCD.nwvcdLongTempPath:=‘C:’;

Flags:=NBF_DETECT_NON_EMPTY_CDRW+NBF_WRITE+NBF_DISABLE_ABORT;

NeroBurn(NeroDeviceHandle, NERO_VIDEO_CD, NeroWriteVideoCD, Flags,
NeroDeviceInfos.nsdisDevInfos[DeviceSelected].nsdiWriteSpeeds.nsiSupportedSpeeds[DeviceSpeedSelected],
@NeroProgress);