fpc/packages/libvlc/example/tvlc.pp
michael ab566789a8 * Fix bug ID #30762
git-svn-id: trunk@34866 -
2016-11-11 09:14:25 +00:00

25 lines
554 B
ObjectPascal

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