hedgewars/uVideoRec.pas
changeset 11532 bf86c6cb9341
parent 11046 47a8c19ecb60
child 11612 b7d5d75469ee
equal deleted inserted replaced
11531:d1cf1ff6cabb 11532:bf86c6cb9341
   107     desc:= desc + 'prefix[' + RecPrefix + ']prefix';
   107     desc:= desc + 'prefix[' + RecPrefix + ']prefix';
   108 
   108 
   109     filename:= UserPathPrefix + '/VideoTemp/' + RecPrefix;
   109     filename:= UserPathPrefix + '/VideoTemp/' + RecPrefix;
   110     soundFilePath:= UserPathPrefix + '/VideoTemp/' + RecPrefix + '.sw';
   110     soundFilePath:= UserPathPrefix + '/VideoTemp/' + RecPrefix + '.sw';
   111 
   111 
   112     TryDo(AVWrapper_Init(@AddFileLogRaw
   112     if checkFails(AVWrapper_Init(@AddFileLogRaw
   113         , PChar(ansistring(filename))
   113         , PChar(ansistring(filename))
   114         , PChar(ansistring(desc))
   114         , PChar(ansistring(desc))
   115         , PChar(ansistring(soundFilePath))
   115         , PChar(ansistring(soundFilePath))
   116         , PChar(ansistring(cAVFormat))
   116         , PChar(ansistring(cAVFormat))
   117         , PChar(ansistring(cVideoCodec))
   117         , PChar(ansistring(cVideoCodec))
   118         , PChar(ansistring(cAudioCodec))
   118         , PChar(ansistring(cAudioCodec))
   119         , cScreenWidth, cScreenHeight, cVideoFramerateNum, cVideoFramerateDen, cVideoQuality) >= 0,
   119         , cScreenWidth, cScreenHeight, cVideoFramerateNum, cVideoFramerateDen, cVideoQuality) >= 0,
   120         'AVWrapper_Init failed',
   120         'AVWrapper_Init failed',
   121         true);
   121         true) then exit(false);
   122 
   122 
   123     numPixels:= cScreenWidth*cScreenHeight;
   123     numPixels:= cScreenWidth*cScreenHeight;
   124     YCbCr_Planes[0]:= GetMem(numPixels);
   124     YCbCr_Planes[0]:= GetMem(numPixels);
   125     YCbCr_Planes[1]:= GetMem(numPixels div 4);
   125     YCbCr_Planes[1]:= GetMem(numPixels div 4);
   126     YCbCr_Planes[2]:= GetMem(numPixels div 4);
   126     YCbCr_Planes[2]:= GetMem(numPixels div 4);