mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 05:18:12 +02:00
* Dotted filenames for package libvlc
This commit is contained in:
parent
dc88694c7f
commit
ff4c0ecd90
3
packages/libvlc/namespaced/Api.Vlc.Component.pp
Normal file
3
packages/libvlc/namespaced/Api.Vlc.Component.pp
Normal file
@ -0,0 +1,3 @@
|
||||
unit Api.Vlc.Component;
|
||||
{$DEFINE FPC_DOTTEDUNITS}
|
||||
{$i vlc.pp}
|
3
packages/libvlc/namespaced/Api.Vlc.pp
Normal file
3
packages/libvlc/namespaced/Api.Vlc.pp
Normal file
@ -0,0 +1,3 @@
|
||||
unit Api.Vlc;
|
||||
{$DEFINE FPC_DOTTEDUNITS}
|
||||
{$i libvlc.pp}
|
4
packages/libvlc/namespaces.lst
Normal file
4
packages/libvlc/namespaces.lst
Normal file
@ -0,0 +1,4 @@
|
||||
src/libvlc.pp=namespaced/Api.Vlc.pp
|
||||
{s*:src/}=namespaced/
|
||||
{i+:src/}
|
||||
src/vlc.pp=namespaced/Api.Vlc.Component.pp
|
@ -16,11 +16,18 @@
|
||||
**********************************************************************}
|
||||
|
||||
{$mode objfpc}
|
||||
{$IFNDEF FPC_DOTTEDUNITS}
|
||||
unit libvlc;
|
||||
{$ENDIF FPC_DOTTEDUNITS}
|
||||
interface
|
||||
|
||||
{$IFDEF FPC_DOTTEDUNITS}
|
||||
uses
|
||||
System.CTypes;
|
||||
{$ELSE FPC_DOTTEDUNITS}
|
||||
uses
|
||||
ctypes;
|
||||
{$ENDIF FPC_DOTTEDUNITS}
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$PACKRECORDS C}
|
||||
@ -627,12 +634,21 @@ function GetVLCLibPath: String;
|
||||
|
||||
implementation
|
||||
|
||||
{$IFDEF FPC_DOTTEDUNITS}
|
||||
uses
|
||||
System.SysUtils,
|
||||
{$IFDEF Windows}
|
||||
WinApi.Windows,
|
||||
{$ENDIF}
|
||||
System.DynLibs;
|
||||
{$ELSE FPC_DOTTEDUNITS}
|
||||
uses
|
||||
SysUtils,
|
||||
{$IFDEF WINDOWS}
|
||||
windows,
|
||||
{$ENDIF}
|
||||
dynlibs;
|
||||
{$ENDIF FPC_DOTTEDUNITS}
|
||||
|
||||
var
|
||||
hlib : tlibhandle;
|
||||
@ -929,7 +945,7 @@ Procedure Loadlibvlc(lib : AnsiString; CheckProcNames : Boolean = False);
|
||||
Function GetProcAddress(h : TLibHandle; Name : AnsiString) : Pointer;
|
||||
|
||||
begin
|
||||
Result:=dynlibs.GetProcAddress(h,Name);
|
||||
Result:={$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}DynLibs.GetProcAddress(h,Name);
|
||||
If (Result=Nil) and CheckProcNames then
|
||||
raise Exception.CreateFmt('Could not find procedure address: %s ',[Name]);
|
||||
end;
|
||||
|
@ -12,14 +12,21 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
{$IFNDEF FPC_DOTTEDUNITS}
|
||||
unit vlc;
|
||||
{$ENDIF FPC_DOTTEDUNITS}
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
{$IFDEF FPC_DOTTEDUNITS}
|
||||
uses
|
||||
System.Classes, System.SysUtils, System.CTypes, Api.Vlc, System.SyncObjs;
|
||||
{$ELSE FPC_DOTTEDUNITS}
|
||||
uses
|
||||
Classes, SysUtils, ctypes, libvlc, syncobjs;
|
||||
{$ENDIF FPC_DOTTEDUNITS}
|
||||
|
||||
Type
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user