Стартовый пул
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="DemoPasLivVlcPlayerPauseAtStart"/>
|
||||
<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="DemoPasLibVlcPlayerPauseAtStart" InternalName="DemoPasLibVlcPlayerPauseAtStart" LegalCopyright="Robert Jędrzejczyk" LegalTrademarks="Robert Jędrzejczyk" OriginalFilename="DemoPasLibVlcPlayerPauseAtStart" ProductName="DemoPasLibVlcPlayerPauseAtStart"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="PasLibVlcPlayer"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="DemoPasLivVlcPlayerPauseAtStart.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="MainFormUnit.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MainForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="DemoPasLibVlcPlayerPauseAtStart"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<RelocatableUnit Value="True"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="4"/>
|
||||
<VariablesInRegisters Value="True"/>
|
||||
<UncertainOptimizations Value="True"/>
|
||||
</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>
|
@@ -0,0 +1,42 @@
|
||||
(*
|
||||
* 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}
|
||||
|
||||
program DemoPasLivVlcPlayerPauseAtStart;
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms,
|
||||
MainFormUnit;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.Run;
|
||||
end.
|
@@ -0,0 +1,42 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 367
|
||||
Height = 339
|
||||
Top = 135
|
||||
Width = 414
|
||||
Caption = 'DemoPasLivVlcPlayerPauseAtStart'
|
||||
ClientHeight = 339
|
||||
ClientWidth = 414
|
||||
Color = clBtnFace
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.8.0.6'
|
||||
object mrlEdit: TEdit
|
||||
Left = 12
|
||||
Height = 21
|
||||
Top = 12
|
||||
Width = 391
|
||||
TabOrder = 0
|
||||
end
|
||||
object player: TPasLibVlcPlayer
|
||||
Left = 12
|
||||
Top = 44
|
||||
Width = 391
|
||||
BevelOuter = bvNone
|
||||
ParentColor = False
|
||||
TabOrder = 1
|
||||
SnapShotFmt = 'png'
|
||||
OnMediaPlayerTimeChanged = playerMediaPlayerTimeChanged
|
||||
end
|
||||
object playButton: TButton
|
||||
Left = 164
|
||||
Height = 25
|
||||
Top = 300
|
||||
Width = 75
|
||||
Caption = 'Play'
|
||||
OnClick = playButtonClick
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
@@ -0,0 +1,98 @@
|
||||
(*
|
||||
* 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 MainFormUnit;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLIntf, LCLType, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, PasLibVlcPlayerUnit;
|
||||
|
||||
type
|
||||
|
||||
{ TMainForm }
|
||||
|
||||
TMainForm = class(TForm)
|
||||
mrlEdit: TEdit;
|
||||
player: TPasLibVlcPlayer;
|
||||
playButton: TButton;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure playerMediaPlayerTimeChanged(Sender: TObject;
|
||||
time: Int64);
|
||||
procedure playButtonClick(Sender: TObject);
|
||||
private
|
||||
needStop : Boolean;
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
MainForm: TMainForm;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
|
||||
{$IFDEF LCLGTK2}
|
||||
Caption := Caption + ' LCL GTK2';
|
||||
{$ELSE}
|
||||
{$IFDEF LCLQT}
|
||||
Caption := Caption + ' LCL QT';
|
||||
{$ELSE}
|
||||
Caption := Caption + ' LCL WIN';
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
Caption := Caption + ' x' + {$IFDEF CPUX32}'32'{$ELSE}'64'{$ENDIF};
|
||||
needStop := TRUE;
|
||||
mrlEdit.Text := '..'+PathDelim+'..'+PathDelim+'_testFiles'+PathDelim+'test.ts';
|
||||
player.Play(WideString(mrlEdit.Text));
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
player.Stop();
|
||||
end;
|
||||
|
||||
procedure TMainForm.playButtonClick(Sender: TObject);
|
||||
begin
|
||||
player.Resume();
|
||||
end;
|
||||
|
||||
procedure TMainForm.playerMediaPlayerTimeChanged(Sender: TObject;
|
||||
time: Int64);
|
||||
begin
|
||||
if (needStop) and (time > 500) then
|
||||
begin
|
||||
needStop := FALSE;
|
||||
player.Pause();
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
Reference in New Issue
Block a user