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

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,48 @@
(*
* 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"
*
* http://prog.olsztyn.pl/paslibvlc/
*
*)
{$I ..\..\source\compiler.inc}
program DemoPasLibVlcPlayer;
uses
Forms,
MainFormUnit in 'MainFormUnit.pas' {MainForm},
FullScreenFormUnit in 'FullScreenFormUnit.pas' {FullScreenForm},
SetEqualizerPresetFormUnit in 'SetEqualizerPresetFormUnit.pas' {SetEqualizerPresetForm},
SelectOutputDeviceFormUnit in 'SelectOutputDeviceFormUnit.pas' {SelectOutputDeviceForm};
{$R *.res}
begin
ReportMemoryLeaksOnShutdown := TRUE;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.Title := 'PasLibVlcPlayerDemo' + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TSetEqualizerPresetForm, SetEqualizerPresetForm);
Application.CreateForm(TSelectOutputDeviceForm, SelectOutputDeviceForm);
Application.Run;
end.

View File

@@ -0,0 +1,507 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0cc0787e-8cd7-4c7f-8614-4fc87cef6130}</ProjectGuid>
<MainSource>DemoPasLibVlcPlayer.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlcPlayer.exe</DCC_DependencyCheckOutputName>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Application</AppType>
<FrameworkType>VCL</FrameworkType>
<ProjectVersion>18.4</ProjectVersion>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
<Cfg_1_Win64>true</Cfg_1_Win64>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
<Icon_MainIcon>DemoPasLibVlcPlayer_Icon.ico</Icon_MainIcon>
<Manifest_File>None</Manifest_File>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_UnitSearchPath>.\..\..\source;.\..\..\source.vcl;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1045</VerInfo_Locale>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlcPlayer;FileVersion=1.0.0.0;InternalName=DemoPasLibVlcPlayer;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlcPlayer;ProductName=DemoPasLibVlcPlayer;ProductVersion=1.0.0.0;Comments=robert@prog.olsztyn.pl</VerInfo_Keys>
<SanitizedProjectName>DemoPasLibVlcPlayer</SanitizedProjectName>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<Version>7.0</Version>
<DCC_DebugInformation>0</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlcPlayer;FileVersion=1.0.0.59;InternalName=DemoPasLibVlcPlayer;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlcPlayer;ProductName=DemoPasLibVlcPlayer;ProductVersion=1.0.0.0;Comments=robert@prog.olsztyn.pl;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
<VerInfo_Build>59</VerInfo_Build>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_Build>43</VerInfo_Build>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlcPlayer;FileVersion=1.0.0.43;InternalName=DemoPasLibVlcPlayer;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlcPlayer;ProductName=DemoPasLibVlcPlayer;ProductVersion=1.0.0.0;Comments=robert@prog.olsztyn.pl</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<Version>7.0</Version>
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1033</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename"/>
<VersionInfoKeys Name="ProductName"/>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
<Source>
<Source Name="MainSource">DemoPasLibVlcPlayer.dpr</Source>
</Source>
</Delphi.Personality>
<Platforms>
<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>
</Platforms>
<Deployment Version="3">
<DeployFile LocalName="Win32\Release\DemoPasLibVlcPlayer.exe" Configuration="Release" Class="ProjectOutput"/>
<DeployFile LocalName="Win64\Release\DemoPasLibVlcPlayer.exe" Configuration="Release" Class="ProjectOutput"/>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="iOSDevice">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXInfoPList"/>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXEntitlements"/>
<DeployClass Name="iPhone_Launch640">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch320">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeX86File">
<Platform Name="Android">
<RemoteDir>library\lib\x86</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSEntitlements"/>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSInfoPList"/>
<DeployClass Name="iPad_Launch1024">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="iOSDevice">
<Operation>0</Operation>
</Platform>
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640x1136">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1536">
<Platform Name="iOSDevice">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
</Deployment>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
<DCCReference Include="FullScreenFormUnit.pas">
<Form>FullScreenForm</Form>
</DCCReference>
<DCCReference Include="SetEqualizerPresetFormUnit.pas">
<Form>SetEqualizerPresetForm</Form>
</DCCReference>
<DCCReference Include="SelectOutputDeviceFormUnit.pas">
<Form>SelectOutputDeviceForm</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,23 @@
object FullScreenForm: TFullScreenForm
Left = 0
Top = 0
Align = alClient
BorderIcons = []
BorderStyle = bsNone
ClientHeight = 436
ClientWidth = 639
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
FormStyle = fsStayOnTop
KeyPreview = True
OldCreateOrder = False
Position = poDesigned
OnKeyPress = FormKeyPress
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
end

View File

