Стартовый пул

This commit is contained in:
2024-04-02 08:46:59 +03:00
parent fd57fffd3a
commit 3bb34d000b
5591 changed files with 3291734 additions and 0 deletions

View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="DemoPasLibVlcPlayer"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="1"/>
<Language Value="0415"/>
<StringTable CompanyName="Robert Jędrzejczyk" FileDescription="DemoPasLibVlcPlayer" InternalName="DemoPasLibVlcPlayer" LegalCopyright="Robert Jędrzejczyk" LegalTrademarks="Robert Jędrzejczyk" OriginalFilename="DemoPasLibVlcPlayer" ProductName="DemoPasLibVlcPlayer"/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="PasLibVlcPlayer"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="5">
<Unit0>
<Filename Value="DemoPasLibVlcPlayer.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="MainFormUnit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MainForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
<Unit2>
<Filename Value="FullScreenFormUnit.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
</Unit2>
<Unit3>
<Filename Value="SetEqualizerPresetFormUnit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SetEqualizerPresetForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit3>
<Unit4>
<Filename Value="SelectOutputDeviceFormUnit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SelectOutputDeviceForm"/>
<ResourceBaseClass Value="Form"/>
</Unit4>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="DemoPasLibVlcPlayer"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
<SrcPath Value="..\..\source"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="Delphi"/>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<RelocatableUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="0"/>
</Optimizations>
<SmallerCode Value="True"/>
</CodeGeneration>
<Linking>
<Debugging>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,22 @@
{$I ../../source/compiler.inc}
program DemoPasLibVlcPlayer;
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms,
MainFormUnit,
FullScreenFormUnit,
SetEqualizerPresetFormUnit;
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TSetEqualizerPresetForm, SetEqualizerPresetForm);
Application.Run;
end.

View File

@@ -0,0 +1,18 @@
object FullScreenForm: TFullScreenForm
Left = 0
Height = 436
Top = 0
Width = 639
Align = alClient
BorderIcons = []
BorderStyle = bsNone
Color = clBlack
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
FormStyle = fsStayOnTop
KeyPreview = True
OnKeyPress = FormKeyPress
OnShow = FormShow
LCLVersion = '1.2.6.0'
end

View File

@@ -0,0 +1,66 @@
(*
* 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 ../../source/compiler.inc}
unit FullScreenFormUnit;
interface
uses
{$IFDEF UNIX}Unix,{$ENDIF}
{$IFDEF FPC}
LCLIntf, LCLType, LMessages,
{$ELSE}
Messages,
{$ENDIF}
SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;
type
TFullScreenForm = class(TForm)
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FullScreenForm: TFullScreenForm;
implementation
{$R *.lfm}
procedure TFullScreenForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
Close;
end;
procedure TFullScreenForm.FormShow(Sender: TObject);
begin
Application.ProcessMessages;
end;
end.

View File

