2
0

tvlc.pp 554 B

123456789101112131415161718192021222324
  1. {$IFDEF UNIX}
  2. {$linklib pthread}
  3. {$ENDIF}
  4. {$mode objfpc}
  5. {$H+}
  6. program tvlc;
  7. uses {$ifdef unix}cthreads,{$endif}libvlc, math;
  8. Var
  9. Args: Array[0..3] of pchar;
  10. fhandle : pointer;
  11. begin
  12. // This is needed, or loading the VLC libraries will fail with a SIGFPE
  13. setexceptionmask([exInvalidOp, exDenormalized, exZeroDivide,
  14. exOverflow, exUnderflow, exPrecision]);
  15. LoadLibVLC(libname,False);
  16. args[0] := PAnsiChar('libvlc.so.5');
  17. Args[1] := PansiChar(ParamStr(1));
  18. args[2] := NIL;
  19. FHandle := libvlc_new(1, @args);
  20. end.