Стартовый пул
This commit is contained in:
939
PasLibVlc/source/PasLibVlcClassUnit.pas
Normal file
939
PasLibVlc/source/PasLibVlcClassUnit.pas
Normal file
@@ -0,0 +1,939 @@
|
||||
(*
|
||||
* PasLibVlcClassUnit.pas
|
||||
*
|
||||
* Last modified: 2018.07.01
|
||||
*
|
||||
* author: Robert J<>drzejczyk
|
||||
* e-mail: robert@prog.olsztyn.pl
|
||||
* www: http://prog.olsztyn.pl/paslibvlc
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Any non-GPL usage of this software or parts of this software is strictly
|
||||
* forbidden.
|
||||
*
|
||||
* The "appropriate copyright message" mentioned in section 2c of the GPLv2
|
||||
* must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
|
||||
*
|
||||
*)
|
||||
|
||||
{$I .\compiler.inc}
|
||||
|
||||
unit PasLibVlcClassUnit;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}Unix,{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}Windows,{$ENDIF}
|
||||
Classes, SysUtils,
|
||||
PasLibVlcUnit;
|
||||
|
||||
type
|
||||
TDeinterlaceFilter = (deOFF, deON);
|
||||
TDeinterlaceMode = (dmDISCARD, dmBLEND, dmMEAN, dmBOB, dmLINEAR, dmX, dmYADIF, dmYADIF2x, dmPHOSPHOR, dmIVTC);
|
||||
|
||||
TPasLibVlcTitlePosition = (
|
||||
plvPosCenter,
|
||||
plvPosLeft,
|
||||
plvPosRight,
|
||||
plvPosTop,
|
||||
plvPosTopLeft,
|
||||
plvPosTopRight,
|
||||
plvPosBottom,
|
||||
plvPosBottomLeft,
|
||||
plvPosBottomRight
|
||||
);
|
||||
|
||||
TVideoRatio = (ra_NONE, ra_16_9, ra_16_10, ra_185_100, ra_221_100, ra_235_100, ra_239_100, ra_4_3, ra_5_4, ra_5_3, ra_1_1);
|
||||
|
||||
TMux = (muxTS, muxPS, muxMp4, muxOgg, muxAvi);
|
||||
|
||||
TVideoOutput = (
|
||||
voDefault
|
||||
{$IFDEF DARWIN}, voMacOSX{$ENDIF}
|
||||
{$IFDEF UNIX}, voX11, voXVideo, voGlx{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}, voWinGdi, voDirectX, voDirect3d, voOpenGl{$ENDIF}
|
||||
, voDummy
|
||||
);
|
||||
|
||||
TAudioOutput = (
|
||||
aoDefault
|
||||
{$IFDEF DARWIN}, aoCoreAudio{$ENDIF}
|
||||
{$IFDEF UNIX}, aoOpenSystemSound, aoAdvancedLinuxSoundArchitecture, aoEnlightenedSoundDaemon, aoKdeSoundServer{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}, aoDirectX, aoWaveOut{$ENDIF}
|
||||
, aoDummy
|
||||
);
|
||||
|
||||
TVideoCodec = (vcNONE, vcMPGV, vcMP4V, vcH264, vcTHEORA);
|
||||
|
||||
TAudioCodec = (acNONE, acMPGA, acMP3, acMP4A, acVORB, acFLAC);
|
||||
|
||||
const
|
||||
// http://www.videolan.org/doc/vlc-user-guide/en/ch02.html#id331515
|
||||
vlcDeinterlaceModeNames : array[TDeinterlaceMode] of string = (
|
||||
'discard', 'blend', 'mean', 'bob', 'linear', 'x', 'yadif', 'yadif2x', 'phosphor', 'ivtc');
|
||||
|
||||
// http://www.videolan.org/doc/vlc-user-guide/en/ch02.html#id328503
|
||||
vlcMuxNames : array[TMux] of AnsiString = (
|
||||
'ts', 'ps', 'mp4', 'ogg', 'avi');
|
||||
|
||||
// http://www.videolan.org/doc/vlc-user-guide/en/ch02.html#id330667
|
||||
vlcVideoOutputNames : array[TVideoOutput] of string = (
|
||||
'default'
|
||||
{$IFDEF DARWIN}, 'macosx' {$ENDIF}
|
||||
{$IFDEF UNIX}, 'x11', 'xvideo', 'glx'{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}, 'wingdi', 'directx', 'direct3d', 'opengl'{$ENDIF}
|
||||
, 'dummy'
|
||||
);
|
||||
|
||||
// http://www.videolan.org/doc/vlc-user-guide/en/ch02.html#id332336
|
||||
vlcAudioOutputNames : array[TAudioOutput] of string = (
|
||||
'default'
|
||||
{$IFDEF DARWIN}, 'coreaudio'{$ENDIF}
|
||||
{$IFDEF UNIX}, 'oss', 'alsa', 'esd', 'arts'{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}, 'directx', 'waveout'{$ENDIF}
|
||||
, 'dummy'
|
||||
);
|
||||
|
||||
vlcVideoRatioNames : array[TVideoRatio] of AnsiString = (
|
||||
'', '16:9', '16:10', '185:100', '221:100', '235:100', '239:100', '4:3', '5:4', '5:3', '1:1');
|
||||
|
||||
// http://www.videolan.org/doc/vlc-user-guide/en/ch02.html#id329971
|
||||
vlcVideoCodecNames : array[TVideoCodec] of AnsiString = (
|
||||
'', 'mpgv', 'mp4v', 'mp4v', 'theora');
|
||||
|
||||
vlcAudioCodecNames : array[TAudioCodec] of AnsiString = (
|
||||
'', 'mpga', 'mp3', 'mp4a', 'vorb', 'flac');
|
||||
|
||||
type
|
||||
TPasLibVlc = class
|
||||
private
|
||||
FHandle : libvlc_instance_t_ptr;
|
||||
FPath : WideString;
|
||||
|
||||
FTitleShow : Boolean;
|
||||
|
||||
FVersionBin : LongWord;
|
||||
|
||||
FStartOptions : TStringList;
|
||||
|
||||
function GetHandle() : libvlc_instance_t_ptr;
|
||||
function GetError() : WideString;
|
||||
function GetVersion() : WideString;
|
||||
function GetVersionBin() : LongWord;
|
||||
function GetCompiler() : WideString;
|
||||
function GetChangeSet() : WideString;
|
||||
|
||||
procedure SetPath(aPath: WideString);
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure AddOption(option : string);
|
||||
|
||||
property Handle : libvlc_instance_t_ptr read GetHandle;
|
||||
property Error : WideString read GetError;
|
||||
property Version : WideString read GetVersion;
|
||||
property VersionBin : LongWord read GetVersionBin;
|
||||
property Compiler : WideString read GetCompiler;
|
||||
property ChangeSet : WideString read GetChangeSet;
|
||||
property Path : WideString read FPath write SetPath;
|
||||
property TitleShow : Boolean read FTitleShow write FTitleShow default FALSE;
|
||||
|
||||
property StartOptions : TStringList read FStartOptions;
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TPasLibVlcMediaPlayerC = class;
|
||||
TPasLibVlcMediaListC = class;
|
||||
|
||||
TPasLibVlcMedia = class
|
||||
private
|
||||
FVLC : TPasLibVlc;
|
||||
FMD : libvlc_media_t_ptr;
|
||||
public
|
||||
constructor Create(aVLC: TPasLibVlc); overload;
|
||||
constructor Create(aVLC: TPasLibVlc; aMrl: WideString); overload;
|
||||
constructor Create(aVLC: TPasLibVlc; aMD: libvlc_media_t_ptr); overload;
|
||||
constructor Create(aVLC: TPasLibVlc; aStm : TStream); overload;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure NewLocation(mrl: WideString);
|
||||
procedure NewPath(path: WideString);
|
||||
procedure NewNode(name: WideString);
|
||||
procedure NewStream(stm : TStream);
|
||||
|
||||
procedure AddOption(option: WideString);
|
||||
procedure AddOptionFlag(option: WideString; flag: input_item_option_e);
|
||||
|
||||
function GetMrl(): WideString;
|
||||
|
||||
function Duplicate(): TPasLibVlcMedia;
|
||||
|
||||
function GetMeta(meta: libvlc_meta_t): WideString;
|
||||
procedure SetMeta(meta: libvlc_meta_t; value: WideString);
|
||||
procedure SaveMeta();
|
||||
|
||||
function GetState(): libvlc_state_t;
|
||||
function GetStats(var stats: libvlc_media_stats_t): Boolean;
|
||||
|
||||
function SubItems(): TPasLibVlcMediaListC;
|
||||
|
||||
function GetEventManager(): libvlc_event_manager_t_ptr;
|
||||
|
||||
function GetDuration(): libvlc_time_t;
|
||||
|
||||
procedure Parse();
|
||||
procedure ParseAsync();
|
||||
|
||||
function IsParsed(): Boolean;
|
||||
|
||||
procedure SetUserData(data: Pointer);
|
||||
function GetUserData(): Pointer;
|
||||
|
||||
function GetTracksInfo(var tracks : libvlc_media_track_info_t_ptr): Integer;
|
||||
|
||||
procedure SetDeinterlaceFilter(aValue: TDeinterlaceFilter);
|
||||
procedure SetDeinterlaceFilterMode(aValue: TDeinterlaceMode);
|
||||
|
||||
property MD : libvlc_media_t_ptr read FMD;
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TPasLibVlcMediaListC = class
|
||||
private
|
||||
FVLC: TPasLibVlc;
|
||||
FML: libvlc_media_list_t_ptr;
|
||||
|
||||
FMP: TPasLibVlcMediaPlayerC;
|
||||
public
|
||||
constructor Create(aVLC: TPasLibVlc); overload;
|
||||
constructor Create(aVLC: TPasLibVlc; aML: libvlc_media_list_t_ptr); overload;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure SetMedia(media: TPasLibVlcMedia);
|
||||
function GetMedia(): TPasLibVlcMedia; overload;
|
||||
function GetMedia(index: Integer): TPasLibVlcMedia; overload;
|
||||
function GetIndex(media: TPasLibVlcMedia): Integer;
|
||||
function IsReadOnly(): Boolean;
|
||||
|
||||
procedure Add(mrl: WideString); overload;
|
||||
procedure Add(media: TPasLibVlcMedia); overload;
|
||||
procedure Insert(media: TPasLibVlcMedia; index: Integer);
|
||||
procedure Delete(index: Integer);
|
||||
procedure Clear();
|
||||
function Count(): Integer;
|
||||
|
||||
procedure Lock();
|
||||
procedure UnLock();
|
||||
|
||||
function GetEventManager(): libvlc_event_manager_t_ptr;
|
||||
|
||||
property ML : libvlc_media_list_t_ptr read FML;
|
||||
property MI : TPasLibVlcMediaPlayerC read FMP write FMP;
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TPasLibVlcMediaPlayerC = class
|
||||
private
|
||||
FTitleShow : Boolean;
|
||||
FVideoOnTop : Boolean;
|
||||
FUseOverlay : Boolean;
|
||||
FSnapShotFmt : string;
|
||||
|
||||
FDeinterlaceFilter: TDeinterlaceFilter;
|
||||
FDeinterlaceMode: TDeinterlaceMode;
|
||||
|
||||
public
|
||||
property TitleShow : Boolean read FTitleShow write FTitleShow default FALSE;
|
||||
property VideoOnTop : Boolean read FVideoOnTop write FVideoOnTop default FALSE;
|
||||
property UseOverlay : Boolean read FUseOverlay write FUseOverlay default FALSE;
|
||||
property SnapShotFmt : string read FSnapShotFmt write FSnapShotFmt;
|
||||
property DeinterlaceFilter: TDeinterlaceFilter read FDeinterlaceFilter write FDeinterlaceFilter default deOFF;
|
||||
property DeinterlaceMode: TDeinterlaceMode read FDeinterlaceMode write FDeinterlaceMode default dmDISCARD;
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TPasLibVlcEqualizer = class
|
||||
private
|
||||
FVLC : TPasLibVlc;
|
||||
FEqualizer : libvlc_equalizer_t_ptr;
|
||||
FPreset : Word;
|
||||
public
|
||||
constructor Create(AVLC: TPasLibVlc; APreset : unsigned_t = $FFFF);
|
||||
destructor Destroy; override;
|
||||
|
||||
function GetPreAmp() : Single;
|
||||
procedure SetPreAmp(value : Single);
|
||||
|
||||
function GetAmp(index: unsigned_t) : Single;
|
||||
procedure SetAmp(index : unsigned_t; value : Single);
|
||||
|
||||
function GetBandCount() : unsigned_t;
|
||||
function GetBandFrequency(index : unsigned_t) : Single;
|
||||
|
||||
function GetPresetCount() : unsigned_t;
|
||||
function GetPresetName(index : unsigned_t) : WideString; overload;
|
||||
function GetPresetName() : WideString; overload;
|
||||
function GetPreset() : unsigned_t;
|
||||
procedure SetPreset(APreset : unsigned_t = $FFFF);
|
||||
|
||||
function GetHandle() : libvlc_equalizer_t_ptr;
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
implementation
|
||||
|
||||
{$IFDEF DELPHI_XE6_UP}
|
||||
uses
|
||||
System.AnsiStrings;
|
||||
{$ENDIF}
|
||||
|
||||
constructor TPasLibVlc.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
FHandle := NIL;
|
||||
FTitleShow := FALSE;
|
||||
FStartOptions := TStringList.Create;
|
||||
FVersionBin := 0;
|
||||
end;
|
||||
|
||||
destructor TPasLibVlc.Destroy;
|
||||
begin
|
||||
if (Assigned(libvlc_release)) then
|
||||
begin
|
||||
if (FHandle <> NIL) then
|
||||
begin
|
||||
libvlc_release(FHandle);
|
||||
FHandle := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
FStartOptions.Free;
|
||||
FStartOptions := NIL;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlc.AddOption(option : string);
|
||||
begin
|
||||
if (option <> '') and (FStartOptions.IndexOf(option) < 0) then
|
||||
begin
|
||||
FStartOptions.Add(option);
|
||||
end;
|
||||
end;
|
||||
|
||||
{$WARNINGS OFF}
|
||||
{$HINTS OFF}
|
||||
function TPasLibVlc.GetHandle() : libvlc_instance_t_ptr;
|
||||
begin
|
||||
Result := NIL;
|
||||
if (FHandle = NIL) then
|
||||
begin
|
||||
if (FPath <> '') then
|
||||
begin
|
||||
libvlc_dynamic_dll_init_with_path(FPath);
|
||||
if (libvlc_dynamic_dll_error <> '') then libvlc_dynamic_dll_init();
|
||||
end
|
||||
else
|
||||
begin
|
||||
libvlc_dynamic_dll_init();
|
||||
end;
|
||||
if (libvlc_dynamic_dll_error <> '') then exit;
|
||||
|
||||
with TArgcArgs.Create([
|
||||
libvlc_dynamic_dll_path,
|
||||
'--ignore-config',
|
||||
'--intf=dummy',
|
||||
'--quiet'
|
||||
//'--telnet-host=localhost',
|
||||
//'--telnet-port=4212',
|
||||
//'--telnet-password=test'
|
||||
//'--extraintf=telnet',
|
||||
]) do
|
||||
begin
|
||||
|
||||
// AddArg('--no-one-instance');
|
||||
|
||||
AddArg(FStartOptions);
|
||||
|
||||
if (VersionBin < $020100) then
|
||||
begin
|
||||
if not TitleShow then
|
||||
begin
|
||||
AddArg('--no-video-title-show');
|
||||
end
|
||||
else
|
||||
begin
|
||||
AddArg('--video-title-show');
|
||||
end;
|
||||
end;
|
||||
|
||||
// activate marq and logo subfilters
|
||||
if (VersionBin >= $010100) then
|
||||
begin
|
||||
AddArg('--sub-filter=logo:marq');
|
||||
end;
|
||||
if (VersionBin >= $020000) then
|
||||
begin
|
||||
AddArg('--sub-source=marq');
|
||||
end;
|
||||
|
||||
FHandle := libvlc_new(ARGC, ARGS);
|
||||
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
Result := FHandle;
|
||||
end;
|
||||
{$WARNINGS ON}
|
||||
{$HINTS ON}
|
||||
|
||||
function TPasLibVlc.GetError() : WideString;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(libvlc_errmsg) then
|
||||
Result := {$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(AnsiString(libvlc_errmsg()))
|
||||
end;
|
||||
|
||||
function TPasLibVlc.GetVersion() : WideString;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(libvlc_get_version) then
|
||||
Result := {$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(AnsiString(libvlc_get_version()));
|
||||
end;
|
||||
|
||||
function TPasLibVlc.GetVersionBin() : LongWord;
|
||||
var
|
||||
ver_utf8 : PAnsiChar;
|
||||
ver_numa : LongWord;
|
||||
ver_numb : LongWord;
|
||||
ver_numc : LongWord;
|
||||
begin
|
||||
if (FVersionBin = 0) then
|
||||
begin
|
||||
if Assigned(libvlc_get_version) then
|
||||
begin
|
||||
ver_utf8 := libvlc_get_version();
|
||||
ver_numa := read_dec_number(ver_utf8) and $ff;
|
||||
ver_numb := read_dec_number(ver_utf8) and $ff;
|
||||
ver_numc := read_dec_number(ver_utf8) and $ff;
|
||||
FVersionBin := (ver_numa shl 16) or (ver_numb shl 8) or ver_numc;
|
||||
end;
|
||||
end;
|
||||
Result := FVersionBin;
|
||||
end;
|
||||
|
||||
function TPasLibVlc.GetCompiler() : WideString;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(libvlc_get_compiler) then
|
||||
Result := {$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(AnsiString(libvlc_get_compiler()));
|
||||
end;
|
||||
|
||||
function TPasLibVlc.GetChangeSet() : WideString;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(libvlc_get_changeset) then
|
||||
Result := {$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(AnsiString(libvlc_get_changeset()));
|
||||
end;
|
||||
|
||||
procedure TPasLibVlc.SetPath(aPath: WideString);
|
||||
begin
|
||||
FPath := aPath;
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
constructor TPasLibVlcMedia.Create(aVLC: TPasLibVlc);
|
||||
begin
|
||||
inherited Create;
|
||||
FVLC := aVLC;
|
||||
FMD := NIL;
|
||||
end;
|
||||
|
||||
constructor TPasLibVlcMedia.Create(aVlc: TPasLibVlc; aMrl: WideString);
|
||||
begin
|
||||
inherited Create;
|
||||
FVLC := aVLC;
|
||||
FMD := NIL;
|
||||
|
||||
if FileExists(aMrl) then
|
||||
NewPath(aMrl)
|
||||
else
|
||||
NewLocation(aMrl);
|
||||
end;
|
||||
|
||||
constructor TPasLibVlcMedia.Create(aVlc : TPasLibVlc; aMD : libvlc_media_t_ptr);
|
||||
begin
|
||||
inherited Create;
|
||||
FVLC := aVLC;
|
||||
FMD := aMD;
|
||||
end;
|
||||
|
||||
constructor TPasLibVlcMedia.Create(aVlc : TPasLibVlc; aStm : TStream);
|
||||
begin
|
||||
inherited Create;
|
||||
FVLC := aVLC;
|
||||
FMD := NIL;
|
||||
NewStream(aStm);
|
||||
end;
|
||||
|
||||
destructor TPasLibVlcMedia.Destroy;
|
||||
begin
|
||||
if (FMD <> NIL) then
|
||||
begin
|
||||
libvlc_media_release(FMD);
|
||||
end;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.SetDeinterlaceFilter(aValue : TDeinterlaceFilter);
|
||||
begin
|
||||
case aValue of
|
||||
deOFF: AddOption('deinterlace=0');
|
||||
deON: AddOption('deinterlace=1');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.SetDeinterlaceFilterMode(aValue : TDeinterlaceMode);
|
||||
begin
|
||||
AddOption('deinterlace-mode=' + WideString(vlcDeinterlaceModeNames[aValue]));
|
||||
end;
|
||||
|
||||
// media.AddOption('http-caching=1000');
|
||||
// media.AddOption('network-caching=1000');
|
||||
// media.AddOption('avcodec-hw=none');
|
||||
|
||||
// char mp4_high[] = "#transcode{vcodec=h264,venc=x264{cfr=16},scale=1,acodec=mp4a,ab=160,channels=2,samplerate=44100}";
|
||||
// char mp4_low[] = "#transcode{vcodec=h264,venc=x264{cfr=40},scale=1,acodec=mp4a,ab=96,channels=2,samplerate=44100}";
|
||||
|
||||
// display and file, transcode before
|
||||
// media.AddOption(':sout=#transcode{}:duplicate{dst=display,dst=std{access=file,mux=avi,dst="c:\test.avi"}}');
|
||||
|
||||
// display and file, no transcode
|
||||
// media.AddOption(':sout=#duplicate{dst=display,dst=std{access=file,mux=avi,dst="c:\test.avi"}}');
|
||||
|
||||
// display and output at rtp://127.0.0.1:1234
|
||||
// media.AddOption(':sout=#duplicate{dst=display,dst=rtp{dst=127.0.0.1,port=1234,mux=ts}}');
|
||||
|
||||
// no display, file with transcode to mp4
|
||||
// media.AddOption(':sout=#transcode{vcodec=h264,vb=1024,fps=25,scale=1,acodec=mp3}:std{access=file,mux=mp4,dst="c:\test.mp4"}');
|
||||
|
||||
procedure TPasLibVlcMedia.AddOption(option: WideString);
|
||||
var
|
||||
temp : AnsiString;
|
||||
begin
|
||||
if (FMD <> NIL) then
|
||||
begin
|
||||
temp := Utf8Encode(Trim(option));
|
||||
if (temp <> '') then
|
||||
begin
|
||||
libvlc_media_add_option(FMD, PAnsiChar(temp));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.AddOptionFlag(option: WideString; flag: input_item_option_e);
|
||||
begin
|
||||
if (FMD <> NIL) then
|
||||
begin
|
||||
libvlc_media_add_option_flag(FMD, PAnsiChar(UTF8Encode(option)), flag);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.NewLocation(mrl: WideString);
|
||||
begin
|
||||
if (FVLC.Handle <> NIL) then
|
||||
begin
|
||||
FMD := libvlc_media_new_location(FVLC.Handle, PAnsiChar(UTF8Encode(mrl)));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.NewPath(path: WideString);
|
||||
begin
|
||||
if (FVLC.Handle <> NIL) then
|
||||
begin
|
||||
FMD := libvlc_media_new_path(FVLC.Handle, PAnsiChar(UTF8Encode(path)));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.NewNode(name: WideString);
|
||||
begin
|
||||
if (FVLC.Handle <> NIL) then
|
||||
begin
|
||||
FMD := libvlc_media_new_as_node(FVLC.Handle, PAnsiChar(UTF8Encode(name)));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.NewStream(stm: TStream);
|
||||
begin
|
||||
if (FVLC.Handle <> NIL) then
|
||||
begin
|
||||
FMD := libvlc_media_new_callbacks(
|
||||
FVLC.FHandle,
|
||||
libvlc_media_open_cb_stm,
|
||||
libvlc_media_read_cb_stm,
|
||||
libvlc_media_seek_cb_stm,
|
||||
libvlc_media_close_cb_stm,
|
||||
Pointer(stm)
|
||||
);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetMrl(): WideString;
|
||||
begin
|
||||
if (FMD <> NIL) then
|
||||
begin
|
||||
Result := {$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(AnsiString(libvlc_media_get_mrl(FMD)));
|
||||
end
|
||||
else
|
||||
begin
|
||||
Result := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.Duplicate(): TPasLibVlcMedia;
|
||||
begin
|
||||
if (FMD = NIL) then Result := TPasLibVlcMedia.Create(FVLC)
|
||||
else Result := TPasLibVlcMedia.Create(FVLC, libvlc_media_duplicate(FMD));
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetMeta(meta: libvlc_meta_t): WideString;
|
||||
begin
|
||||
Result := {$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(AnsiString(libvlc_media_get_meta(FMD, meta)));
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.SetMeta(meta: libvlc_meta_t; value: WideString);
|
||||
begin
|
||||
libvlc_media_set_meta(FMD, meta, PAnsiChar(UTF8Encode(value)));
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.SaveMeta();
|
||||
begin
|
||||
libvlc_media_save_meta(FMD);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetState(): libvlc_state_t;
|
||||
begin
|
||||
Result := libvlc_media_get_state(FMD);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetStats(var stats: libvlc_media_stats_t): Boolean;
|
||||
begin
|
||||
Result := (libvlc_media_get_stats(FMD, @stats ) <> 0);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.SubItems(): TPasLibVlcMediaListC;
|
||||
begin
|
||||
Result := TPasLibVlcMediaListC.Create(
|
||||
FVLC,
|
||||
libvlc_media_subitems(FMD)
|
||||
);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetEventManager(): libvlc_event_manager_t_ptr;
|
||||
begin
|
||||
Result := libvlc_media_event_manager(FMD);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetDuration(): libvlc_time_t;
|
||||
begin
|
||||
Result := libvlc_media_get_duration(FMD);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.Parse();
|
||||
begin
|
||||
libvlc_media_parse(FMD);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.ParseAsync();
|
||||
begin
|
||||
libvlc_media_parse_async(FMD);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.IsParsed(): Boolean;
|
||||
begin
|
||||
Result := (libvlc_media_is_parsed(FMD) <> 0);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMedia.SetUserData(data: Pointer);
|
||||
begin
|
||||
libvlc_media_set_user_data(FMD, data);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetUserData(): Pointer;
|
||||
begin
|
||||
Result := libvlc_media_get_user_data(FMD);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMedia.GetTracksInfo(var tracks : libvlc_media_track_info_t_ptr): Integer;
|
||||
begin
|
||||
Result := libvlc_media_get_tracks_info(FMD, tracks);
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
constructor TPasLibVlcMediaListC.Create(aVLC: TPasLibVlc);
|
||||
begin
|
||||
inherited Create;
|
||||
FVLC := aVLC;
|
||||
FML := libvlc_media_list_new(FVLC.Handle);
|
||||
end;
|
||||
|
||||
constructor TPasLibVlcMediaListC.Create(aVLC: TPasLibVlc; aML: libvlc_media_list_t_ptr);
|
||||
begin
|
||||
inherited Create;
|
||||
FVLC := aVLC;
|
||||
FML := aML;
|
||||
end;
|
||||
|
||||
destructor TPasLibVlcMediaListC.Destroy;
|
||||
begin
|
||||
if (FML <> NIL) then
|
||||
begin
|
||||
libvlc_media_list_release(FML);
|
||||
end;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.SetMedia(media: TPasLibVlcMedia);
|
||||
begin
|
||||
libvlc_media_list_set_media(FML, media.MD);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMediaListC.GetMedia(): TPasLibVlcMedia;
|
||||
begin
|
||||
Result := TPasLibVlcMedia.Create(FVLC, libvlc_media_list_media(FML));
|
||||
end;
|
||||
|
||||
function TPasLibVlcMediaListC.GetMedia(index: Integer): TPasLibVlcMedia;
|
||||
begin
|
||||
Result := TPasLibVlcMedia.Create(
|
||||
FVLC,
|
||||
libvlc_media_list_item_at_index(FML, index)
|
||||
);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMediaListC.GetIndex(media: TPasLibVlcMedia): Integer;
|
||||
begin
|
||||
Result := libvlc_media_list_index_of_item(
|
||||
FML,
|
||||
media.MD
|
||||
);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMediaListC.IsReadOnly(): Boolean;
|
||||
begin
|
||||
Result := (libvlc_media_list_is_readonly(FML) = 0);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.Add(mrl: WideString);
|
||||
var
|
||||
media: TPasLibVlcMedia;
|
||||
begin
|
||||
media := TPasLibVlcMedia.Create(FVLC, mrl);
|
||||
|
||||
if Assigned(SELF.FMP) then
|
||||
begin
|
||||
media.SetDeinterlaceFilter(SELF.FMP.FDeinterlaceFilter);
|
||||
media.SetDeinterlaceFilterMode(SELF.FMP.FDeinterlaceMode);
|
||||
end;
|
||||
|
||||
Add(media);
|
||||
|
||||
media.Free;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.Add(media: TPasLibVlcMedia);
|
||||
begin
|
||||
libvlc_media_list_lock(FML);
|
||||
libvlc_media_list_add_media(FML, media.MD);
|
||||
libvlc_media_list_unlock(FML);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.Insert(media: TPasLibVlcMedia; index: Integer);
|
||||
begin
|
||||
libvlc_media_list_lock(FML);
|
||||
libvlc_media_list_insert_media(FML, media.MD, index);
|
||||
libvlc_media_list_unlock(FML);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.Delete(index: Integer);
|
||||
begin
|
||||
libvlc_media_list_lock(FML);
|
||||
libvlc_media_list_remove_index(FML, index);
|
||||
libvlc_media_list_unlock(FML);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.Clear();
|
||||
begin
|
||||
libvlc_media_list_lock(FML);
|
||||
while (Count() > 0) do
|
||||
begin
|
||||
libvlc_media_list_remove_index(FML, 0);
|
||||
end;
|
||||
libvlc_media_list_unlock(FML);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMediaListC.Count(): Integer;
|
||||
begin
|
||||
libvlc_media_list_lock(FML);
|
||||
Result := libvlc_media_list_count(FML);
|
||||
libvlc_media_list_unlock(FML);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.Lock();
|
||||
begin
|
||||
libvlc_media_list_lock(FML);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcMediaListC.UnLock();
|
||||
begin
|
||||
libvlc_media_list_unlock(FML);
|
||||
end;
|
||||
|
||||
function TPasLibVlcMediaListC.GetEventManager(): libvlc_event_manager_t_ptr;
|
||||
begin
|
||||
Result := libvlc_media_list_event_manager(FML);
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
constructor TPasLibVlcEqualizer.Create(AVLC: TPasLibVlc; aPreset : unsigned_t = $FFFF);
|
||||
begin
|
||||
inherited Create;
|
||||
FVLC := AVLC;
|
||||
FEqualizer := NIL;
|
||||
FPreset := aPreset;
|
||||
end;
|
||||
|
||||
destructor TPasLibVlcEqualizer.Destroy;
|
||||
begin
|
||||
if (FEqualizer <> NIL) then
|
||||
begin
|
||||
libvlc_audio_equalizer_release(FEqualizer);
|
||||
FEqualizer := NIL;
|
||||
end;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetPreAmp() : Single;
|
||||
begin
|
||||
Result := 0;
|
||||
if (SELF.GetHandle() = NIL) then exit;
|
||||
Result := libvlc_audio_equalizer_get_preamp(FEqualizer);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcEqualizer.SetPreAmp(value : Single);
|
||||
begin
|
||||
if (SELF.GetHandle() = NIL) then exit;
|
||||
libvlc_audio_equalizer_set_preamp(FEqualizer, value);
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetAmp(index: unsigned_t) : Single;
|
||||
begin
|
||||
Result := 0;
|
||||
if (SELF.GetHandle() = NIL) then exit;
|
||||
Result := libvlc_audio_equalizer_get_amp_at_index(FEqualizer, index);
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcEqualizer.SetAmp(index : unsigned_t; value : Single);
|
||||
begin
|
||||
if (SELF.GetHandle() = NIL) then exit;
|
||||
libvlc_audio_equalizer_set_amp_at_index(FEqualizer, value, index);
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetBandCount() : unsigned_t;
|
||||
begin
|
||||
Result := 0;
|
||||
if (FVLC.GetHandle() = NIL) then exit;
|
||||
Result := libvlc_audio_equalizer_get_band_count();
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetBandFrequency(index : unsigned_t) : Single;
|
||||
begin
|
||||
Result := 0;
|
||||
if (FVLC.GetHandle() = NIL) then exit;
|
||||
Result := libvlc_audio_equalizer_get_band_frequency(index);
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetPresetCount() : unsigned_t;
|
||||
begin
|
||||
Result := 0;
|
||||
if (FVLC.GetHandle() = NIL) then exit;
|
||||
Result := libvlc_audio_equalizer_get_preset_count();
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetPresetName(index : unsigned_t) : WideString;
|
||||
var
|
||||
preset : PAnsiChar;
|
||||
begin
|
||||
Result := '';
|
||||
if (FVLC.GetHandle() = NIL) then exit;
|
||||
preset := libvlc_audio_equalizer_get_preset_name(index);
|
||||
Result := {$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(preset);
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetPresetName() : WideString;
|
||||
begin
|
||||
Result := GetPresetName(FPreset);
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetPreset() : unsigned_t;
|
||||
begin
|
||||
Result := FPreset;
|
||||
end;
|
||||
|
||||
procedure TPasLibVlcEqualizer.SetPreset(APreset : unsigned_t = $FFFF);
|
||||
begin
|
||||
FPreset := aPreset;
|
||||
if (FEqualizer <> NIL) then
|
||||
begin
|
||||
libvlc_audio_equalizer_release(FEqualizer);
|
||||
FEqualizer := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPasLibVlcEqualizer.GetHandle() : libvlc_equalizer_t_ptr;
|
||||
begin
|
||||
Result := NIL;
|
||||
if (FVLC.GetHandle() = NIL) then exit;
|
||||
|
||||
if (FEqualizer = NIL) then
|
||||
begin
|
||||
if (FPreset<> $FFFF) then
|
||||
begin
|
||||
FEqualizer := libvlc_audio_equalizer_new_from_preset(FPreset);
|
||||
end;
|
||||
if (FEqualizer = NIL) then
|
||||
begin
|
||||
FEqualizer := libvlc_audio_equalizer_new();
|
||||
end;
|
||||
end;
|
||||
Result := FEqualizer;
|
||||
end;
|
||||
|
||||
end.
|
11356
PasLibVlc/source/PasLibVlcUnit.pas
Normal file
11356
PasLibVlc/source/PasLibVlcUnit.pas
Normal file
File diff suppressed because it is too large
Load Diff
329
PasLibVlc/source/PasLibVlcUnit.txt
Normal file
329
PasLibVlc/source/PasLibVlcUnit.txt
Normal file
@@ -0,0 +1,329 @@
|
||||
2019.01.08 Fix THandle type for some functions,
|
||||
|
||||
Lazarus has several definitions of THandle type (LCLQT5 Linux 64bit):
|
||||
|
||||
System.THandle = LongInt;
|
||||
LCLType.THandle = type PtrUInt;
|
||||
dynlibs.THandle = PtrInt;
|
||||
|
||||
This is no problem when run 32-bit app,
|
||||
but generate exceptions when run 64-bit app.
|
||||
|
||||
2018.09.18 Fix small bugs in FMX component
|
||||
|
||||
Change load shared libraries
|
||||
|
||||
2018.07.12 Fix untyped Dispose bug
|
||||
|
||||
affected procedures:
|
||||
|
||||
procedure libvlc_media_close_cb_stm(mctx : Pointer); cdecl;
|
||||
|
||||
2018.07.01 Add support for media callbacks
|
||||
|
||||
inspired by Mark Adamson <markadamson83@gmail.com>
|
||||
|
||||
2018.06.19 Update for compatibility with Fedora
|
||||
|
||||
inspired by Jim Lee <jlee54@gmail.com>
|
||||
|
||||
new search path /usr/lib64 for Fedora
|
||||
disable require function libvlc_media_player_set_evas_object
|
||||
because is not availiable in VLC release for Fedora
|
||||
|
||||
2018.06.11 Correct function read_dec_number
|
||||
|
||||
reported by Wortmann S<>ndor <wortmann@visualsolutions.hu>
|
||||
|
||||
2018-04-23 Correct video callbacks declarations
|
||||
|
||||
2018-03-11 Update for compatibility with libvlc 3.0.0
|
||||
|
||||
New events:
|
||||
|
||||
libvlc_MediaPlayerESAdded,
|
||||
libvlc_MediaPlayerESDeleted,
|
||||
libvlc_MediaPlayerESSelected,
|
||||
libvlc_MediaPlayerAudioDevice,
|
||||
libvlc_MediaPlayerChapterChanged,
|
||||
libvlc_RendererDiscovererItemAdded,
|
||||
libvlc_RendererDiscovererItemDeleted,
|
||||
|
||||
New functions:
|
||||
|
||||
libvlc_dialog_set_callbacks
|
||||
libvlc_dialog_set_context
|
||||
libvlc_dialog_get_context
|
||||
libvlc_dialog_post_login
|
||||
libvlc_dialog_post_action
|
||||
libvlc_dialog_dismiss
|
||||
|
||||
libvlc_renderer_item_hold
|
||||
libvlc_renderer_item_release
|
||||
libvlc_renderer_item_name
|
||||
libvlc_renderer_item_type
|
||||
libvlc_renderer_item_icon_uri
|
||||
libvlc_renderer_item_flags
|
||||
|
||||
libvlc_renderer_discoverer_new
|
||||
libvlc_renderer_discoverer_release
|
||||
libvlc_renderer_discoverer_start
|
||||
libvlc_renderer_discoverer_stop
|
||||
libvlc_renderer_discoverer_event_manager
|
||||
libvlc_renderer_discoverer_list_get
|
||||
libvlc_renderer_discoverer_list_release
|
||||
|
||||
libvlc_media_new_callbacks(p_instance, open_cb, read_cb, seek_cb, close_cb, opaque );
|
||||
|
||||
libvlc_media_parse_with_options
|
||||
libvlc_media_parse_stop
|
||||
libvlc_media_get_parsed_status
|
||||
|
||||
libvlc_media_get_codec_description
|
||||
|
||||
libvlc_media_get_type
|
||||
libvlc_media_slaves_add
|
||||
libvlc_media_slaves_clear
|
||||
libvlc_media_slaves_get
|
||||
libvlc_media_slaves_release
|
||||
|
||||
libvlc_media_discoverer_new
|
||||
libvlc_media_discoverer_start
|
||||
libvlc_media_discoverer_stop
|
||||
libvlc_media_discoverer_list_get
|
||||
libvlc_media_discoverer_list_release
|
||||
|
||||
libvlc_media_list_player_get_media_player
|
||||
libvlc_media_list_player_set_pause
|
||||
|
||||
libvlc_media_player_set_renderer
|
||||
libvlc_media_player_set_android_context
|
||||
libvlc_media_player_set_evas_object
|
||||
libvlc_media_player_add_slave
|
||||
|
||||
libvlc_video_new_viewpoint
|
||||
libvlc_video_update_viewpoint
|
||||
|
||||
libvlc_media_player_get_full_title_descriptions
|
||||
libvlc_title_descriptions_release
|
||||
|
||||
libvlc_media_player_get_full_chapter_descriptions
|
||||
libvlc_chapter_descriptions_release
|
||||
|
||||
libvlc_audio_output_device_get
|
||||
|
||||
libvlc_media_player_get_role
|
||||
libvlc_media_player_set_role
|
||||
|
||||
2018-01-08 Better support for FreeBSD11 + FPC:
|
||||
|
||||
correct THandle => TLibHandle
|
||||
|
||||
2017.12.05 Correct struct declarations
|
||||
|
||||
libvlc_audio_track_t_ptr
|
||||
libvlc_video_track_t_ptr
|
||||
libvlc_subtitle_track_t_ptr
|
||||
libvlc_media_track_union_t
|
||||
libvlc_media_track_list_t_ptr
|
||||
|
||||
2017.11.30 Update library search path for Ubuntu 17
|
||||
|
||||
2016.11.28 Update Equalizer function declarations for compile with BC6.
|
||||
|
||||
reported by "Woldemar Unknown" <djvk@mail.ru>
|
||||
|
||||
2016.10.18 Updated for compile under Lazarus 1.6.0 + FPC 3.0.0.
|
||||
|
||||
2016.10.08 Cleanup and prepare for use with FMX component
|
||||
|
||||
2016.10.04 Add demo with libvlc_log_cb usage.
|
||||
|
||||
2016.09.28 Correct declarations for libvlc_log_cb
|
||||
|
||||
reported by: Technosite <kbt901@gmail.com>
|
||||
|
||||
2016.08.19 Correct struct declarations for better work with 64 bit
|
||||
|
||||
reported by: Chris <dhwz@gmx.net>
|
||||
|
||||
2016.05.15 Correct function definitions:
|
||||
|
||||
reported by: Reiner Sombrowsky <reiner@somby.de>
|
||||
|
||||
Updated functions:
|
||||
|
||||
libvlc_video_unlock_cb = procedure(...); cdecl;
|
||||
libvlc_video_display_cb = procedure(...); cdecl;
|
||||
libvlc_video_format_cb = function(...): LongWord; cdecl;
|
||||
|
||||
2016.02.12 Update for better compatibility with libvlc 2.2.2
|
||||
|
||||
New events:
|
||||
|
||||
libvlc_MediaPlayerCorked
|
||||
libvlc_MediaPlayerUncorked,
|
||||
libvlc_MediaPlayerMuted,
|
||||
libvlc_MediaPlayerUnmuted,
|
||||
libvlc_MediaPlayerAudioVolume
|
||||
|
||||
2015.02.28 Update for better compatibility with libvlc 2.2.0
|
||||
|
||||
LibVlc.dll exposes new API:
|
||||
|
||||
libvlc_media_player_program_scrambled
|
||||
libvlc_audio_output_device_enum
|
||||
|
||||
libvlc_audio_equalizer_get_preset_count
|
||||
libvlc_audio_equalizer_get_preset_name
|
||||
libvlc_audio_equalizer_get_band_count
|
||||
libvlc_audio_equalizer_get_band_frequency
|
||||
libvlc_audio_equalizer_new
|
||||
libvlc_audio_equalizer_new_from_preset
|
||||
libvlc_audio_equalizer_release
|
||||
libvlc_audio_equalizer_set_preamp
|
||||
libvlc_audio_equalizer_get_preamp
|
||||
libvlc_audio_equalizer_set_amp_at_index
|
||||
libvlc_audio_equalizer_get_amp_at_index
|
||||
libvlc_media_player_set_equalizer
|
||||
|
||||
New events:
|
||||
|
||||
libvlc_MediaPlayerVout
|
||||
libvlc_MediaPlayerScrambledChanged
|
||||
|
||||
New meta data types:
|
||||
|
||||
libvlc_meta_TrackTotal
|
||||
libvlc_meta_Director
|
||||
libvlc_meta_Season
|
||||
libvlc_meta_Episode
|
||||
libvlc_meta_ShowName
|
||||
libvlc_meta_Actors
|
||||
|
||||
2014.04.08 Add function libvlc_reset_function_pointers
|
||||
|
||||
inspired by "Marcio Wesley Borges" <marciowb@gmail.com>
|
||||
|
||||
fix get address of function libvlc_vlm_set_enabled
|
||||
|
||||
reported by "Marcio Wesley Borges" <marciowb@gmail.com>
|
||||
|
||||
2013.12.11 Add better support for Delphi XE2 and up
|
||||
|
||||
inspired by John Brookman <j.a.brookman@hotmail.co.uk>
|
||||
|
||||
2013.10.20 Add new functions from libvlc 2.1.0
|
||||
|
||||
libvlc_media_player_set_video_title_display
|
||||
libvlc_audio_output_device_list_get
|
||||
libvlc_audio_output_device_list_release
|
||||
libvlc_media_tracks_get
|
||||
libvlc_media_tracks_release
|
||||
libvlc_set_app_id
|
||||
libvlc_log_get_context
|
||||
libvlc_log_get_object
|
||||
libvlc_log_set
|
||||
libvlc_log_unset
|
||||
libvlc_log_set_file
|
||||
|
||||
Verify compatibility with libvlc 2.1.0:
|
||||
|
||||
FUNCTION libvlc_audio_set_volume NOT WORK
|
||||
EXCEPTION Invalid floating point operation.
|
||||
|
||||
https://forum.videolan.org/viewtopic.php?f=32&t=114264
|
||||
|
||||
Add local UTF8Encode and UTF8Decode for Delphi 3, 4, 5
|
||||
|
||||
Requested by: "Johan Keizer" <j.keizer36@upcmail.nl>
|
||||
|
||||
2013.08.25 Add support for FPC LCL QT4 and FPC LCL GTK2 (LINUX, WIN)
|
||||
Test on Kubuntu and Windows XP SP2 + VLC 2.0.8
|
||||
|
||||
Add unified function for display player in window
|
||||
|
||||
libvlc_media_player_set_display_window
|
||||
|
||||
FPC For Windows : LCL GTK2+, LCL QT4, WIN32
|
||||
FPC For Linux : LCL GTK2+, LCL QT4
|
||||
|
||||
Verify compatibility with libvlc 2.0.8
|
||||
|
||||
2012.10.28 Add compiler options {$A4,Z4}, {$A+,Z+} for Delphi < 6
|
||||
|
||||
2012.07.21 Add new functions from libvlc 2.0.0
|
||||
|
||||
libvlc_set_exit_handler
|
||||
libvlc_free
|
||||
libvlc_module_description_list_release
|
||||
libvlc_audio_filter_list_get
|
||||
libvlc_video_filter_list_get
|
||||
libvlc_clock
|
||||
libvlc_media_list_player_retain
|
||||
libvlc_video_set_format_callbacks
|
||||
libvlc_video_get_spu_delay
|
||||
libvlc_video_set_spu_delay
|
||||
libvlc_audio_set_callbacks
|
||||
libvlc_audio_set_volume_callback
|
||||
libvlc_audio_set_format_callbacks
|
||||
libvlc_audio_set_format
|
||||
libvlc_media_player_navigate
|
||||
|
||||
2011.08.22 Crossplatform modifications (Linux)
|
||||
|
||||
Request by: "Maloupi" <maloupi@2n-tech.com>
|
||||
|
||||
2011.08.20 Add new function:
|
||||
|
||||
libvlc_dynamic_dll_init_with_path(vlc_install_path: string);
|
||||
|
||||
2010.12.08 Add new functions from libvlc 1.1.5
|
||||
|
||||
libvlc_media_new_fd
|
||||
|
||||
2010.11.24 Fix incorrect declaration in functions (stdcall calling convention instead of cdecl)
|
||||
|
||||
lock_call_fun
|
||||
unlock_call_fun
|
||||
display_call_fun
|
||||
|
||||
Request by: Alexey lelikz@users.sourceforge.net
|
||||
|
||||
2010.09.07 Fix incorrect declaration of function (stdcall calling convention instead of cdecl)
|
||||
|
||||
libvlc_log_iterator_has_next
|
||||
|
||||
Request by: Alain Gawlik a.gawlik@gmx.com
|
||||
|
||||
2010.09.06 Fix incorrect declaration of function (stdcall calling convention instead of cdecl)
|
||||
|
||||
libvlc_media_player_set_hwnd
|
||||
|
||||
Request by: Alain Gawlik a.gawlik@gmx.com
|
||||
|
||||
2010.09.02 Add support for libvlc 1.1.4
|
||||
|
||||
2010.07.22 Add new functions from libvlc 1.1.1
|
||||
|
||||
libvlc_set_user_agent
|
||||
libvlc_media_player_set_pause
|
||||
libvlc_video_set_callbacks
|
||||
libvlc_video_set_format
|
||||
libvlc_video_get_adjust_int
|
||||
libvlc_video_set_adjust_int
|
||||
libvlc_video_get_adjust_float
|
||||
libvlc_video_set_adjust_float
|
||||
libvlc_audio_get_delay
|
||||
libvlc_audio_set_delay
|
||||
|
||||
2010.07.14 Change PChar to PAnsiChar
|
||||
|
||||
Request by: David Nottage, davidnottage@gmail.com
|
||||
|
||||
2010.07.13 Change registry read mode from default KEY_ALL_ACCESS to KEY_READ.
|
||||
|
||||
Request by: David Nottage, davidnottage@gmail.com
|
||||
|
||||
2010.07.01 Start
|
||||
|
331
PasLibVlc/source/compiler.inc
Normal file
331
PasLibVlc/source/compiler.inc
Normal file
@@ -0,0 +1,331 @@
|
||||
// http://docwiki.embarcadero.com/RADStudio/Rio/en/Compiler_Versions
|
||||
|
||||
{$DEFINE DELPHI_XX}
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$MODE DELPHI}
|
||||
{$UNDEF DELPHI_XX}
|
||||
// FPC is 100% compatible with D6
|
||||
{$DEFINE DELPHI6}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 1
|
||||
{$IFDEF VER80}
|
||||
{$DEFINE DELPHI1}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2
|
||||
{$IFDEF VER90}
|
||||
{$DEFINE DELPHI2}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 3
|
||||
{$IFDEF VER100}
|
||||
{$DEFINE DELPHI3}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 4
|
||||
{$IFDEF VER120}
|
||||
{$DEFINE DELPHI4}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 5
|
||||
{$IFDEF VER130}
|
||||
{$DEFINE DELPHI5}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 6
|
||||
{$IFDEF VER140}
|
||||
{$DEFINE DELPHI6}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 7
|
||||
{$IFDEF VER150}
|
||||
{$DEFINE DELPHI7}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 8 for .Net
|
||||
{$IFDEF VER160}
|
||||
{$DEFINE DELPHI8}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2005 (Win32/.Net)
|
||||
{$IFDEF VER170}
|
||||
{$DEFINE DELPHI9}
|
||||
{$DEFINE DELPHI2005}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2007
|
||||
// Delphi 2006 (Win32/.Net)
|
||||
{$IFDEF VER180}
|
||||
{$IFDEF VER185}
|
||||
{$DEFINE DELPHI11}
|
||||
{$DEFINE DELPHI2007}
|
||||
{$ELSE}
|
||||
{$DEFINE DELPHI10}
|
||||
{$DEFINE DELPHI2006}
|
||||
{$ENDIF}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2007 for .Net *
|
||||
{$IFDEF VER190}
|
||||
{$DEFINE DELPHI11}
|
||||
{$DEFINE DELPHI2007}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF VER190}
|
||||
|
||||
// Delphi 2009
|
||||
{$IFDEF VER200}
|
||||
{$DEFINE DELPHI12}
|
||||
{$DEFINE DELPHI2009}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF VER200}
|
||||
|
||||
// Delphi 2010
|
||||
{$IFDEF VER210}
|
||||
{$DEFINE DELPHI14}
|
||||
{$DEFINE DELPHI2010}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF VER210}
|
||||
|
||||
// Delphi XE
|
||||
{$IFDEF VER220}
|
||||
{$DEFINE DELPHI15}
|
||||
{$DEFINE DELPHI_XE}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF VER220}
|
||||
|
||||
// Delphi XE2 (Win32/Win64/OSX)
|
||||
{$IFDEF VER230}
|
||||
{$DEFINE DELPHI16}
|
||||
{$DEFINE DELPHI_XE2}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF VER220}
|
||||
|
||||
// Delphi XE3 (Win32/Win64/OSX)
|
||||
{$IFDEF VER240}
|
||||
{$DEFINE DELPHI17}
|
||||
{$DEFINE DELPHI_XE3}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE4 (Win32/Win64/OSX/iOS)
|
||||
{$IFDEF VER250}
|
||||
{$DEFINE DELPHI18}
|
||||
{$DEFINE DELPHI_XE4}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE5 (Win32/Win64/OSX/iOS/Android)
|
||||
{$IFDEF VER260}
|
||||
{$DEFINE DELPHI19}
|
||||
{$DEFINE DELPHI_XE5}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE6 (Win32/Win64/OSX/iOS/Android)
|
||||
{$IFDEF VER270}
|
||||
{$DEFINE DELPHI20}
|
||||
{$DEFINE DELPHI_XE6}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE7 (Win32/Win64/OSX/iOS/Android)
|
||||
{$IFDEF VER280}
|
||||
{$DEFINE DELPHI21}
|
||||
{$DEFINE DELPHI_XE7}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE8 (Win32/Win64/OSX/iOS32/iOS64/Android)
|
||||
{$IFDEF VER290}
|
||||
{$DEFINE DELPHI22}
|
||||
{$DEFINE DELPHI_XE8}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi Seattle (Win32/Win64/OSX/iOS32/iOS64/Android)
|
||||
{$IFDEF VER300}
|
||||
{$DEFINE DELPHI23}
|
||||
{$DEFINE DELPHI_XE10}
|
||||
{$DEFINE DELPHI_SEATTLE}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi Berlin (Win32/Win64/OSX/iOS32/iOS64/Android)
|
||||
{$IFDEF VER310}
|
||||
{$DEFINE DELPHI24}
|
||||
{$DEFINE DELPHI_XE11}
|
||||
{$DEFINE DELPHI_BERLIN}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi Tokyo (Win32/Win64/OSX/iOS32/iOS64/Android/Linux64)
|
||||
{$IFDEF VER320}
|
||||
{$DEFINE DELPHI25}
|
||||
{$DEFINE DELPHI_XE12}
|
||||
{$DEFINE DELPHI_TOKYO}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi Rio (Win32/Win64/OSX/iOS32/iOS64/Android/Linux64)
|
||||
{$IFDEF VER330}
|
||||
{$DEFINE DELPHI26}
|
||||
{$DEFINE DELPHI_XE13}
|
||||
{$DEFINE DELPHI_RIO}
|
||||
{$UNDEF DELPHI_XX}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI_XX}
|
||||
ERROR: Unknown compiler please update compiler.inc file
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI26} {$DEFINE DELPHI26_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI25} {$DEFINE DELPHI25_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI24} {$DEFINE DELPHI24_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI23} {$DEFINE DELPHI23_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI22} {$DEFINE DELPHI22_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI21} {$DEFINE DELPHI21_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI20} {$DEFINE DELPHI20_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI19} {$DEFINE DELPHI19_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI18} {$DEFINE DELPHI18_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI17} {$DEFINE DELPHI17_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI16} {$DEFINE DELPHI16_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI15} {$DEFINE DELPHI15_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI14} {$DEFINE DELPHI14_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI12} {$DEFINE DELPHI12_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI11} {$DEFINE DELPHI11_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI10} {$DEFINE DELPHI10_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI9} {$DEFINE DELPHI9_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI8} {$DEFINE DELPHI8_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI7} {$DEFINE DELPHI7_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI6} {$DEFINE DELPHI6_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI5} {$DEFINE DELPHI5_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI4} {$DEFINE DELPHI4_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI3} {$DEFINE DELPHI3_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI2} {$DEFINE DELPHI2_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI1} {$DEFINE DELPHI1_UP} {$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI26_UP} {$DEFINE DELPHI25_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI25_UP} {$DEFINE DELPHI24_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI24_UP} {$DEFINE DELPHI23_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI23_UP} {$DEFINE DELPHI22_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI22_UP} {$DEFINE DELPHI21_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI21_UP} {$DEFINE DELPHI20_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI20_UP} {$DEFINE DELPHI19_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI19_UP} {$DEFINE DELPHI18_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI18_UP} {$DEFINE DELPHI17_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI17_UP} {$DEFINE DELPHI16_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI16_UP} {$DEFINE DELPHI15_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI15_UP} {$DEFINE DELPHI14_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI14_UP} {$DEFINE DELPHI13_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI13_UP} {$DEFINE DELPHI12_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI12_UP} {$DEFINE DELPHI11_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI11_UP} {$DEFINE DELPHI10_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI10_UP} {$DEFINE DELPHI9_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI9_UP} {$DEFINE DELPHI8_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI8_UP} {$DEFINE DELPHI7_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI7_UP} {$DEFINE DELPHI6_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI6_UP} {$DEFINE DELPHI5_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI5_UP} {$DEFINE DELPHI4_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI4_UP} {$DEFINE DELPHI3_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI3_UP} {$DEFINE DELPHI2_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI2_UP} {$DEFINE DELPHI1_UP} {$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI26_UP} {$DEFINE DELPHI_XE13_UP} {$DEFINE DELPHI_RIO_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI25_UP} {$DEFINE DELPHI_XE12_UP} {$DEFINE DELPHI_TOKYO_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI24_UP} {$DEFINE DELPHI_XE11_UP} {$DEFINE DELPHI_BERLIN_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI23_UP} {$DEFINE DELPHI_XE10_UP} {$DEFINE DELPHI_SEATTLE_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI22_UP} {$DEFINE DELPHI_XE8_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI21_UP} {$DEFINE DELPHI_XE7_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI20_UP} {$DEFINE DELPHI_XE6_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI19_UP} {$DEFINE DELPHI_XE5_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI18_UP} {$DEFINE DELPHI_XE4_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI17_UP} {$DEFINE DELPHI_XE3_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI16_UP} {$DEFINE DELPHI_XE2_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI15_UP} {$DEFINE DELPHI_XE_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI14_UP} {$DEFINE DELPHI2010_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI12_UP} {$DEFINE DELPHI2009_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI11_UP} {$DEFINE DELPHI2007_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI10_UP} {$DEFINE DELPHI2006_UP} {$ENDIF}
|
||||
{$IFDEF DELPHI9_UP} {$DEFINE DELPHI2005_UP} {$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI2_UP} {$DEFINE SUPPORTS_WIDECHAR} {$ENDIF}
|
||||
{$IFDEF DELPHI3_UP} {$DEFINE SUPPORTS_WIDESTRING} {$ENDIF}
|
||||
{$IFDEF DELPHI12_UP} {$DEFINE SUPPORTS_UNICODE} {$ENDIF}
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$DEFINE HAS_ENUM_ORDINALITY}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI7_UP}
|
||||
{$DEFINE HAS_ENUM_ORDINALITY}
|
||||
{$IFNDEF FPC}
|
||||
{$DEFINE HAS_ParentBackground}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI6_UP}
|
||||
{$DEFINE HAS_A4}
|
||||
{$DEFINE HAS_Z4}
|
||||
{$DEFINE HAS_PATH_DELIM}
|
||||
{$DEFINE HAS_PPANSICHAR}
|
||||
{$DEFINE HAS_UTF8_ENCODE_DECODE}
|
||||
{$DEFINE HAS_WS_EX_TRANSPARENT}
|
||||
{$DEFINE HAS_OnContextPopup}
|
||||
{$DEFINE HAS_THANDLE}
|
||||
{$DEFINE HAS_FILE_EXISTS}
|
||||
{$DEFINE HAS_DIRECTORY_EXISTS}
|
||||
{$DEFINE HAS_SYNCOBJS}
|
||||
{$DEFINE HAS_EXCEPTION_MASK}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF MACOS}
|
||||
|
||||
{$ELSE}
|
||||
{$IFDEF UNIX}
|
||||
|
||||
{$ELSE}
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WIN32}
|
||||
{$DEFINE MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
// now FPC not have CPUX64 and CPUX32, but have CPU64 and CPU32
|
||||
{$IFDEF FPC}
|
||||
{$IFDEF CPU64}{$IFNDEF CPUX64}{$DEFINE CPUX64}{$ENDIF}{$ENDIF}
|
||||
{$IFDEF CPU32}{$IFNDEF CPUX32}{$DEFINE CPUX32}{$ENDIF}{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
// old versions of delphi not have CPUX32
|
||||
{$IFDEF WIN32}
|
||||
{$IFNDEF CPUX64}
|
||||
{$IFNDEF CPUX32}{$DEFINE CPUX32}{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF CPUX64}
|
||||
{$A8}
|
||||
{$ELSE}
|
||||
{$IFDEF HAS_A4}
|
||||
{$A4}
|
||||
{$ELSE}
|
||||
{$A+}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF HAS_Z4}{$Z4}{$ELSE}{$Z+}{$ENDIF}
|
||||
|
Reference in New Issue
Block a user