@@ -0,0 +1,498 @@
object MainForm: TMainForm
Left = 418
Height = 521
Top = 139
Width = 519
Caption = 'PasLibVlcPlayerDemo'
ClientHeight = 521
ClientWidth = 519
Color = clBtnFace
Constraints.MinHeight = 455
Constraints.MinWidth = 435
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
OnCreate = FormCreate
OnDestroy = FormDestroy
OnMouseDown = FormMouseDown
OnResize = FormResize
PopupMenu = PopupMenu
Position = poScreenCenter
LCLVersion = '2.0.0.4'
object MrlLab: TLabel
Left = 8
Height = 13
Top = 4
Width = 60
Caption = 'MRL to play:'
FocusControl = MrlEdit
ParentColor = False
end
object PR: TPanel
Left = 340
Height = 521
Top = 0
Width = 179
Align = alRight
BevelOuter = bvNone
ClientHeight = 521
ClientWidth = 179
TabOrder = 0
object PlayBtn: TButton
Left = 6
Height = 25
Top = 8
Width = 75
Caption = 'Play'
OnClick = PlayClick
TabOrder = 0
end
object PauseBtn: TButton
Left = 6
Height = 25
Top = 39
Width = 75
Caption = 'Pause'
OnClick = PauseClick
TabOrder = 1
end
object GetWidthBtn: TButton
Left = 6
Height = 25
Top = 97
Width = 75
Caption = 'Get width'
OnClick = GetWidthClick
TabOrder = 2
end
object GetHeightBtn: TButton
Left = 6
Height = 25
Top = 126
Width = 75
Caption = 'Get height'
OnClick = GetHeightBtnClick
TabOrder = 3
end
object GetStateBtn: TButton
Left = 6
Height = 25
Top = 155
Width = 75
Caption = 'Get state'
OnClick = GetStateClick
TabOrder = 4
end
object ResumeBtn: TButton
Left = 6
Height = 25
Top = 68
Width = 75
Caption = 'Resume'
OnClick = ResumeClick
TabOrder = 5
end
object GetPosLenBtn: TButton
Left = 6
Height = 25
Top = 182
Width = 75
Caption = 'Get pos, len'
OnClick = GetPosLenClick
TabOrder = 6
end
object Scale10Btn: TButton
Left = 6
Height = 25
Top = 213
Width = 75
Caption = 'Scale -10%'
OnClick = Scale10Click
TabOrder = 7
end
object ScaleFitBtn: TButton
Left = 6
Height = 25
Top = 242
Width = 75
Caption = 'ScaleFit'
OnClick = ScaleFitClick
TabOrder = 8
end
object SnapShotBtn: TButton
Left = 6
Height = 25
Top = 271
Width = 75
Caption = 'SnapShot'
OnClick = SnapShotClick
TabOrder = 9
end
object NextFrameBtn: TButton
Left = 6
Height = 25
Top = 302
Width = 75
Caption = 'Next Frame'
OnClick = NextFrameClick
TabOrder = 10
end
object GetASpectRatioBtn: TButton
Left = 94
Height = 25
Top = 8
Width = 75
Caption = 'Get Aspect'
OnClick = GetASpectRatioClick
TabOrder = 11
end
object SetAsp11Btn: TButton
Left = 94
Height = 25
Top = 39
Width = 75
Caption = 'Set asp 1:1'
OnClick = SetAsp11Click
TabOrder = 12
end
object SetAsp43Btn: TButton
Left = 94
Height = 25
Top = 68
Width = 75
Caption = 'Set asp 4:3'
OnClick = SetAsp43Click
TabOrder = 13
end
object GetVolume: TButton
Left = 94
Height = 25
Top = 97
Width = 75
Caption = 'Get Volume'
OnClick = GetVolumeClick
TabOrder = 14
end
object SetVolumeUp10: TButton
Left = 94
Height = 25
Top = 126
Width = 75
Caption = 'Volume +10'
OnClick = SetVolumeUp10Click
TabOrder = 15
end
object SetVolumeDo10: TButton
Left = 94
Height = 25
Top = 155
Width = 75
Caption = 'Volume -10'
OnClick = SetVolumeDo10Click
TabOrder = 16
end
object GetPlayRateBtn: TButton
Left = 94
Height = 25
Top = 184
Width = 75
Caption = 'Get Play Rate'
OnClick = GetPlayRateBtnClick
TabOrder = 17
end
object SetPlayRate2xBtn: TButton
Left = 94
Height = 25
Top = 213
Width = 75
Caption = 'Play Rate 2x'
OnClick = SetPlayRate2xBtnClick
TabOrder = 18
end
object SetPlayRateHalfBtn: TButton
Left = 94
Height = 25
Top = 242
Width = 75
Caption = 'Play Rate 1/2'
OnClick = SetPlayRateHalfBtnClick
TabOrder = 19
end
object FullScreenYesBtn: TButton
Left = 94
Height = 25
Top = 271
Width = 75
Caption = 'FullScreen'
OnClick = FullScreenYesBtnClick
TabOrder = 20
end
object DeInterlaceBtn: TButton
Left = 6
Height = 25
Top = 333
Width = 75
Caption = 'DeInterlace'
OnClick = DeInterlaceBtnClick
TabOrder = 21
end
object GetAudioChannel: TButton
Left = 94
Height = 25
Top = 302
Width = 75
Caption = 'Get Audio Ch'
OnClick = GetAudioChannelClick
TabOrder = 22
end
object SetAudioChannelLeft: TButton
Left = 94
Height = 25
Top = 333
Width = 75
Caption = 'Set Audio C L'
OnClick = SetAudioChannelLeftClick
TabOrder = 23
end
object SetAudioChannelRight: TButton
Left = 94
Height = 25
Top = 364
Width = 75
Caption = 'Set Audio C R'
OnClick = SetAudioChannelRightClick
TabOrder = 24
end
object SetAudioChannelStereo: TButton
Left = 94
Height = 25
Top = 395
Width = 75
Caption = 'Set Audio C S'
OnClick = SetAudioChannelStereoClick
TabOrder = 26
end
object GetAudioOutListBtn: TButton
Left = 6
Height = 25
Top = 364
Width = 75
Caption = 'AudioOutList'
OnClick = GetAudioOutListBtnClick
TabOrder = 25
end
object GetAudioOutDevEnumBtn: TButton
Left = 6
Height = 25
Top = 395
Width = 75
Caption = 'AOutDevEnum'
OnClick = GetAudioOutDevEnumBtnClick
TabOrder = 27
end
object GetEqPreListBtn: TButton
Left = 94
Height = 25
Top = 456
Width = 75
Caption = 'EqalizerPreList'
OnClick = GetEqPreListBtnClick
TabOrder = 28
end
object SetEqualizerBtn: TButton
Left = 94
Height = 25
Top = 426
Width = 75
Caption = 'Set Equalizer'
OnClick = SetEqualizerBtnClick
TabOrder = 29
end
object ChAudioOut: TButton
Left = 6
Height = 25
Top = 426
Width = 75
Caption = 'Ch Audio Out'
OnClick = ChAudioOutClick
TabOrder = 30
end
object GetAudioTrackListBtn: TButton
Left = 6
Height = 25
Top = 456
Width = 75
Caption = 'AudioTrackList'
OnClick = GetAudioTrackListBtnClick
TabOrder = 31
end
object GetAudioFilterListBtn: TButton
Left = 6
Height = 25
Top = 488
Width = 75
Caption = 'AudioFilterList'
OnClick = GetAudioFilterListBtnClick
TabOrder = 32
end
object GetVideoFilterListBtn: TButton
Left = 94
Height = 25
Top = 488
Width = 75
Caption = 'VideoFilterList'
OnClick = GetVideoFilterListBtnClick
TabOrder = 33
end
end
object LB: TListBox
Left = 9
Height = 176
Top = 309
Width = 320
ItemHeight = 0
PopupMenu = LbPopupMenu
TabOrder = 1
end
object MrlEdit: TEdit
Left = 8
Height = 21
Top = 20
Width = 320
TabOrder = 2
end
object PasLibVlcPlayer1: TPasLibVlcPlayer
Left = 8
Height = 202
Top = 45
BevelOuter = bvNone
ParentColor = False
TabOrder = 3
OnClick = PasLibVlcPlayer1Click
OnDblClick = PasLibVlcPlayer1DblClick
OnMouseDown = PasLibVlcPlayer1MouseDown
OnMouseEnter = PasLibVlcPlayer1MouseEnter
OnMouseLeave = PasLibVlcPlayer1MouseLeave
OnMouseMove = PasLibVlcPlayer1MouseMove
OnMouseUp = PasLibVlcPlayer1MouseUp
SnapShotFmt = 'png'
OnMediaPlayerMediaChanged = PasLibVlcPlayer1MediaPlayerMediaChanged
OnMediaPlayerNothingSpecial = PasLibVlcPlayer1MediaPlayerNothingSpecial
OnMediaPlayerOpening = PasLibVlcPlayer1MediaPlayerOpening
OnMediaPlayerBuffering = PasLibVlcPlayer1MediaPlayerBuffering
OnMediaPlayerPlaying = PasLibVlcPlayer1MediaPlayerPlaying
OnMediaPlayerPaused = PasLibVlcPlayer1MediaPlayerPaused
OnMediaPlayerStopped = PasLibVlcPlayer1MediaPlayerStopped
OnMediaPlayerForward = PasLibVlcPlayer1MediaPlayerForward
OnMediaPlayerBackward = PasLibVlcPlayer1MediaPlayerBackward
OnMediaPlayerEndReached = PasLibVlcPlayer1MediaPlayerEndReached
OnMediaPlayerEncounteredError = PasLibVlcPlayer1MediaPlayerEncounteredError
OnMediaPlayerTimeChanged = PasLibVlcPlayer1MediaPlayerTimeChanged
OnMediaPlayerPositionChanged = PasLibVlcPlayer1MediaPlayerPositionChanged
OnMediaPlayerSeekableChanged = PasLibVlcPlayer1MediaPlayerSeekableChanged
OnMediaPlayerPausableChanged = PasLibVlcPlayer1MediaPlayerPausableChanged
OnMediaPlayerTitleChanged = PasLibVlcPlayer1MediaPlayerTitleChanged
OnMediaPlayerSnapshotTaken = PasLibVlcPlayer1MediaPlayerSnapshotTaken
OnMediaPlayerLengthChanged = PasLibVlcPlayer1MediaPlayerLengthChanged
OnMediaPlayerVideoOutChanged = PasLibVlcPlayer1MediaPlayerVideoOutChanged
OnMediaPlayerScrambledChanged = PasLibVlcPlayer1MediaPlayerScrambledChanged
OnMediaPlayerCorked = PasLibVlcPlayer1MediaPlayerCorked
OnMediaPlayerUnCorked = PasLibVlcPlayer1MediaPlayerUnCorked
OnMediaPlayerMuted = PasLibVlcPlayer1MediaPlayerMuted
OnMediaPlayerUnMuted = PasLibVlcPlayer1MediaPlayerUnMuted
OnMediaPlayerAudioVolumeChanged = PasLibVlcPlayer1MediaPlayerAudioVolumeChanged
OnMediaPlayerEsAdded = PasLibVlcPlayer1MediaPlayerEsAdded
OnMediaPlayerEsDeleted = PasLibVlcPlayer1MediaPlayerEsDeleted
OnMediaPlayerEsSelected = PasLibVlcPlayer1MediaPlayerEsSelected
OnMediaPlayerAudioDevice = PasLibVlcPlayer1MediaPlayerAudioDevice
OnMediaPlayerChapterChanged = PasLibVlcPlayer1MediaPlayerChapterChanged
OnRendererDiscoveredItemAdded = PasLibVlcPlayer1RendererDiscoveredItemAdded
OnRendererDiscoveredItemDeleted = PasLibVlcPlayer1RendererDiscoveredItemDeleted
end
object ProgPanel: TPanel
Left = 8
Height = 46
Top = 252
Width = 320
ClientHeight = 46
ClientWidth = 320
TabOrder = 4
object ProgLabel1: TLabel
Left = 1
Height = 20
Top = 25
Width = 44
Align = alLeft
Caption = '00:00:00'
ParentColor = False
end
object ProgLabel2: TLabel
Left = 275
Height = 20
Top = 25
Width = 44
Align = alRight
Caption = '00:00:00'
ParentColor = False
end
object ProgBar: TTrackBar
Left = 1
Height = 24
Top = 1
Width = 318
OnChange = ProgBarChange
Position = 0
TickStyle = tsNone
Align = alTop
TabOrder = 0
end
end
object BtnSelect: TButton
Left = 280
Height = 19
Top = 22
Width = 46
Caption = 'Select'
OnClick = BtnSelectClick
TabOrder = 5
end
object PopupMenu: TPopupMenu
left = 16
top = 56
object a1: TMenuItem
Caption = 'a'
end
object b1: TMenuItem
Caption = 'b'
end
object c1: TMenuItem
Caption = 'c'
end
object d1: TMenuItem
Caption = 'd'
end
end
object OpenDialog: TOpenDialog
Options = [ofPathMustExist, ofFileMustExist, ofEnableSizing]
left = 264
top = 56
end
object SaveDialog: TSaveDialog
DefaultExt = '.*.txt'
FileName = 'PasLibVlcDemo.txt'
left = 20
top = 316
end
object LbPopupMenu: TPopupMenu
left = 56
top = 316
object LbPmClear: TMenuItem
Caption = 'Clear'
OnClick = LbPmClearClick
end
object LnPmSaveAs: TMenuItem
Caption = 'Save as'
OnClick = LnPmSaveAsClick
end
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
object SelectOutputDeviceForm: TSelectOutputDeviceForm
Left = 266
Height = 240
Top = 112
Width = 370
BorderStyle = bsDialog
Caption = 'Select output device'
ClientHeight = 240
ClientWidth = 370
Position = poMainFormCenter
LCLVersion = '1.4.4.0'
object OutputDevicesLB: TListBox
Left = 8
Height = 200
Top = 32
Width = 264
ItemHeight = 0
OnDblClick = OutputDevicesLBDblClick
OnDrawItem = OutputDevicesLBDrawItem
Style = lbOwnerDrawFixed
TabOrder = 0
end
object OkBtn: TButton
Left = 280
Height = 25
Top = 32
Width = 75
Caption = 'OK'
Default = True
OnClick = OkBtnClick
TabOrder = 1
end
object OutputDevicesLabel: TLabel
Left = 8
Height = 13
Top = 12
Width = 96
Caption = 'OutputDevicesLabel'
FocusControl = OutputDevicesLB
ParentColor = False
end
object CancelBtn: TButton
Left = 280
Height = 25
Top = 64
Width = 75
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
end

