hedgewars/uVideoRec.pas
changeset 7540 cc6c656f70b5
parent 7538 2d6e69b392cb
child 7671 43f38923bc6e
equal deleted inserted replaced
7538:2d6e69b392cb 7540:cc6c656f70b5
    26 implementation
    26 implementation
    27 end.
    27 end.
    28 {$ELSE}
    28 {$ELSE}
    29 
    29 
    30 {$IFNDEF WIN32}
    30 {$IFNDEF WIN32}
    31     {$LINKLIB avwrapper}
    31     {$LINKLIB ../bin/libavwrapper.a}
    32     {$LINKLIB avutil}
       
    33     {$LINKLIB avcodec}
       
    34     {$LINKLIB avformat}
       
    35 {$ENDIF}
    32 {$ENDIF}
    36 
    33 
    37 interface
    34 interface
    38 
    35 
    39 var flagPrerecording: boolean = false;
    36 var flagPrerecording: boolean = false;
    51 
    48 
    52 implementation
    49 implementation
    53 
    50 
    54 uses uVariables, uUtils, GLunit, SDLh, SysUtils, uIO, uMisc, uTypes;
    51 uses uVariables, uUtils, GLunit, SDLh, SysUtils, uIO, uMisc, uTypes;
    55 
    52 
    56 const AVWrapperLibName = {$IFDEF WIN32}'libavwrapper.dll'{$ELSE}''{$ENDIF};
       
    57 
       
    58 type TAddFileLogRaw = procedure (s: pchar); cdecl;
    53 type TAddFileLogRaw = procedure (s: pchar); cdecl;
    59 
    54 
    60 procedure AVWrapper_Init(
    55 procedure AVWrapper_Init(
    61               AddLog: TAddFileLogRaw;
    56               AddLog: TAddFileLogRaw;
    62               filename, desc, soundFile, format, vcodec, acodec: PChar;
    57               filename, desc, soundFile, format, vcodec, acodec: PChar;
    63               width, height, framerateNum, framerateDen, vquality: LongInt); cdecl; external AVWrapperLibName;
    58               width, height, framerateNum, framerateDen, vquality: LongInt); cdecl; external {$IFDEF WIN32}'libavwrapper.dll'{$ENDIF};
    64 procedure AVWrapper_Close; cdecl; external AVWrapperLibName;
    59 procedure AVWrapper_Close; cdecl; external {$IFDEF WIN32}'libavwrapper.dll'{$ENDIF};
    65 procedure AVWrapper_WriteFrame( pY, pCb, pCr: PByte ); cdecl; external AVWrapperLibName;
    60 procedure AVWrapper_WriteFrame( pY, pCb, pCr: PByte ); cdecl; external {$IFDEF WIN32}'libavwrapper.dll'{$ENDIF};
    66 
    61 
    67 type TFrame = record
    62 type TFrame = record
    68                   realTicks: LongWord;
    63                   realTicks: LongWord;
    69                   gameTicks: LongWord;
    64                   gameTicks: LongWord;
    70                   CamX, CamY: LongInt;
    65                   CamX, CamY: LongInt;