@@ -0,0 +1,63 @@
(*
* 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"
*
* http://prog.olsztyn.pl/paslibvlc/
*
*)
{$I ..\..\source\compiler.inc}
unit FullScreenFormUnit;
interface
uses
Windows, Messages, 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 *.dfm}
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,647 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'PasLibVlcPlayerDemo'
ClientHeight = 801
ClientWidth = 838
Color = clBtnFace
Constraints.MinHeight = 735
Constraints.MinWidth = 703
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -17
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PopupMenu = PopupMenu
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
OnMouseDown = FormMouseDown
OnResize = FormResize
PixelsPerInch = 144
TextHeight = 21
object MrlLab: TLabel
Left = 13
Top = 6
Width = 93
Height = 21
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'MRL to play:'
FocusControl = MrlEdit
end
object PR: TPanel
Left = 549
Top = 0
Width = 289
Height = 801
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Align = alRight
BevelOuter = bvNone
TabOrder = 0
object PlayBtn: TButton
Left = 13
Top = 16
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Play'
TabOrder = 0
OnClick = PlayClick
end
object PauseBtn: TButton
Left = 13
Top = 66
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Pause'
TabOrder = 1
OnClick = PauseClick
end
object GetWidthBtn: TButton
Left = 13
Top = 160
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get width'
TabOrder = 2
OnClick = GetWidthClick
end
object GetHeightBtn: TButton
Left = 13
Top = 207
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get height'
TabOrder = 3
OnClick = GetHeightBtnClick
end
object GetStateBtn: TButton
Left = 13
Top = 254
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get state'
TabOrder = 4
OnClick = GetStateClick
end
object ResumeBtn: TButton
Left = 13
Top = 113
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Resume'
TabOrder = 5
OnClick = ResumeClick
end
object GetPosLenBtn: TButton
Left = 13
Top = 297
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get pos, len'
TabOrder = 6
OnClick = GetPosLenClick
end
object Scale10Btn: TButton
Left = 13
Top = 347
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Scale -10%'
TabOrder = 7
OnClick = Scale10Click
end
object ScaleFitBtn: TButton
Left = 13
Top = 394
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'ScaleFit'
TabOrder = 8
OnClick = ScaleFitClick
end
object SnapShotBtn: TButton
Left = 13
Top = 441
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'SnapShot'
TabOrder = 9
OnClick = SnapShotClick
end
object NextFrameBtn: TButton
Left = 13
Top = 491
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Next Frame'
TabOrder = 10
OnClick = NextFrameClick
end
object GetASpectRatioBtn: TButton
Left = 155
Top = 16
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get Aspect'
TabOrder = 11
OnClick = GetASpectRatioClick
end
object SetAsp11Btn: TButton
Left = 155
Top = 66
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Set asp 1:1'
TabOrder = 12
OnClick = SetAsp11Click
end
object SetAsp43Btn: TButton
Left = 155
Top = 113
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Set asp 4:3'
TabOrder = 13
OnClick = SetAsp43Click
end
object GetVolume: TButton
Left = 155
Top = 160
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get Volume'
TabOrder = 14
OnClick = GetVolumeClick
end
object SetVolumeUp10: TButton
Left = 155
Top = 207
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Volume +10'
TabOrder = 15
OnClick = SetVolumeUp10Click
end
object SetVolumeDo10: TButton
Left = 155
Top = 254
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Volume -10'
TabOrder = 16
OnClick = SetVolumeDo10Click
end
object GetPlayRateBtn: TButton
Left = 155
Top = 300
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get Play Rate'
TabOrder = 17
OnClick = GetPlayRateBtnClick
end
object SetPlayRate2xBtn: TButton
Left = 155
Top = 347
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Play Rate 2x'
TabOrder = 18
OnClick = SetPlayRate2xBtnClick
end
object SetPlayRateHalfBtn: TButton
Left = 155
Top = 394
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Play Rate 1/2'
TabOrder = 19
OnClick = SetPlayRateHalfBtnClick
end
object FullScreenYesBtn: TButton
Left = 155
Top = 441
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'FullScreen'
TabOrder = 20
OnClick = FullScreenYesBtnClick
end
object DeInterlaceBtn: TButton
Left = 13
Top = 541
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'DeInterlace'
TabOrder = 21
OnClick = DeInterlaceBtnClick
end
object GetAudioChannel: TButton
Left = 155
Top = 491
Width = 121
Height = 40
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Get Audio Ch'
TabOrder = 22
OnClick = GetAudioChannelClick
end
object SetAudioChannelLeft: TButton
Left = 155
Top = 541
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Set Audio C L'
TabOrder = 23
OnClick = SetAudioChannelLeftClick
end
object SetAudioChannelRight: TButton
Left = 155
Top = 591
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Set Audio C R'
TabOrder = 24
OnClick = SetAudioChannelRightClick
end
object SetAudioChannelStereo: TButton
Left = 155
Top = 641
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Set Audio C S'
TabOrder = 26
OnClick = SetAudioChannelStereoClick
end
object GetAudioOutListBtn: TButton
Left = 13
Top = 591
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'AudioOutList'
TabOrder = 25
OnClick = GetAudioOutListBtnClick
end
object GetAudioOutDevEnumBtn: TButton
Left = 13
Top = 641
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'AOutDevEnum'
TabOrder = 27
OnClick = GetAudioOutDevEnumBtnClick
end
object GetEqPreListBtn: TButton
Left = 155
Top = 741
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'EqalizerPreList'
TabOrder = 28
OnClick = GetEqPreListBtnClick
end
object SetEqualizerBtn: TButton
Left = 155
Top = 691
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Set Equalizer'
TabOrder = 29
OnClick = SetEqualizerBtnClick
end
object ChAudioOut: TButton
Left = 13
Top = 691
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Ch Audio Out'
TabOrder = 30
OnClick = ChAudioOutClick
end
object GetAudioTrackList: TButton
Left = 13
Top = 741
Width = 121
Height = 41
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'AudioTrackList'
TabOrder = 31
OnClick = GetAudioTrackListClick
end
end
object LB: TListBox
AlignWithMargins = True
Left = 15
Top = 499
Width = 516
Height = 284
Margins.Left = 13
Margins.Top = 13
Margins.Right = 13
Margins.Bottom = 13
ItemHeight = 21
PopupMenu = LbPopupMenu
TabOrder = 1
end
object MrlEdit: TEdit
Left = 13
Top = 32
Width = 517
Height = 29
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
TabOrder = 2
end
object PasLibVlcPlayer1: TPasLibVlcPlayer
Left = 13
Top = 73
Width = 517
Height = 326
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
OnClick = PasLibVlcPlayer1Click
OnDblClick = PasLibVlcPlayer1DblClick
OnMouseActivate = PasLibVlcPlayer1MouseActivate
OnMouseDown = PasLibVlcPlayer1MouseDown
OnMouseEnter = PasLibVlcPlayer1MouseEnter
OnMouseLeave = PasLibVlcPlayer1MouseLeave
OnMouseMove = PasLibVlcPlayer1MouseMove
OnMouseUp = PasLibVlcPlayer1MouseUp
AudioOutput = aoWaveOut
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 = 13
Top = 407
Width = 517
Height = 74
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
TabOrder = 4
object ProgLabel1: TLabel
AlignWithMargins = True
Left = 6
Top = 44
Width = 66
Height = 21
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Align = alLeft
Caption = '00:00:00'
end
object ProgLabel2: TLabel
AlignWithMargins = True
Left = 445
Top = 44
Width = 66
Height = 21
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Align = alRight
Caption = '00:00:00'
end
object ProgBar: TTrackBar
Left = 1
Top = 1
Width = 515
Height = 38
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Align = alTop
PositionToolTip = ptBottom
TabOrder = 0
ThumbLength = 15
TickStyle = tsNone
OnChange = ProgBarChange
end
end
object BtnSelect: TButton
Left = 452
Top = 34
Width = 75
Height = 31
Margins.Left = 5
Margins.Top = 5
Margins.Right = 5
Margins.Bottom = 5
Caption = 'Select'
TabOrder = 5
OnClick = BtnSelectClick
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 = 288
Top = 60
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