View File

@@ -0,0 +1,95 @@
(*
* 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 ../../source/compiler.inc}
unit SelectOutputDeviceFormUnit;
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, types;
type
{ TSelectOutputDeviceForm }
TSelectOutputDeviceForm = class(TForm)
CancelBtn: TButton;
OutputDevicesLabel: TLabel;
OkBtn: TButton;
OutputDevicesLB: TListBox;
procedure OkBtnClick(Sender: TObject);
procedure OutputDevicesLBDblClick(Sender: TObject);
procedure OutputDevicesLBDrawItem(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState);
private
{ private declarations }
public
{ public declarations }
end;
var
SelectOutputDeviceForm: TSelectOutputDeviceForm;
implementation
{$R *.lfm}
{ TSelectOutputDeviceForm }
procedure TSelectOutputDeviceForm.OkBtnClick(Sender: TObject);
begin
if (OutputDevicesLB.ItemIndex < 0) then
begin
ModalResult := mrCancel;
end
else
begin
ModalResult := mrOK;
end;
end;
procedure TSelectOutputDeviceForm.OutputDevicesLBDblClick(Sender: TObject);
begin
if (OutputDevicesLB.ItemIndex > -1) then
begin
ModalResult := mrOK;
end;
end;
procedure TSelectOutputDeviceForm.OutputDevicesLBDrawItem(Control: TWinControl;
Index: Integer; ARect: TRect; State: TOwnerDrawState);
var
str : string;
begin
with (Control as TListBox).Canvas do
begin
FillRect(ARect);
str := (Control as TListBox).Items[Index];
TextOut(ARect.Left + 2, ARect.Top + 1, Copy(str, Pos('|', str) + 1, MaxInt));
end;
end;
end.

View File

@@ -0,0 +1,70 @@
object SetEqualizerPresetForm: TSetEqualizerPresetForm
Left = 243
Height = 293
Top = 109
Width = 468
Caption = 'Set Equalizer Preset'
ClientHeight = 293
ClientWidth = 468
Color = clBtnFace
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Position = poMainFormCenter
LCLVersion = '1.2.6.0'
object PresetListLabel: TLabel
Left = 16
Height = 13
Top = 13
Width = 40
Caption = 'Presets:'
FocusControl = PresetListLB
ParentColor = False
end
object BandInfoLabel: TLabel
Left = 140
Height = 13
Top = 13
Width = 83
Caption = 'Preset band info:'
FocusControl = BandInfoLB
ParentColor = False
end
object PresetListLB: TListBox
Left = 16
Height = 245
Top = 32
Width = 105
ItemHeight = 0
OnClick = PresetListLBClick
TabOrder = 0
end
object OkBtn: TButton
Left = 380
Height = 25
Top = 13
Width = 75
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 1
end
object CancelBtn: TButton
Left = 380
Height = 25
Top = 44
Width = 75
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
object BandInfoLB: TListBox
Left = 140
Height = 245
Top = 32
Width = 221
ItemHeight = 0
TabOrder = 3
end
end

View File