View File

@@ -0,0 +1,987 @@
(*
* 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"
*
* http://prog.olsztyn.pl/paslibvlc/
*
*)
{$I ..\..\source\compiler.inc}
unit MainFormUnit;
interface
uses
{$IFDEF UNIX}Unix,{$ENDIF}
{$IFDEF MSWINDOWS}Windows,{$ENDIF}
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Menus, ComCtrls,
{$IFDEF DELPHI_XE2_UP}
System.UITypes,
{$ENDIF}
PasLibVlcUnit, PasLibVlcClassUnit, PasLibVlcPlayerUnit;
type
TMainForm = class(TForm)
PR: TPanel;
PlayBtn: TButton;
PauseBtn: TButton;
GetWidthBtn: TButton;
GetHeightBtn: TButton;
GetStateBtn: TButton;
ResumeBtn: TButton;
GetPosLenBtn: TButton;
Scale10Btn: TButton;
ScaleFitBtn: TButton;
SnapShotBtn: TButton;
NextFrameBtn: TButton;
GetASpectRatioBtn: TButton;
SetAsp11Btn: TButton;
SetAsp43Btn: TButton;
LB: TListBox;
MrlEdit: TEdit;
MrlLab: TLabel;
GetVolume: TButton;
SetVolumeUp10: TButton;
SetVolumeDo10: TButton;
PopupMenu: TPopupMenu;
a1: TMenuItem;
b1: TMenuItem;
c1: TMenuItem;
d1: TMenuItem;
GetPlayRateBtn: TButton;
SetPlayRate2xBtn: TButton;
SetPlayRateHalfBtn: TButton;
PasLibVlcPlayer1: TPasLibVlcPlayer;
FullScreenYesBtn: TButton;
DeInterlaceBtn: TButton;
ProgPanel: TPanel;
ProgBar: TTrackBar;
ProgLabel1: TLabel;
ProgLabel2: TLabel;
OpenDialog: TOpenDialog;
GetAudioChannel: TButton;
SetAudioChannelLeft: TButton;
SetAudioChannelRight: TButton;
SetAudioChannelStereo: TButton;
SaveDialog: TSaveDialog;
LbPopupMenu: TPopupMenu;
LbPmClear: TMenuItem;
LnPmSaveAs: TMenuItem;
GetAudioOutDevEnumBtn: TButton;
GetEqPreListBtn: TButton;
SetEqualizerBtn: TButton;
ChAudioOut: TButton;
GetAudioTrackList: TButton;
BtnSelect: TButton;
procedure PlayClick(Sender: TObject);
procedure PauseClick(Sender: TObject);
procedure GetWidthClick(Sender: TObject);
procedure GetHeightBtnClick(Sender: TObject);
procedure GetStateClick(Sender: TObject);
procedure ResumeClick(Sender: TObject);
procedure GetPosLenClick(Sender: TObject);
procedure Scale10Click(Sender: TObject);
procedure ScaleFitClick(Sender: TObject);
procedure SnapShotClick(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerBackward(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerBuffering(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerEncounteredError(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerEndReached(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerForward(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerNothingSpecial(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerOpening(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerPaused(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerPlaying(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerStopped(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerLengthChanged(Sender: TObject;
time: Int64);
procedure PasLibVlcPlayer1MediaPlayerPausableChanged(Sender: TObject;
val: Boolean);
procedure PasLibVlcPlayer1MediaPlayerPositionChanged(Sender: TObject;
position: Single);
procedure PasLibVlcPlayer1MediaPlayerSeekableChanged(Sender: TObject;
val: Boolean);
procedure PasLibVlcPlayer1MediaPlayerTitleChanged(Sender: TObject;
title: Integer);
procedure PasLibVlcPlayer1MediaPlayerTimeChanged(Sender: TObject;
time: Int64);
procedure PasLibVlcPlayer1MediaPlayerSnapshotTaken(Sender: TObject;
fileName: string);
procedure NextFrameClick(Sender: TObject);
procedure GetASpectRatioClick(Sender: TObject);
procedure SetAsp11Click(Sender: TObject);
procedure SetAsp43Click(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure GetVolumeClick(Sender: TObject);
procedure SetVolumeUp10Click(Sender: TObject);
procedure SetVolumeDo10Click(Sender: TObject);
procedure PasLibVlcPlayer1ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
procedure PasLibVlcPlayer1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure GetPlayRateBtnClick(Sender: TObject);
procedure SetPlayRate2xBtnClick(Sender: TObject);
procedure SetPlayRateHalfBtnClick(Sender: TObject);
procedure TransPanel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure PasLibVlcPlayer1MouseEnter(Sender: TObject);
procedure PasLibVlcPlayer1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure PasLibVlcPlayer1MouseLeave(Sender: TObject);
procedure PasLibVlcPlayer1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure PasLibVlcPlayer1Click(Sender: TObject);
procedure PasLibVlcPlayer1DblClick(Sender: TObject);
procedure FullScreenYesBtnClick(Sender: TObject);
procedure DeInterlaceBtnClick(Sender: TObject);
procedure ProgBarChange(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerMediaChanged(Sender: TObject;
mrl: string);
procedure GetAudioChannelClick(Sender: TObject);
procedure SetAudioChannelLeftClick(Sender: TObject);
procedure SetAudioChannelRightClick(Sender: TObject);
procedure SetAudioChannelStereoClick(Sender: TObject);
procedure GetAudioOutListBtnClick(Sender: TObject);
procedure LbPmClearClick(Sender: TObject);
procedure LnPmSaveAsClick(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerVideoOutChanged(Sender: TObject;
video_out: Integer);
procedure PasLibVlcPlayer1MediaPlayerScrambledChanged(Sender: TObject;
scrambled: Integer);
procedure GetAudioOutDevEnumBtnClick(Sender: TObject);
procedure GetEqPreListBtnClick(Sender: TObject);
procedure SetEqualizerBtnClick(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerCorked(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerUnCorked(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerUnMuted(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerMuted(Sender: TObject);
procedure ChAudioOutClick(Sender: TObject);
procedure GetAudioTrackListClick(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerAudioVolumeChanged(Sender: TObject;
volume: Single);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BtnSelectClick(Sender: TObject);
procedure PasLibVlcPlayer1MediaPlayerAudioDevice(Sender: TObject; audio_device: string);
procedure PasLibVlcPlayer1MediaPlayerChapterChanged(Sender: TObject; chapter: Integer);
procedure PasLibVlcPlayer1MediaPlayerEsAdded(Sender: TObject; i_type: libvlc_track_type_t; i_id: Integer);
procedure PasLibVlcPlayer1MediaPlayerEsDeleted(Sender: TObject; i_type: libvlc_track_type_t; i_id: Integer);
procedure PasLibVlcPlayer1MediaPlayerEsSelected(Sender: TObject; i_type: libvlc_track_type_t; i_id: Integer);
procedure PasLibVlcPlayer1RendererDiscoveredItemAdded(Sender: TObject; item: libvlc_renderer_item_t_ptr);
procedure PasLibVlcPlayer1RendererDiscoveredItemDeleted(Sender: TObject; item: libvlc_renderer_item_t_ptr);
procedure PasLibVlcPlayer1MouseActivate(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y, HitTest: Integer; var MouseActivate: TMouseActivate);
private
lastAudioVolume : string;
start : DWORD;
procedure DoResize();
procedure LbAdd(Item: string; AObject: TObject = NIL);
public
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
uses
FullScreenFormUnit,
SetEqualizerPresetFormUnit,
SelectOutputDeviceFormUnit;
////////////////////////////////////////////////////////////////////////////////
procedure TMainForm.LbAdd(Item: string; AObject: TObject = NIL);
var
current : DWORD;
delta : DWORD;
begin
if (LB.Items.Count = 0) then
begin
start := GetTickCount();
end;
current := GetTickCount();
if (start <= current) then
begin
delta := current - start
end
else
begin
delta := $FFFFFFFF - start + current;
end;
LB.AddItem(IntToStr(delta) + ' ms ' + Item, AObject);
LB.ItemIndex := LB.Items.Count-1;
end;
procedure TMainForm.LbPmClearClick(Sender: TObject);
begin
LB.Clear;
end;
procedure TMainForm.LnPmSaveAsClick(Sender: TObject);
begin
if (SaveDialog.Execute) then
LB.Items.SaveToFile(SaveDialog.FileName);
end;
procedure TMainForm.PlayClick(Sender: TObject);
var
appl_path : string;
logo_path : string;
logo_file_1 : string;
logo_file_2 : string;
begin
PasLibVlcPlayer1.Play(MrlEdit.Text);
ProgBar.OnChange := NIL;
appl_path := ExtractFilePath(Application.ExeName);
if ((appl_path <> '') and (appl_path[Length(appl_path)] <> PathDelim)) then
begin
appl_path := appl_path + PathDelim;
end;
logo_path := appl_path + '..'+PathDelim+'..'+PathDelim+'..'+PathDelim+'..'+PathDelim;
logo_file_1 := logo_path + 'logo1.png';
logo_file_2 := logo_path + 'logo2.png';
if (FileExists(logo_file_1) and FileExists(logo_file_2)) then
begin
PasLibVlcPlayer1.LogoShowFiles([logo_file_1, logo_file_2]);
end;
PasLibVlcPlayer1.MarqueeShowText('marquee test %H:%M:%S');
end;
procedure TMainForm.ProgBarChange(Sender: TObject);
begin
if PasLibVlcPlayer1.CanSeek() then
begin
ProgLabel1.Caption := time2str(ProgBar.Position);
PasLibVlcPlayer1.SetVideoPosInMs(ProgBar.Position);
end;
end;
procedure TMainForm.PasLibVlcPlayer1Click(Sender: TObject);
begin
LBAdd('MouseClick');
end;
procedure TMainForm.PasLibVlcPlayer1ContextPopup(Sender: TObject;
MousePos: TPoint; var Handled: Boolean);
begin
LBAdd('ContextPopUp');
end;
procedure TMainForm.PasLibVlcPlayer1DblClick(Sender: TObject);
begin
LBAdd('MouseDblClick');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerAudioDevice(Sender: TObject; audio_device: string);
begin
LBAdd('MediaPlayerAudioDevice: ' + audio_device);
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerAudioVolumeChanged(
Sender: TObject; volume: Single);
var
newAudioVolume : string;
begin
newAudioVolume := FloatToStr(volume);
if (lastAudioVolume <> newAudioVolume) then
begin
lastAudioVolume := newAudioVolume;
LBAdd('MediaPlayerAudioVolume: ' + lastAudioVolume);
end;
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerBackward(Sender: TObject);
begin
LBAdd('MediaPlayerBackward');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerBuffering(Sender: TObject);
begin
LBAdd('MediaPlayerBuffering');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerChapterChanged(Sender: TObject; chapter: Integer);
begin
LBAdd('MediaPlayerChapterChanged: ' + IntToStr(chapter));
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerCorked(Sender: TObject);
begin
LBAdd('MediaPlayerCorked');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerEncounteredError(
Sender: TObject);
begin
LBAdd('MediaPlayerEncounteredError');
LBAdd({$IFDEF DELPHI_XE2_UP}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(libvlc_errmsg()));
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerEndReached(Sender: TObject);
begin
LBAdd('MediaPlayerEndReached');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerEsAdded(Sender: TObject; i_type: libvlc_track_type_t; i_id: Integer);
begin
case i_type of
libvlc_track_audio : LBAdd('MediaPlayerEsAdded (audio), id = ' + IntToStr(i_id));
libvlc_track_video : LBAdd('MediaPlayerEsAdded (video), id = ' + IntToStr(i_id));
libvlc_track_text : LBAdd('MediaPlayerEsAdded (text), id = ' + IntToStr(i_id));
else
LBAdd('MediaPlayerEsAdded (unknown), id = ' + IntToStr(i_id));
end;
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerEsDeleted(Sender: TObject; i_type: libvlc_track_type_t; i_id: Integer);
begin
case i_type of
libvlc_track_audio : LBAdd('PlayerEsDeleted (audio), id = ' + IntToStr(i_id));
libvlc_track_video : LBAdd('PlayerEsDeleted (video), id = ' + IntToStr(i_id));
libvlc_track_text : LBAdd('PlayerEsDeleted (text), id = ' + IntToStr(i_id));
else
LBAdd('MediaPlayerEsDeleted (unknown), id = ' + IntToStr(i_id));
end;
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerEsSelected(Sender: TObject; i_type: libvlc_track_type_t; i_id: Integer);
begin
case i_type of
libvlc_track_audio : LBAdd('PlayerEsSelected (audio), id = ' + IntToStr(i_id));
libvlc_track_video : LBAdd('PlayerEsSelected (video), id = ' + IntToStr(i_id));
libvlc_track_text : LBAdd('PlayerEsSelected (text), id = ' + IntToStr(i_id));
else
LBAdd('MediaPlayerEsSelected (unknown), id = ' + IntToStr(i_id));
end;
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerForward(Sender: TObject);
begin
LBAdd('MediaPlayerForward');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerLengthChanged(Sender: TObject;
time: Int64);
var
oldOnChange : TNotifyEvent;
begin
LBAdd('MediaPlayerLengthChanged: ' + time2str(time));
ProgLabel2.Caption := time2str(time);
oldOnChange := ProgBar.OnChange;
ProgBar.OnChange := NIL;
ProgBar.Max := time;
ProgBar.OnChange := oldOnChange;
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerMediaChanged(Sender: TObject;
mrl: string);
begin
LBAdd('MediaPlayerMediaChanged: ' + mrl);
Caption := mrl;
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerMuted(Sender: TObject);
begin
LBAdd('MediaPlayerMuted');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerNothingSpecial(Sender: TObject);
begin
LBAdd('MediaPlayerNothingSpecial');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerOpening(Sender: TObject);
begin
LBAdd('MediaPlayerOpening');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerPausableChanged(Sender: TObject;
val: Boolean);
begin
LBAdd('MediaPlayerPausableChanged: ' + IntToStr(Ord(val)));
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerPaused(Sender: TObject);
begin
LBAdd('MediaPlayerPaused');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerPlaying(Sender: TObject);
begin
LBAdd('MediaPlayerPlaying');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerPositionChanged(Sender: TObject;
position: Single);
begin
LBAdd('MediaPlayerPositionChanged: ' + FloatToStr(position));
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerScrambledChanged(Sender: TObject;
scrambled: Integer);
begin
LBAdd('MediaPlayerScrambledChanged: ' + IntToStr(scrambled));
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerSeekableChanged(Sender: TObject;
val: Boolean);
begin
LBAdd('MediaPlayerSeekableChanged: ' + IntToStr(Ord(val)));
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerSnapshotTaken(Sender: TObject;
fileName: string);
begin
LBAdd('MediaPlayerSnapshotTaken: ' + fileName);
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerStopped(Sender: TObject);
begin
LBAdd('MediaPlayerStopped');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerTimeChanged(Sender: TObject;
time: Int64);
var
oldOnChange : TNotifyEvent;
begin
LBAdd('MediaPlayerTimeChanged: ' + time2str(time));
ProgLabel1.Caption := time2str(time);
oldOnChange := ProgBar.OnChange;
ProgBar.OnChange := NIL;
ProgBar.Position := time;
ProgBar.OnChange := oldOnChange;
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerTitleChanged(Sender: TObject;
title: Integer);
begin
LBAdd('MediaPlayerTitleChanged: ' + IntToStr(title));
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerUnCorked(Sender: TObject);
begin
LBAdd('MediaPlayerUnCorked');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerUnMuted(Sender: TObject);
begin
LBAdd('MediaPlayerUnMuted');
end;
procedure TMainForm.PasLibVlcPlayer1MediaPlayerVideoOutChanged(Sender: TObject;
video_out: Integer);
begin
LBAdd('MediaPlayerVideoOutChanged: ' + IntToStr(video_out));
end;
procedure TMainForm.PasLibVlcPlayer1MouseActivate(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y, HitTest: Integer; var MouseActivate: TMouseActivate);
begin
LBAdd('MouseActivate(' + IntToStr(X) + ', ' + IntToStr(Y) + ')');
end;
procedure TMainForm.PasLibVlcPlayer1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
LBAdd('MouseDown(' + IntToStr(X) + ', ' + IntToStr(Y) + ')');
end;
procedure TMainForm.PasLibVlcPlayer1MouseEnter(Sender: TObject);
begin
LBAdd('MouseEnter');
end;
procedure TMainForm.PasLibVlcPlayer1MouseLeave(Sender: TObject);
begin
LBAdd('MouseLeave');
end;
procedure TMainForm.PasLibVlcPlayer1MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
begin
LBAdd('MouseMove ' + IntToStr(x) + ', ' + IntToStr(y));
end;
procedure TMainForm.PasLibVlcPlayer1MouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
LBAdd('MouseUp(' + IntToStr(X) + ', ' + IntToStr(Y) + ')');
end;
procedure TMainForm.PasLibVlcPlayer1RendererDiscoveredItemAdded(Sender: TObject; item: libvlc_renderer_item_t_ptr);
begin
LBAdd('RendererDiscoveredItemAdded');
end;
procedure TMainForm.PasLibVlcPlayer1RendererDiscoveredItemDeleted(Sender: TObject; item: libvlc_renderer_item_t_ptr);
begin
LBAdd('RendererDiscoveredItemDeleted');
end;
procedure TMainForm.PauseClick(Sender: TObject);
begin
PasLibVlcPlayer1.Pause();
ProgBar.OnChange := ProgBarChange;
end;
procedure TMainForm.GetWidthClick(Sender: TObject);
begin
MessageDlg(
'Video width = ' + IntToStr(PasLibVlcPlayer1.GetVideoWidth()),
mtInformation, [mbOK], 0);
end;
procedure TMainForm.NextFrameClick(Sender: TObject);
begin
PasLibVlcPlayer1.NextFrame();
LBAdd('Position:'+IntToStr(PasLibVlcPlayer1.GetVideoPosInMs()));
end;
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
PasLibVlcPlayer1.Stop();
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
// you can set custom path to libvlc.dll before call use PasLibVlcPlayer component
// PasLibVlcPlayer1.VLC.Path := 'C:\Program Files (x86)\VideoLAN\VLC';
// MrlEdit.Text := '..'+PathDelim+'..'+PathDelim+'..'+PathDelim+'..'+PathDelim+'_testFiles'+PathDelim+'test.ts';
MrlEdit.Text :=
'..'+PathDelim+'..'+PathDelim+'..'+PathDelim+'..'+PathDelim+
'_testFiles'+PathDelim+'Maximize.mp4';
DoResize();
Caption := Caption + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
end;
procedure TMainForm.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
LBAdd('FormMouseDown');
end;
procedure TMainForm.FormResize(Sender: TObject);
begin
DoResize();
end;
procedure TMainForm.FullScreenYesBtnClick(Sender: TObject);
var
aFullScreenForm : TFullScreenForm;
oldL, oldT, oldW, oldH : Integer;
oldA : TAlign;
begin
MessageDlg('Press any key, to leave full screen mode', mtInformation, [mbOK], 0);
oldL := PasLibVlcPlayer1.Left;
oldT := PasLibVlcPlayer1.Top;
oldW := PasLibVlcPlayer1.Width;
oldH := PasLibVlcPlayer1.Height;
oldA := PasLibVlcPlayer1.Align;
if (oldA <> alNone) then PasLibVlcPlayer1.Align := alNone;
aFullScreenForm := TFullScreenForm.Create(SELF);
aFullScreenForm.SetBounds(Monitor.Left, Monitor.Top, Monitor.Width, Monitor.Height);
// PasLibVlcPlayer1.ParentWindow := aFullScreenForm.Handle;
{$IFDEF FPC}
LCLIntf.SetParent(PasLibVlcPlayer1.Handle, aFullScreenForm.Handle);
{$ELSE}
{$IFDEF MSWINDOWS}
Windows.SetParent(PasLibVlcPlayer1.Handle, aFullScreenForm.Handle);
{$ENDIF}
{$ENDIF}
PasLibVlcPlayer1.SetBounds(0, 0, aFullScreenForm.Width, aFullScreenForm.Height);
aFullScreenForm.ShowModal;
PasLibVlcPlayer1.SetBounds(oldL, oldT, oldW, oldH);
{$IFDEF FPC}
LCLIntf.SetParent(PasLibVlcPlayer1.Handle, SELF.Handle);
{$ELSE}
{$IFDEF MSWINDOWS}
Windows.SetParent(PasLibVlcPlayer1.Handle, SELF.Handle);
{$ENDIF}
{$ENDIF}
aFullScreenForm.Free;
if (oldA <> alNone) then PasLibVlcPlayer1.Align := oldA;
end;
procedure TMainForm.GetAspectRatioClick(Sender: TObject);
var
info : string;
sar_num, sar_den : LongWord;
begin
info := 'Aspect ratio = ' + PasLibVlcPlayer1.GetVideoAspectRatio();
if (PasLibVlcPlayer1.GetVideoSampleAspectRatio(sar_num, sar_den)) then
begin
info := info + ', SampleAspectRatio = ' + IntToStr(sar_num) + ':' + IntToStr(sar_den);
end;
MessageDlg(
info,
mtInformation, [mbOK], 0);
end;
procedure TMainForm.GetAudioChannelClick(Sender: TObject);
var
chname: string;
begin
chname := 'Unknown';
case PasLibVlcPlayer1.GetAudioChannel() of
libvlc_AudioChannel_Error : chname := 'Error';
libvlc_AudioChannel_NotAvail : chname := 'Not availiable';
libvlc_AudioChannel_Stereo : chname := 'Stereo';
libvlc_AudioChannel_RStereo : chname := 'RStereo';
libvlc_AudioChannel_Left : chname := 'Left';
libvlc_AudioChannel_Right : chname := 'Right';
libvlc_AudioChannel_Dolbys : chname := 'Dolbys';
end;
MessageDlg(chname, mtInformation, [mbOK], 0);
end;
procedure TMainForm.GetAudioOutDevEnumBtnClick(Sender: TObject);
var
ls1 : TStringList;
id1 : Integer;
begin
LBAdd('GetAudioOutputDeviceEnum');
ls1 := PasLibVlcPlayer1.GetAudioOutputDeviceEnum();
for id1 := 0 to ls1.Count - 1 do
begin
LBAdd(' ' + ls1.Strings[id1]);
end;
ls1.Free;
end;
procedure TMainForm.GetAudioOutListBtnClick(Sender: TObject);
var
ls1 : TStringList;
ls2 : TStringList;
id1 : Integer;
id2 : Integer;
begin
LBAdd('GetAudioOutputList');
ls1 := PasLibVlcPlayer1.GetAudioOutputList();
for id1 := 0 to ls1.Count - 1 do
begin
LBAdd(' ' + ls1.Strings[id1]);
ls2 := PasLibVlcPlayer1.GetAudioOutputDeviceList(ls1.Strings[id1]);
if (ls2.Count < 1) then
begin
LBAdd(' no devices found');
end;
for id2 := 0 to ls2.Count - 1 do
begin
LBAdd(' device: ' + ls2.Strings[id2]);
end;
ls2.Free;
end;
ls1.Free;
end;
procedure TMainForm.GetAudioTrackListClick(Sender: TObject);
var
ls1 : TStringList;
id1 : Integer;
begin
LBAdd('GetAudioTrackList');
ls1 := PasLibVlcPlayer1.GetAudioTrackList();
if (ls1.Count < 1) then
begin
LBAdd(' no audio tracks found');
end;
for id1 := 0 to ls1.Count - 1 do
begin
LBAdd(' audio track, ID: ' + IntToStr(Int64(ls1.Objects[id1])) + ' - ' + ls1.Strings[id1]);
end;
ls1.Free;
end;
procedure TMainForm.GetEqPreListBtnClick(Sender: TObject);
var
ls1 : TStringList;
id1 : Integer;
ebc : Word;
begin
LBAdd('GetEqualizerPresetList');
ls1 := PasLibVlcPlayer1.EqualizerGetPresetList();
for id1 := 0 to ls1.Count - 1 do
begin
LBAdd(' ' + IntToStr(Word(ls1.Objects[id1])) + ' - ' + ls1.Strings[id1]);
end;
ls1.Free;
ebc := PasLibVlcPlayer1.EqualizerGetBandCount();
LBAdd('GetEqualizerBandCount = ' + IntToStr(ebc));
LBAdd('GetEqualizerBandFrequency');
for id1 := 0 to ebc - 1 do
begin
LBAdd(' ' + IntToStr(id1) + ' - ' + IntToStr(Round(PasLibVlcPlayer1.EqualizerGetBandFrequency(id1))));
end;
end;
procedure TMainForm.GetHeightBtnClick(Sender: TObject);
begin
MessageDlg(
'Video height = ' + IntToStr(PasLibVlcPlayer1.GetVideoHeight()),
mtInformation, [mbOK], 0);
end;
procedure TMainForm.GetPlayRateBtnClick(Sender: TObject);
begin
MessageDlg(
'Play rate = ' + IntToStr(PasLibVlcPlayer1.GetPlayRate()),
mtInformation, [mbOK], 0);
end;
procedure TMainForm.GetPosLenClick(Sender: TObject);
begin
MessageDlg(
'Len = ' + IntToStr(PasLibVlcPlayer1.GetVideoLenInMs()) + ' ms, '+
'Pos = ' + IntToStr(PasLibVlcPlayer1.GetVideoPosInMs()),
mtInformation, [mbOK], 0);
end;
procedure TMainForm.GetStateClick(Sender: TObject);
var
stateName: string;
begin
case PasLibVlcPlayer1.GetState() of
plvPlayer_NothingSpecial: stateName := 'Idle';
plvPlayer_Opening: stateName := 'Opening';
plvPlayer_Buffering: stateName := 'Buffering';
plvPlayer_Playing: stateName := 'Playing';
plvPlayer_Paused: stateName := 'Paused';
plvPlayer_Stopped: stateName := 'Stopped';
plvPlayer_Ended: stateName := 'Ended';
plvPlayer_Error: stateName := 'Error';
else stateName := 'Unknown';
end;
MessageDlg('State = ' + stateName, mtInformation, [mbOK], 0);
end;
procedure TMainForm.GetVolumeClick(Sender: TObject);
begin
MessageDlg(
'Volume level = ' + IntToStr(PasLibVlcPlayer1.GetAudioVolume()),
mtInformation, [mbOK], 0);
end;
procedure TMainForm.ResumeClick(Sender: TObject);
begin
PasLibVlcPlayer1.Resume();
ProgBar.OnChange := NIL;
end;
procedure TMainForm.Scale10Click(Sender: TObject);
var
sc: Single;
begin
sc := PasLibVlcPlayer1.GetVideoScaleInPercent;
if (sc < 1) then sc := 100;
sc := sc - 10;
if PasLibVlcPlayer1.IsPlay() then
PasLibVlcPlayer1.SetVideoScaleInPercent(sc);
end;
procedure TMainForm.ScaleFitClick(Sender: TObject);
begin
if PasLibVlcPlayer1.IsPlay() then
PasLibVlcPlayer1.SetVideoScaleInPercent(0);
end;
procedure TMainForm.SetAsp11Click(Sender: TObject);
begin
PasLibVlcPlayer1.SetVideoAspectRatio('1:1');
end;
procedure TMainForm.SetAsp43Click(Sender: TObject);
begin
PasLibVlcPlayer1.SetVideoAspectRatio('4:3');
end;
procedure TMainForm.SetAudioChannelLeftClick(Sender: TObject);
begin
PasLibVlcPlayer1.SetAudioChannel(libvlc_AudioChannel_Left);
end;
procedure TMainForm.SetAudioChannelRightClick(Sender: TObject);
begin
PasLibVlcPlayer1.SetAudioChannel(libvlc_AudioChannel_Right);
end;
procedure TMainForm.SetAudioChannelStereoClick(Sender: TObject);
begin
PasLibVlcPlayer1.SetAudioChannel(libvlc_AudioChannel_Stereo);
end;
procedure TMainForm.SetEqualizerBtnClick(Sender: TObject);
var
eqf : TSetEqualizerPresetForm;
prl : TStringList;
begin
prl := PasLibVlcPlayer1.EqualizerGetPresetList();
eqf := TSetEqualizerPresetForm.Create(SELF);
eqf.FVLC := PasLibVlcPlayer1.VLC;
eqf.PresetListLB.Items.AddStrings(prl);
if eqf.ShowModal = mrOK then
begin
if (eqf.PresetListLB.ItemIndex > -1) then
begin
PasLibVlcPlayer1.EqualizerSetPreset(
Word(prl.Objects[eqf.PresetListLB.ItemIndex])
);
end;
end;
eqf.Free;
prl.Free;
end;
procedure TMainForm.SetPlayRate2xBtnClick(Sender: TObject);
var
newPlayRate: Integer;
begin
newPlayRate := PasLibVlcPlayer1.GetPlayRate() * 2;
if (newPlayRate > 400) then exit;
PasLibVlcPlayer1.SetPlayRate(newPlayRate);
end;
procedure TMainForm.SetPlayRateHalfBtnClick(Sender: TObject);
var
newPlayRate: Integer;
begin
newPlayRate := PasLibVlcPlayer1.GetPlayRate() div 2;
if (newPlayRate < 25) then exit;
PasLibVlcPlayer1.SetPlayRate(newPlayRate);
end;
procedure TMainForm.SetVolumeDo10Click(Sender: TObject);
begin
PasLibVlcPlayer1.SetAudioVolume(PasLibVlcPlayer1.GetAudioVolume()-10);
end;
procedure TMainForm.SetVolumeUp10Click(Sender: TObject);
begin
PasLibVlcPlayer1.SetAudioVolume(PasLibVlcPlayer1.GetAudioVolume()+10);
end;
procedure TMainForm.SnapShotClick(Sender: TObject);
begin
PasLibVlcPlayer1.SnapShot(ChangeFileExt(Application.ExeName, '.png'));
end;
procedure TMainForm.TransPanel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
LBAdd('Trans MouseDown(' + IntToStr(X) + ', ' + IntToStr(Y) + ')');
end;
procedure TMainForm.BtnSelectClick(Sender: TObject);
begin
if (OpenDialog.Execute) then
MrlEdit.Text := OpenDialog.FileName;
end;
procedure TMainForm.ChAudioOutClick(Sender: TObject);
var
adLst : TStringList;
chAdForm : TSelectOutputDeviceForm;
newAudioDevice : string;
selIdx : Integer;
begin
chAdForm := TSelectOutputDeviceForm.Create(SELF);
try
chAdForm.OutputDevicesLB.Clear;
adLst := PasLibVlcPlayer1.GetAudioOutputDeviceEnum(TRUE);
chAdForm.OutputDevicesLB.Items.AddStrings(adLst);
chAdForm.OutputDevicesLB.ItemIndex := -1;
for selIdx := 0 to chAdForm.OutputDevicesLB.Items.Count - 1 do
begin
newAudioDevice := chAdForm.OutputDevicesLB.Items.Strings[selIdx];
if PasLibVlcPlayer1.LastAudioOutputDeviceId = Copy(newAudioDevice, 1, Pos('|', newAudioDevice) - 1) then
begin
chAdForm.OutputDevicesLB.ItemIndex := selIdx;
break;
end;
end;
if (chAdForm.ShowModal = mrOK) then
begin
newAudioDevice := chAdForm.OutputDevicesLB.Items.Strings[chAdForm.OutputDevicesLB.ItemIndex];
newAudioDevice := Copy(newAudioDevice, 1, Pos('|', newAudioDevice) - 1);
LBAdd('Change Audio Device: ' + newAudioDevice);
PasLibVlcPlayer1.SetAudioOutputDevice(newAudioDevice);
end;
adLst.Free;
finally
chAdForm.Free;
end;
end;
procedure TMainForm.DeInterlaceBtnClick(Sender: TObject);
begin
if (PasLibVlcPlayer1.DeInterlaceFilter = deOFF) then
begin
PasLibVlcPlayer1.DeinterlaceMode := dmX;
PasLibVlcPlayer1.DeInterlaceFilter := deON;
LBAdd('DeInterlaceFilter = ON, ' + PasLibVlcPlayer1.DeinterlaceModeName);
end
else
begin
PasLibVlcPlayer1.DeInterlaceFilter := deOFF;
LBAdd('DeInterlaceFilter = OFF');
end;
end;
procedure TMainForm.DoResize();
begin
MrlEdit.Width := PR.Left - 16;
LB.Width := MrlEdit.Width;
LB.Top := ClientHeight - 8 - LB.Height;
ProgPanel.Top := LB.Top - 8 - ProgPanel.Height;
ProgPanel.Width := LB.Width;
PasLibVlcPlayer1.Width := LB.Width;
PasLibVlcPlayer1.Height := Lb.Top - MrlEdit.Top - MrlEdit.Height - 16 - ProgPanel.Height - 8;
BtnSelect.SetBounds(
MrlEdit.Left + MrlEdit.Width - BtnSelect.Width - 1,
MrlEdit.Top + 1,
BtnSelect.Width,
MrlEdit.Height - 2
);
end;
end.

View File

@@ -0,0 +1,55 @@
object SelectOutputDeviceForm: TSelectOutputDeviceForm
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'Select output device'
ClientHeight = 242
ClientWidth = 395
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object OutputDevicesLabel: TLabel
Left = 12
Top = 8
Width = 77
Height = 13
Caption = 'Output devices:'
FocusControl = OutputDevicesLB
end
object OutputDevicesLB: TListBox
Left = 12
Top = 27
Width = 285
Height = 198
Style = lbOwnerDrawFixed
TabOrder = 0
OnDblClick = OutputDevicesLBDblClick
OnDrawItem = OutputDevicesLBDrawItem
end
object OkBtn: TButton
Left = 310
Top = 28
Width = 75
Height = 25
Caption = 'OK'
Default = True
TabOrder = 1
OnClick = OkBtnClick
end
object CancelBtn: TButton
Left = 310
Top = 59
Width = 75
Height = 25
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
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"
*
* http://prog.olsztyn.pl/paslibvlc/
*
*)
{$I ..\..\source\compiler.inc}
unit SelectOutputDeviceFormUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TSelectOutputDeviceForm = class(TForm)
OutputDevicesLB: TListBox;
OkBtn: TButton;
CancelBtn: TButton;
OutputDevicesLabel: TLabel;
procedure OkBtnClick(Sender: TObject);
procedure OutputDevicesLBDblClick(Sender: TObject);
procedure OutputDevicesLBDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
SelectOutputDeviceForm: TSelectOutputDeviceForm;
implementation
{$R *.dfm}
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; Rect: TRect; State: TOwnerDrawState);
var
str : string;
begin
with (Control as TListBox).Canvas do
begin
FillRect(Rect);
str := (Control as TListBox).Items[Index];
TextOut(Rect.Left + 2, Rect.Top + 1, Copy(str, Pos('|', str) + 1, MaxInt));
end;
end;
end.

View File

@@ -0,0 +1,71 @@
object SetEqualizerPresetForm: TSetEqualizerPresetForm
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'Set Equalizer Preset'
ClientHeight = 295
ClientWidth = 470
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object PresetListLabel: TLabel
Left = 16
Top = 13
Width = 40
Height = 13
Caption = 'Presets:'
FocusControl = PresetListLB
end
object BandInfoLabel: TLabel
Left = 140
Top = 13
Width = 83
Height = 13
Caption = 'Preset band info:'
FocusControl = BandInfoLB
end
object PresetListLB: TListBox
Left = 16
Top = 32
Width = 105
Height = 245
ItemHeight = 13
TabOrder = 0
OnClick = PresetListLBClick
end
object OkBtn: TButton
Left = 380
Top = 13
Width = 75
Height = 25
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 1
end
object CancelBtn: TButton
Left = 380
Top = 44
Width = 75
Height = 25
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
object BandInfoLB: TListBox
Left = 140
Top = 32
Width = 221
Height = 245
ItemHeight = 13
TabOrder = 3
end
end

View File

@@ -0,0 +1,87 @@
(*
* 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"
*
* http://prog.olsztyn.pl/paslibvlc/
*
*)
{$I ..\..\source\compiler.inc}
unit SetEqualizerPresetFormUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, 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 *.dfm}
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.