@@ -0,0 +1,92 @@
(*
* 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 ../../source/compiler.inc}
unit SetEqualizerPresetFormUnit;
interface
uses
{$IFDEF UNIX}Unix,{$ENDIF}
{$IFDEF FPC}
LCLIntf, LCLType, LMessages,
{$ELSE}
Messages,
{$ENDIF}
SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Menus,
PasLibVlcClassUnit;
type
TSetEqualizerPresetForm = class(TForm)
PresetListLB: TListBox;
OkBtn: TButton;
CancelBtn: TButton;
PresetListLabel: TLabel;
BandInfoLB: TListBox;
BandInfoLabel: TLabel;
procedure PresetListLBClick(Sender: TObject);
private
{ Private declarations }
public
FVLC : TPasLibVlc;
end;
var
SetEqualizerPresetForm: TSetEqualizerPresetForm;
implementation
{$R *.lfm}
procedure TSetEqualizerPresetForm.PresetListLBClick(Sender: TObject);
var
equalizer : TPasLibVlcEqualizer;
index : Integer;
begin
BandInfoLB.Clear;
if (PresetListLB.ItemIndex > -1) then
begin
equalizer := TPasLibVlcEqualizer.Create(
FVLC,
Word(PresetListLB.Items.Objects[PresetListLB.ItemIndex])
);
BandInfoLB.AddItem(
'PreAmp: ' + IntToStr(Round(equalizer.GetPreAmp())),
NIL
);
for index := 0 to equalizer.GetBandCount() - 1 do
begin
BandInfoLB.AddItem(
'Band no: ' + IntToStr(index+1) +
', freq.: ' + IntToStr(Round(equalizer.GetBandFrequency(index))) +
'Hz, amp.:' + IntToStr(Round(equalizer.GetAmp(index))),
NIL
);
end;
equalizer.Free;
end;
end;
end.