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

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,49 @@
(*
* 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 DemoPasLibVlc;
uses
Forms,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\..\source.vcl\PasLibVlcPlayerUnit.pas',
MainFormUnit in 'MainFormUnit.pas' {MainForm};
{$R *.res}
begin
{$IFDEF DELPHI2007_UP}
ReportMemoryLeaksOnShutdown := TRUE;
{$ENDIF}
Application.Initialize;
{$IFDEF DELPHI2007_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.Title := 'PasLibVlcDemo' + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8da1e076-0f08-4057-b905-f843d99de2ee}</ProjectGuid>
<MainSource>DemoPasLibVlc.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlc.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="FileDescription">DemoPasLibVlc</VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">DemoPasLibVlc</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">DemoPasLibVlc</VersionInfoKeys><VersionInfoKeys Name="ProductName">DemoPasLibVlc</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments">robert@prog.olsztyn.pl</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoPasLibVlc.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoPasLibVlc.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source.vcl\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source.vc\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source.v\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,43 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'libvlc demo'
ClientHeight = 453
ClientWidth = 632
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Menu = MainMenu
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object OpenDialog: TOpenDialog
DefaultExt = '*.*'
Title = 'Select file to play'
Left = 8
Top = 12
end
object MainMenu: TMainMenu
Left = 44
Top = 12
object MenuFile: TMenuItem
Caption = 'File'
object MenuFileOpen: TMenuItem
Caption = 'Open'
ShortCut = 16463
OnClick = MenuFileOpenClick
end
object MenuFileQuit: TMenuItem
Caption = 'Quit'
ShortCut = 16465
OnClick = MenuFileQuitClick
end
end
end
end

View File

@@ -0,0 +1,186 @@
(*
* 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
{$IFDEF UNIX}Unix,{$ENDIF}
{$IFDEF MSWINDOWS}Windows,{$ENDIF}
{$IFDEF LCLGTK2}Gtk2, {$IFDEF UNIX}Gdk2x,{$ENDIF}{$ENDIF}
{$IFDEF LCLQT}Qt4, QtWidgets, {$ENDIF}
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, Menus,
PasLibVlcUnit;
type
TMainForm = class(TForm)
OpenDialog: TOpenDialog;
MainMenu: TMainMenu;
MenuFile: TMenuItem;
MenuFileOpen: TMenuItem;
MenuFileQuit: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure MenuFileOpenClick(Sender: TObject);
procedure MenuFileQuitClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
p_li : libvlc_instance_t_ptr;
p_mi : libvlc_media_player_t_ptr;
procedure PlayerInit();
procedure PlayerPlay(fileName: WideString);
procedure PlayerStop();
procedure PlayerDestroy();
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.PlayerInit();
begin
// libvlc_dynamic_dll_init_with_path('C:\Program Files\VideoLAN\VLC');
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
MessageDlg(libvlc_dynamic_dll_error, mtError, [mbOK], 0);
Application.Terminate();
exit;
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
if (p_li <> NIL) then
begin
p_mi := libvlc_media_player_new(p_li);
end;
end;
procedure TMainForm.PlayerPlay(fileName: WideString);
var
p_md : libvlc_media_t_ptr;
begin
if (p_li <> NIL) then
begin
p_md := libvlc_media_new_path(p_li, PAnsiChar(UTF8Encode(fileName)));
if (p_md <> NIL) then
begin
if (p_mi <> NIL) then
begin
//libvlc_video_set_key_input(p_mi, 1);
//libvlc_video_set_mouse_input(p_mi, 1);
libvlc_media_player_set_display_window(p_mi, SELF.Handle);
libvlc_media_player_set_media(p_mi, p_md);
libvlc_media_player_play(p_mi);
end;
libvlc_media_release(p_md);
end;
end;
end;
procedure TMainForm.PlayerStop();
begin
if (p_mi <> NIL) then
begin
if (libvlc_media_player_is_playing(p_mi) = 1) then
begin
libvlc_media_player_stop(p_mi);
while (libvlc_media_player_is_playing(p_mi) = 1) do
begin
Sleep(50);
end;
end;
libvlc_media_player_release(p_mi);
p_mi := NIL;
Sleep(50);
end;
end;
procedure TMainForm.PlayerDestroy();
begin
if (p_li <> NIL) then
begin
PlayerStop();
libvlc_release(p_li);
p_li := NIL;
end;
libvlc_dynamic_dll_done();
end;
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
PlayerDestroy();
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
p_li := NIL;
p_mi := NIL;
PlayerInit();
Caption := Caption + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
if (libvlc_dynamic_dll_error = '') then
begin
Caption := Caption + ', libvlc: ' + libvlc_dynamic_dll_vlc_version_str;
if (ParamStr(1) <> '') then
begin
PlayerPlay(ParamStr(1));
end;
end;
end;
procedure TMainForm.MenuFileOpenClick(Sender: TObject);
begin
if OpenDialog.Execute(SELF.Handle) then
begin
PlayerPlay(OpenDialog.FileName);
OpenDialog.InitialDir := ExtractFilePath(OpenDialog.FileName);
end;
end;
procedure TMainForm.MenuFileQuitClick(Sender: TObject);
begin
Close();
end;
end.

View File

@@ -0,0 +1,49 @@
(*
* 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 DemoPasLibVlcMediaListPlayer;
uses
Forms,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\..\source.vcl\PasLibVlcPlayerUnit.pas',
MainFormUnit in 'MainFormUnit.pas' {MainForm};
{$R *.res}
begin
{$IFDEF DELPHI2007_UP}
ReportMemoryLeaksOnShutdown := TRUE;
{$ENDIF}
Application.Initialize;
{$IFDEF DELPHI2007_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.Title := 'DemoPasLibVlcMediaListPlayer' + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{6620e656-9ddf-49af-83a6-380377f8fd73}</ProjectGuid>
<MainSource>DemoPasLibVlcMediaListPlayer.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlcMediaListPlayer.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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">1045</VersionInfo><VersionInfo Name="CodePage">1250</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="FileDescription">DemoPasLibVlcMediaListPlayer</VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">DemoPasLibVlcMediaListPlayer</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">DemoPasLibVlcMediaListPlayer</VersionInfoKeys><VersionInfoKeys Name="ProductName">DemoPasLibVlcMediaListPlayer</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments">robert@prog.olsztyn.pl</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoPasLibVlcMediaListPlayer.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoPasLibVlcMediaListPlayer.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source.vc\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source.v\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,215 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'MainForm'
ClientHeight = 525
ClientWidth = 764
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object BottomPanel: TPanel
Left = 0
Top = 472
Width = 764
Height = 53
Align = alBottom
TabOrder = 0
object PlayBtn: TButton
Left = 12
Top = 16
Width = 50
Height = 25
Caption = 'Play'
TabOrder = 0
OnClick = PlayBtnClick
end
object PrevBtn: TButton
Left = 140
Top = 16
Width = 50
Height = 25
Caption = 'Prev'
TabOrder = 1
OnClick = PrevBtnClick
end
object NextBtn: TButton
Left = 196
Top = 16
Width = 50
Height = 25
Caption = 'Next'
TabOrder = 2
OnClick = NextBtnClick
end
object StopBtn: TButton
Left = 260
Top = 16
Width = 50
Height = 25
Caption = 'Stop'
TabOrder = 3
OnClick = StopBtnClick
end
object ClearBtn: TButton
Left = 420
Top = 16
Width = 50
Height = 25
Caption = 'Clear'
TabOrder = 4
OnClick = ClearBtnClick
end
object PlayModeNormalBtn: TButton
Left = 492
Top = 16
Width = 75
Height = 25
Caption = 'Play Normal'
TabOrder = 5
OnClick = PlayModeNormalBtnClick
end
object PlayModeLoopBtn: TButton
Left = 580
Top = 16
Width = 75
Height = 25
Caption = 'PlayLoop'
TabOrder = 6
OnClick = PlayModeLoopBtnClick
end
object PlayModeRepeatBtn: TButton
Left = 669
Top = 16
Width = 75
Height = 25
Caption = 'Play Repeat'
TabOrder = 7
OnClick = PlayModeRepeatBtnClick
end
object PauseBtn: TButton
Left = 76
Top = 16
Width = 50
Height = 25
Caption = 'Pause'
TabOrder = 8
OnClick = PauseBtnClick
end
end
object RightPanel: TPanel
Left = 415
Top = 0
Width = 349
Height = 472
Align = alRight
BevelOuter = bvNone
TabOrder = 1
object PlayListBox: TListBox
AlignWithMargins = True
Left = 8
Top = 8
Width = 333
Height = 145
Margins.Left = 8
Margins.Top = 8
Margins.Right = 8
Margins.Bottom = 8
Align = alTop
ItemHeight = 13
TabOrder = 0
OnClick = PlayListBoxClick
end
object EventsMemo: TMemo
AlignWithMargins = True
Left = 8
Top = 161
Width = 333
Height = 303
Margins.Left = 8
Margins.Top = 0
Margins.Right = 8
Margins.Bottom = 8
Align = alClient
BevelInner = bvNone
BevelOuter = bvNone
BorderStyle = bsNone
ScrollBars = ssBoth
TabOrder = 1
WordWrap = False
end
end
object LeftPanel: TPanel
Left = 0
Top = 0
Width = 415
Height = 472
Align = alClient
BevelOuter = bvNone
TabOrder = 2
object Player: TPasLibVlcPlayer
AlignWithMargins = True
Left = 8
Top = 8
Width = 407
Height = 396
Margins.Left = 8
Margins.Top = 8
Margins.Right = 0
Margins.Bottom = 8
Align = alClient
VideoOnTop = True
UseOverlay = True
SnapShotFmt = 'png'
OnMediaPlayerEndReached = PlayerMediaPlayerEndReached
OnMediaPlayerTimeChanged = PlayerMediaPlayerTimeChanged
OnMediaPlayerPositionChanged = PlayerMediaPlayerPositionChanged
OnMediaPlayerLengthChanged = PlayerMediaPlayerLengthChanged
end
object InfoPanel: TPanel
Left = 0
Top = 412
Width = 415
Height = 60
Align = alBottom
BevelOuter = bvNone
ParentBackground = False
TabOrder = 1
object TimePanel: TPanel
Left = 0
Top = 0
Width = 415
Height = 17
Align = alTop
BevelOuter = bvNone
TabOrder = 0
end
object TrackBar: TTrackBar
Left = 0
Top = 17
Width = 415
Height = 43
Align = alClient
Max = 100
PageSize = 10
Frequency = 5
TabOrder = 1
OnChange = TrackBarChange
end
end
end
object PasLibVlcMediaList1: TPasLibVlcMediaList
OnItemAdded = PasLibVlcMediaList1ItemAdded
OnItemDeleted = PasLibVlcMediaList1ItemDeleted
OnNextItemSet = PasLibVlcMediaList1NextItemSet
Left = 428
Top = 16
end
end

View File

@@ -0,0 +1,240 @@
(*
* 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
{$IFDEF UNIX}Unix,{$ENDIF}
{$IFDEF MSWINDOWS}Windows,{$ENDIF}
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls,
PasLibVlcUnit, PasLibVlcClassUnit, PasLibVlcPlayerUnit;
type
TMainForm = class(TForm)
Player: TPasLibVlcPlayer;
PasLibVlcMediaList1: TPasLibVlcMediaList;
PlayListBox: TListBox;
BottomPanel: TPanel;
PlayBtn: TButton;
PrevBtn: TButton;
NextBtn: TButton;
StopBtn: TButton;
ClearBtn: TButton;
PlayModeNormalBtn: TButton;
PlayModeLoopBtn: TButton;
PlayModeRepeatBtn: TButton;
RightPanel: TPanel;
EventsMemo: TMemo;
LeftPanel: TPanel;
InfoPanel: TPanel;
TimePanel: TPanel;
TrackBar: TTrackBar;
PauseBtn: TButton;
procedure FormCreate(Sender: TObject);
procedure PlayListBoxClick(Sender: TObject);
procedure PasLibVlcMediaList1NextItemSet(Sender: TObject; mrl: WideString;
item: Pointer; index: Integer);
procedure PasLibVlcMediaList1ItemAdded(Sender: TObject; mrl: WideString;
item: Pointer; index: Integer);
procedure PasLibVlcMediaList1ItemDeleted(Sender: TObject; mrl: WideString;
item: Pointer; index: Integer);
procedure PlayBtnClick(Sender: TObject);
procedure PrevBtnClick(Sender: TObject);
procedure NextBtnClick(Sender: TObject);
procedure StopBtnClick(Sender: TObject);
procedure ClearBtnClick(Sender: TObject);
procedure PlayModeNormalBtnClick(Sender: TObject);
procedure PlayModeLoopBtnClick(Sender: TObject);
procedure PlayModeRepeatBtnClick(Sender: TObject);
procedure PlayerMediaPlayerEndReached(Sender: TObject);
procedure PlayerMediaPlayerPositionChanged(Sender: TObject;
position: Single);
procedure PlayerMediaPlayerLengthChanged(Sender: TObject; time: Int64);
procedure PlayerMediaPlayerTimeChanged(Sender: TObject; time: Int64);
procedure PauseBtnClick(Sender: TObject);
procedure TrackBarChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.PlayModeLoopBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.SetPlayModeLoop();
end;
procedure TMainForm.PlayModeNormalBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.SetPlayModeNormal();
end;
procedure TMainForm.PlayModeRepeatBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.SetPlayModeRepeat();
end;
procedure TMainForm.ClearBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.Clear();
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
// set custom path to libvlc
// Player.VLC.Path := 'C:\Program Files\VideoLAN\VLC';
// connect Player to MediaList
PasLibVlcMediaList1.Player := Player;
// not work in wersion 1.1.11
PasLibVlcMediaList1.Add('http://www.youtube.com/watch?v=Bh_sV058aLU');
PasLibVlcMediaList1.Add('http://www.youtube.com/watch?v=GJbo6ynoxEk');
PasLibVlcMediaList1.Add('..'+PathDelim+'..'+PathDelim+'_testFiles'+PathDelim+'Maximize.mp4');
PasLibVlcMediaList1.Add('..'+PathDelim+'..'+PathDelim+'_testFiles'+PathDelim+'test.ts');
PasLibVlcMediaList1.Add('http://www.miastomuzyki.pl/odbior/rmf_aacp.pls');
PasLibVlcMediaList1.Add('http://www.radio-canada.ca/util/endirect/premiere.asx');
PasLibVlcMediaList1.Add('https://youtu.be/FS31XSBUhlM');
// PasLibVlcMediaList1.Add('http://79.252.173.254:16453/1:0:1:7034:41B:1:C00000:0:0:0:');
Caption := Caption + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
end;
procedure TMainForm.PlayListBoxClick(Sender: TObject);
var
idx: Integer;
item: TObject;
begin
if (PlayListBox.ItemIndex < 0) then exit;
if (PlayListBox.ItemIndex >= PlayListBox.Count) then exit;
// check for item stil exists in play list
item := PlayListBox.Items.Objects[PlayListBox.ItemIndex];
idx := PasLibVlcMediaList1.IndexOfItem(item);
// if exists then play it
if (idx > -1) then
begin
PasLibVlcMediaList1.PlayItem(item);
end;
end;
procedure TMainForm.NextBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.Next();
end;
procedure TMainForm.PasLibVlcMediaList1ItemAdded(Sender: TObject;
mrl: WideString; item: Pointer; index: Integer);
begin
PlayListBox.Items.AddObject(mrl, item);
end;
procedure TMainForm.PasLibVlcMediaList1ItemDeleted(Sender: TObject;
mrl: WideString; item: Pointer; index: Integer);
begin
PlayListBox.Items.Delete(index);
end;
procedure TMainForm.PasLibVlcMediaList1NextItemSet(Sender: TObject;
mrl: WideString; item: Pointer; index: Integer);
begin
if (index < PlayListBox.Count) then
begin
PlayListBox.ItemIndex := index;
end;
EventsMemo.Lines.Add('Play ' + mrl);
end;
procedure TMainForm.PauseBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.Pause();
if (PauseBtn.Caption = 'Pause') then PauseBtn.Caption := 'Resume'
else PauseBtn.Caption := 'Pause';
TrackBar.OnChange := TrackBarChange;
end;
procedure TMainForm.PlayBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.Play();
TrackBar.OnChange := NIL;
end;
procedure TMainForm.PlayerMediaPlayerEndReached(Sender: TObject);
begin
TrackBar.Position := 0;
TimePanel.Caption := '';
end;
procedure TMainForm.PlayerMediaPlayerLengthChanged(Sender: TObject;
time: Int64);
begin
// TrackBar.Max := MaxInt;
TrackBar.Max := time;
TimePanel.Caption := time2str(TrackBar.Position) + ' / ' + time2str(TrackBar.Max);
end;
procedure TMainForm.PlayerMediaPlayerPositionChanged(Sender: TObject;
position: Single);
begin
// TrackBar.Position := Round(MaxInt * position);
end;
procedure TMainForm.PlayerMediaPlayerTimeChanged(Sender: TObject; time: Int64);
begin
TrackBar.Position := time;
TimePanel.Caption := time2str(TrackBar.Position) + ' / ' + time2str(TrackBar.Max);
end;
procedure TMainForm.PrevBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.Prev();
end;
procedure TMainForm.StopBtnClick(Sender: TObject);
begin
PasLibVlcMediaList1.Stop();
end;
procedure TMainForm.TrackBarChange(Sender: TObject);
begin
if Player.CanSeek() then
begin
Player.SetVideoPosInMs(TrackBar.Position);
PlayerMediaPlayerTimeChanged(SELF, TrackBar.Position);
end;
end;
end.

View File

@@ -0,0 +1,53 @@
(*
* 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 DemoPasLibVlcPlayer;
uses
Forms,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\..\source.vcl\PasLibVlcPlayerUnit.pas',
MainFormUnit in 'MainFormUnit.pas' {MainForm},
FullScreenFormUnit in 'FullScreenFormUnit.pas' {FullScreenForm},
SetEqualizerPresetFormUnit in 'SetEqualizerPresetFormUnit.pas' {SetEqualizerPresetForm},
SelectOutputDeviceFormUnit in 'SelectOutputDeviceFormUnit.pas' {SelectOutputDeviceForm},
VideoAdjustFormUnit in 'VideoAdjustFormUnit.pas' {VideoAdjustForm};
{$R *.res}
begin
{$IFDEF DELPHI2007_UP}
ReportMemoryLeaksOnShutdown := TRUE;
{$ENDIF}
Application.Initialize;
{$IFDEF DELPHI2007_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.Title := 'PasLibVlcPlayerDemo' + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0cc0787e-8cd7-4c7f-8614-4fc87cef6130}</ProjectGuid>
<MainSource>DemoPasLibVlcPlayer.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlcPlayer.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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">1045</VersionInfo><VersionInfo Name="CodePage">1250</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="FileDescription">DemoPasLibVlcPlayer</VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">DemoPasLibVlcPlayer</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">DemoPasLibVlcPlayer</VersionInfoKeys><VersionInfoKeys Name="ProductName">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments">robert@prog.olsztyn.pl</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoPasLibVlcPlayer.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoPasLibVlcPlayer.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source.vcl\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source.vc\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source.v\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
<DCCReference Include="FullScreenFormUnit.pas">
<Form>FullScreenForm</Form>
</DCCReference>
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
<DCCReference Include="SelectOutputDeviceFormUnit.pas">
<Form>SelectOutputDeviceForm</Form>
</DCCReference>
<DCCReference Include="SetEqualizerPresetFormUnit.pas">
<Form>SetEqualizerPresetForm</Form>
</DCCReference>
<DCCReference Include="VideoAdjustFormUnit.pas">
<Form>VideoAdjustForm</Form>
</DCCReference>
</ItemGroup>
</Project>

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,61 @@
(*
* 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
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,510 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'PasLibVlcPlayerDemo'
ClientHeight = 548
ClientWidth = 519
Color = clBtnFace
Constraints.MinHeight = 455
Constraints.MinWidth = 435
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PopupMenu = PopupMenu
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnMouseDown = FormMouseDown
OnResize = FormResize
PixelsPerInch = 96
TextHeight = 13
object MrlLab: TLabel
Left = 8
Top = 4
Width = 60
Height = 13
Caption = 'MRL to play:'
FocusControl = MrlEdit
end
object PR: TPanel
Left = 340
Top = 0
Width = 179
Height = 548
Align = alRight
BevelOuter = bvNone
TabOrder = 0
object PlayBtn: TButton
Left = 8
Top = 10
Width = 75
Height = 25
Caption = 'Play'
TabOrder = 0
OnClick = PlayClick
end
object PauseBtn: TButton
Left = 8
Top = 41
Width = 75
Height = 25
Caption = 'Pause'
TabOrder = 1
OnClick = PauseClick
end
object GetWidthBtn: TButton
Left = 8
Top = 99
Width = 75
Height = 25
Caption = 'Get width'
TabOrder = 2
OnClick = GetWidthClick
end
object GetHeightBtn: TButton
Left = 8
Top = 128
Width = 75
Height = 25
Caption = 'Get height'
TabOrder = 3
OnClick = GetHeightBtnClick
end
object GetStateBtn: TButton
Left = 8
Top = 157
Width = 75
Height = 25
Caption = 'Get state'
TabOrder = 4
OnClick = GetStateClick
end
object ResumeBtn: TButton
Left = 8
Top = 70
Width = 75
Height = 25
Caption = 'Resume'
TabOrder = 5
OnClick = ResumeClick
end
object GetPosLenBtn: TButton
Left = 8
Top = 184
Width = 75
Height = 25
Caption = 'Get pos, len'
TabOrder = 6
OnClick = GetPosLenClick
end
object Scale10Btn: TButton
Left = 8
Top = 215
Width = 75
Height = 25
Caption = 'Scale -10%'
TabOrder = 7
OnClick = Scale10Click
end
object ScaleFitBtn: TButton
Left = 8
Top = 244
Width = 75
Height = 25
Caption = 'ScaleFit'
TabOrder = 8
OnClick = ScaleFitClick
end
object SnapShotBtn: TButton
Left = 8
Top = 273
Width = 75
Height = 25
Caption = 'SnapShot'
TabOrder = 9
OnClick = SnapShotClick
end
object NextFrameBtn: TButton
Left = 8
Top = 304
Width = 75
Height = 25
Caption = 'Next Frame'
TabOrder = 10
OnClick = NextFrameClick
end
object GetASpectRatioBtn: TButton
Left = 96
Top = 10
Width = 75
Height = 25
Caption = 'Get Aspect'
TabOrder = 11
OnClick = GetASpectRatioClick
end
object SetAsp11Btn: TButton
Left = 96
Top = 41
Width = 75
Height = 25
Caption = 'Set asp 1:1'
TabOrder = 12
OnClick = SetAsp11Click
end
object SetAsp43Btn: TButton
Left = 96
Top = 70
Width = 75
Height = 25
Caption = 'Set asp 4:3'
TabOrder = 13
OnClick = SetAsp43Click
end
object GetVolume: TButton
Left = 96
Top = 99
Width = 75
Height = 25
Caption = 'Get Volume'
TabOrder = 14
OnClick = GetVolumeClick
end
object SetVolumeUp10: TButton
Left = 96
Top = 128
Width = 75
Height = 25
Caption = 'Volume +10'
TabOrder = 15
OnClick = SetVolumeUp10Click
end
object SetVolumeDo10: TButton
Left = 96
Top = 157
Width = 75
Height = 25
Caption = 'Volume -10'
TabOrder = 16
OnClick = SetVolumeDo10Click
end
object GetPlayRateBtn: TButton
Left = 96
Top = 186
Width = 75
Height = 25
Caption = 'Get Play Rate'
TabOrder = 17
OnClick = GetPlayRateBtnClick
end
object SetPlayRate2xBtn: TButton
Left = 96
Top = 215
Width = 75
Height = 25
Caption = 'Play Rate 2x'
TabOrder = 18
OnClick = SetPlayRate2xBtnClick
end
object SetPlayRateHalfBtn: TButton
Left = 96
Top = 244
Width = 75
Height = 25
Caption = 'Play Rate 1/2'
TabOrder = 19
OnClick = SetPlayRateHalfBtnClick
end
object FullScreenYesBtn: TButton
Left = 96
Top = 273
Width = 75
Height = 25
Caption = 'FullScreen'
TabOrder = 20
OnClick = FullScreenYesBtnClick
end
object DeInterlaceBtn: TButton
Left = 8
Top = 335
Width = 75
Height = 25
Caption = 'DeInterlace'
TabOrder = 21
OnClick = DeInterlaceBtnClick
end
object GetAudioChannel: TButton
Left = 96
Top = 304
Width = 75
Height = 25
Caption = 'Get Audio Ch'
TabOrder = 22
OnClick = GetAudioChannelClick
end
object SetAudioChannelLeft: TButton
Left = 96
Top = 335
Width = 75
Height = 25
Caption = 'Set Audio C L'
TabOrder = 23
OnClick = SetAudioChannelLeftClick
end
object SetAudioChannelRight: TButton
Left = 96
Top = 366
Width = 75
Height = 25
Caption = 'Set Audio C R'
TabOrder = 24
OnClick = SetAudioChannelRightClick
end
object SetAudioChannelStereo: TButton
Left = 96
Top = 397
Width = 75
Height = 25
Caption = 'Set Audio C S'
TabOrder = 26
OnClick = SetAudioChannelStereoClick
end
object GetAudioOutListBtn: TButton
Left = 8
Top = 366
Width = 75
Height = 25
Caption = 'AudioOutList'
TabOrder = 25
OnClick = GetAudioOutListBtnClick
end
object GetAudioOutDevEnumBtn: TButton
Left = 8
Top = 397
Width = 75
Height = 25
Caption = 'AOutDevEnum'
TabOrder = 27
OnClick = GetAudioOutDevEnumBtnClick
end
object SetEqualizerBtn: TButton
Left = 96
Top = 428
Width = 75
Height = 25
Caption = 'Set Equalizer'
TabOrder = 28
OnClick = SetEqualizerBtnClick
end
object GetEqPreListBtn: TButton
Left = 96
Top = 459
Width = 75
Height = 25
Caption = 'EqalizerPreList'
TabOrder = 29
OnClick = GetEqPreListBtnClick
end
object ChAudioOut: TButton
Left = 8
Top = 428
Width = 75
Height = 25
Caption = 'Ch Audio Out'
TabOrder = 30
OnClick = ChAudioOutClick
end
object GetAudioTrackListBtn: TButton
Left = 8
Top = 459
Width = 75
Height = 25
Caption = 'AudioTrackList'
TabOrder = 31
OnClick = GetAudioTrackListBtnClick
end
object GetAudioFilterListBtn: TButton
Left = 8
Top = 490
Width = 75
Height = 25
Caption = 'AudioFilterList'
TabOrder = 32
OnClick = GetAudioFilterListBtnClick
end
object GetVideoFilterListBtn: TButton
Left = 96
Top = 490
Width = 75
Height = 25
Caption = 'VideoFilterList'
TabOrder = 33
OnClick = GetVideoFilterListBtnClick
end
object VideoAdjustBtn: TButton
Left = 8
Top = 521
Width = 75
Height = 25
Caption = 'Video Adjust'
TabOrder = 34
OnClick = VideoAdjustBtnClick
end
end
object LB: TListBox
AlignWithMargins = True
Left = 9
Top = 309
Width = 320
Height = 176
Margins.Left = 8
Margins.Top = 8
Margins.Right = 8
Margins.Bottom = 8
ItemHeight = 13
PopupMenu = LbPopupMenu
TabOrder = 1
end
object MrlEdit: TEdit
Left = 8
Top = 20
Width = 320
Height = 21
TabOrder = 2
Text = '..\..\_testFiles\Maximize.mp4'
end
object PasLibVlcPlayer1: TPasLibVlcPlayer
Left = 8
Top = 45
Height = 202
OnClick = PasLibVlcPlayer1Click
OnDblClick = PasLibVlcPlayer1DblClick
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 = 8
Top = 252
Width = 320
Height = 46
TabOrder = 4
object ProgLabel1: TLabel
AlignWithMargins = True
Left = 4
Top = 28
Width = 44
Height = 13
Align = alLeft
Caption = '00:00:00'
end
object ProgLabel2: TLabel
AlignWithMargins = True
Left = 272
Top = 28
Width = 44
Height = 13
Align = alRight
Caption = '00:00:00'
end
object ProgBar: TTrackBar
Left = 1
Top = 1
Width = 318
Height = 24
Align = alTop
PositionToolTip = ptBottom
TabOrder = 0
ThumbLength = 15
TickStyle = tsNone
OnChange = ProgBarChange
end
end
object BtnSelect: TButton
Left = 280
Top = 21
Width = 46
Height = 19
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 = 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,56 @@
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
ItemHeight = 16
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,90 @@
(*
* 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
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,85 @@
(*
* 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
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.

View File

@@ -0,0 +1,127 @@
object VideoAdjustForm: TVideoAdjustForm
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'Video Adjust'
ClientHeight = 509
ClientWidth = 337
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object labVideoAdjustContrast: TLabel
Left = 20
Top = 52
Width = 76
Height = 13
Caption = 'Adjust Contrast'
FocusControl = tbVideoAdjustContrast
end
object labVideoAdjustBrightness: TLabel
Left = 20
Top = 140
Width = 84
Height = 13
Caption = 'Adjust Brightness'
FocusControl = tbVideoAdjustBrightness
end
object labVideoAdjustHue: TLabel
Left = 20
Top = 228
Width = 53
Height = 13
Caption = 'Adjust Hue'
FocusControl = tbVideoAdjustHue
end
object labVideoAdjustSaturation: TLabel
Left = 20
Top = 316
Width = 84
Height = 13
Caption = 'Adjust Saturation'
FocusControl = tbVideoAdjustSaturation
end
object labVideoAdjustGamma: TLabel
Left = 20
Top = 408
Width = 66
Height = 13
Caption = 'AdjustGamma'
FocusControl = tbVideoAdjustGamma
end
object chkVideoAdjustEnable: TCheckBox
Left = 20
Top = 16
Width = 113
Height = 17
Caption = 'Video Adjust Enable'
TabOrder = 0
OnClick = chkVideoAdjustEnableClick
end
object tbVideoAdjustContrast: TTrackBar
Left = 20
Top = 76
Width = 293
Height = 45
Max = 200
PageSize = 0
Frequency = 10
Position = 100
TabOrder = 1
OnChange = tbVideoAdjustContrastChange
end
object tbVideoAdjustBrightness: TTrackBar
Left = 20
Top = 164
Width = 293
Height = 45
Max = 200
PageSize = 0
Frequency = 10
Position = 100
TabOrder = 2
OnChange = tbVideoAdjustBrightnessChange
end
object tbVideoAdjustHue: TTrackBar
Left = 20
Top = 252
Width = 293
Height = 45
Max = 360
PageSize = 0
Frequency = 10
TabOrder = 3
OnChange = tbVideoAdjustHueChange
end
object tbVideoAdjustSaturation: TTrackBar
Left = 20
Top = 340
Width = 293
Height = 45
Max = 300
PageSize = 0
Frequency = 10
Position = 100
TabOrder = 4
OnChange = tbVideoAdjustSaturationChange
end
object tbVideoAdjustGamma: TTrackBar
Left = 20
Top = 432
Width = 293
Height = 45
Max = 1000
PageSize = 0
Frequency = 50
Position = 100
TabOrder = 5
OnChange = tbVideoAdjustGammaChange
end
end

View File

@@ -0,0 +1,160 @@
(*
* 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 VideoAdjustFormUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TVideoAdjustForm = class(TForm)
chkVideoAdjustEnable: TCheckBox;
tbVideoAdjustContrast: TTrackBar;
labVideoAdjustContrast: TLabel;
tbVideoAdjustBrightness: TTrackBar;
labVideoAdjustBrightness: TLabel;
tbVideoAdjustHue: TTrackBar;
labVideoAdjustHue: TLabel;
tbVideoAdjustSaturation: TTrackBar;
labVideoAdjustSaturation: TLabel;
tbVideoAdjustGamma: TTrackBar;
labVideoAdjustGamma: TLabel;
procedure chkVideoAdjustEnableClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure tbVideoAdjustContrastChange(Sender: TObject);
procedure tbVideoAdjustBrightnessChange(Sender: TObject);
procedure tbVideoAdjustHueChange(Sender: TObject);
procedure tbVideoAdjustSaturationChange(Sender: TObject);
procedure tbVideoAdjustGammaChange(Sender: TObject);
private
FHandleChanges : Boolean;
public
end;
var
VideoAdjustForm: TVideoAdjustForm;
implementation
{$R *.dfm}
uses
MainFormUnit;
procedure TVideoAdjustForm.chkVideoAdjustEnableClick(Sender: TObject);
begin
MainForm.PasLibVlcPlayer1.SetVideoAdjustEnable(chkVideoAdjustEnable.Checked);
tbVideoAdjustContrast.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustContrast.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustBrightness.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustBrightness.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustHue.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustHue.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustSaturation.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustSaturation.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustGamma.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustGamma.Enabled := chkVideoAdjustEnable.Checked;
end;
procedure TVideoAdjustForm.FormShow(Sender: TObject);
begin
FHandleChanges := FALSE;
// chkVideoAdjustEnable.Checked := MainForm.PasLibVlcPlayer1.GetVideoAdjustEnable();
chkVideoAdjustEnableClick(SELF);
with MainForm.PasLibVlcPlayer1 do
begin
tbVideoAdjustContrast.Position := Round(100 * GetVideoAdjustContrast());
tbVideoAdjustBrightness.Position := Round(100 * GetVideoAdjustBrightness());
tbVideoAdjustHue.Position := Round(GetVideoAdjustHue());
tbVideoAdjustSaturation.Position := Round(100 * GetVideoAdjustSaturation());
tbVideoAdjustGamma.Position := Round(100 * GetVideoAdjustGamma());
end;
FHandleChanges := TRUE;
end;
procedure TVideoAdjustForm.tbVideoAdjustBrightnessChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustBrightness(tbVideoAdjustBrightness.Position / 100);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustContrastChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustContrast(tbVideoAdjustContrast.Position / 100);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustGammaChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustGamma(tbVideoAdjustGamma.Position / 100);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustHueChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustHue(tbVideoAdjustHue.Position);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustSaturationChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustSaturation(tbVideoAdjustSaturation.Position);
end;
end;
end;
end.

View File

@@ -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"
*
*)
program DemoPasLibVlcPlayerPauseAtStart;
uses
Forms,
MainFormUnit in 'MainFormUnit.pas' {MainForm},
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcPlayerUnit in '..\..\source\PasLibVlcPlayerUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas';
{$R *.res}
begin
Application.Initialize;
{$IFDEF DELPHI2007_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,82 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{cb35b21c-f0a4-455d-9f7a-e3399520f553}</ProjectGuid>
<MainSource>DemoPasLibVlcPlayerPauseAtStart.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlcPlayerPauseAtStart.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</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">1045</VersionInfo>
<VersionInfo Name="CodePage">1250</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
<Source>
<Source Name="MainSource">DemoPasLibVlcPlayerPauseAtStart.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoPasLibVlcPlayerPauseAtStart.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,40 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'DemoPasLivVlcPlayerPauseAtStart'
ClientHeight = 339
ClientWidth = 414
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object mrlEdit: TEdit
Left = 12
Top = 12
Width = 391
Height = 21
TabOrder = 0
end
object player: TPasLibVlcPlayer
Left = 12
Top = 44
Width = 391
SnapShotFmt = 'png'
OnMediaPlayerTimeChanged = playerMediaPlayerTimeChanged
end
object playButton: TButton
Left = 164
Top = 300
Width = 75
Height = 25
Caption = 'Play'
TabOrder = 2
OnClick = playButtonClick
end
end

View File

@@ -0,0 +1,80 @@
(*
* 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
{$IFDEF UNIX}Unix,{$ENDIF}
{$IFDEF MSWINDOWS}Windows,{$ENDIF}
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, PasLibVlcPlayerUnit;
type
TMainForm = class(TForm)
mrlEdit: TEdit;
player: TPasLibVlcPlayer;
playButton: TButton;
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 *.dfm}
procedure TMainForm.FormCreate(Sender: TObject);
begin
needStop := TRUE;
mrlEdit.Text := '..'+PathDelim+'..'+PathDelim+'_testFiles'+PathDelim+'test.ts';
player.Play(mrlEdit.Text);
end;
procedure TMainForm.playButtonClick(Sender: TObject);
begin
player.Resume();
end;
procedure TMainForm.playerMediaPlayerTimeChanged(Sender: TObject;
time: Int64);
begin
if (needStop) and (time > 100) then
begin
needStop := FALSE;
player.Pause();
end;
end;
end.

View File

@@ -0,0 +1,49 @@
(*
* 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 DemoPlayViaPipe;
uses
Forms,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\..\source.vcl\PasLibVlcPlayerUnit.pas',
MainFormUnit in 'MainFormUnit.pas' {MainForm};
{$R *.res}
begin
{$IFDEF DELPHI2007_UP}
ReportMemoryLeaksOnShutdown := TRUE;
{$ENDIF}
Application.Initialize;
{$IFDEF DELPHI2007_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.Title := 'PasLibVlcDemo';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,79 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{a6a45d80-2711-48be-a5c7-f881477954ff}</ProjectGuid>
<MainSource>DemoPlayViaPipe.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPlayViaPipe.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <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">1045</VersionInfo>
<VersionInfo Name="CodePage">1250</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
<Source>
<Source Name="MainSource">DemoPlayViaPipe.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="DemoPlayViaPipe.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source.vcl\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@@ -0,0 +1,20 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'DemoPlayFromStream'
ClientHeight = 310
ClientWidth = 474
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnActivate = FormActivate
OnCreate = FormCreate
OnDestroy = FormDestroy
PixelsPerInch = 96
TextHeight = 13
end

View File

@@ -0,0 +1,313 @@
(*
* 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
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, PasLibVlcUnit;
const
PIPE_BUFF_SIZE = 1024;
type
TPipeServer = class(TThread)
private
FOverlapped : Boolean;
FStream : TStream;
FPipeName : string;
hEvent : THandle;
hPipe : THandle;
oOverlap : TOverlapped;
fPendingIO : BOOL;
dwState : DWORD;
cbToWrite : DWORD;
cbWritten : DWORD;
fSuccess : BOOL;
dwWait : DWORD;
chBuff : packed array[0..PIPE_BUFF_SIZE-1] of byte;
procedure Execute_non_overlapped();
procedure Execute_overlapped();
protected
procedure Execute(); override;
public
constructor Create(AStream : TStream; pipeName : string; AOverlapped : Boolean = TRUE);
destructor Destroy; override;
end;
type
TMainForm = class(TForm)
procedure FormDestroy(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
pname : string;
stream : TFileStream;
server : TPipeServer;
p_li : libvlc_instance_t_ptr;
p_mi : libvlc_media_player_t_ptr;
public
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
constructor TPipeServer.Create(AStream : TStream; pipeName : string; AOverlapped : Boolean = TRUE);
var
dwPipeMode : DWORD;
begin
inherited Create(TRUE);
FStream := AStream;
FPipeName := pipeName;
FOverlapped := AOverlapped;
dwPipeMode := PIPE_ACCESS_OUTBOUND;
if FOverlapped then
begin
FillChar(oOverlap, sizeof(oOverlap), 0);
hEvent := CreateEvent(NIL, TRUE, TRUE, NIL);
oOverlap.hEvent := hEvent;
dwPipeMode := dwPipeMode or FILE_FLAG_OVERLAPPED;
end;
hPipe := CreateNamedPipe(
PChar(FPipeName),
dwPipeMode,
PIPE_TYPE_MESSAGE or
PIPE_WAIT,
1,
PIPE_BUFF_SIZE,
PIPE_BUFF_SIZE,
50,
NIL);
end;
destructor TPipeServer.Destroy;
begin
CloseHandle(hPipe);
if (FOverlapped) then
begin
CloseHandle(hEvent);
end;
inherited Destroy;
end;
procedure TPipeServer.Execute_non_overlapped;
var
bConn : Bool;
begin
bConn := FALSE;
while not Terminated do
begin
bConn := ConnectNamedPipe(hPipe, NIL);
if bConn then break;
if (GetLastError() = ERROR_PIPE_CONNECTED) then
begin
bConn := TRUE;
break;
end;
end;
if bConn then
begin
while not Terminated do
begin
cbToWrite := FStream.Read(chBuff, PIPE_BUFF_SIZE);
if (cbToWrite < 1) then break;
fSuccess := WriteFile(
hPipe,
chBuff,
cbToWrite,
cbWritten,
NIL);
if (not fSuccess) then break;
if (cbToWrite <> cbWritten) then break;
end;
end;
end;
procedure TPipeServer.Execute_overlapped;
begin
if (ConnectNamedPipe(hPipe, @oOverlap)) then exit;
cbToWrite := 0;
fPendingIO := FALSE;
case GetLastError() of
ERROR_IO_PENDING : fPendingIO := TRUE;
ERROR_PIPE_CONNECTED : if (not SetEvent(oOverlap.hEvent)) then exit;
end;
if (fPendingIO) then dwState := 0 else dwState := 1;
while not Terminated do
begin
dwWait := WaitForSingleObject(hEvent, 50);
if (dwWait = WAIT_TIMEOUT) then continue;
if (dwWait <> WAIT_OBJECT_0) then break;
if (fPendingIO) then
begin
fSuccess := GetOverlappedResult(hPipe, oOverlap, cbWritten, FALSE);
if not fSuccess then break;
if (dwState = 1) then
begin
if (cbWritten <> cbToWrite) then break;
end;
if (dwState = 0) then
begin
dwState := 1;
end;
end;
if (dwState = 1) then
begin
cbToWrite := FStream.Read(chBuff, PIPE_BUFF_SIZE);
if (cbToWrite < 1) then break;
fSuccess := WriteFile(
hPipe,
chBuff,
cbToWrite,
cbWritten,
@oOverlap);
if (fSuccess and (cbWritten = cbToWrite)) then
begin
fPendingIO := FALSE;
continue;
end;
if ((not fSuccess) and (GetLastError() = ERROR_IO_PENDING)) then
begin
fPendingIO := TRUE;
continue;
end;
break;
end;
end;
end;
procedure TPipeServer.Execute();
begin
if (FOverlapped) then Execute_overlapped() else Execute_non_overlapped();
end;
// =============================================================================
procedure TMainForm.FormCreate(Sender: TObject);
var
p_md : libvlc_media_t_ptr;
begin
pname := '\\.\pipe\vlcpipe' + IntToStr(Round(Now() * SecsPerDay));
stream := TFileStream.Create('..\..\_testFiles\test.ts', fmOpenRead);
server := TPipeServer.Create(stream, pname, TRUE);
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
MessageDlg(libvlc_dynamic_dll_error, mtError, [mbOK], 0);
exit;
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
// '--vout=vdummy',
// '--aout=adummy'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
p_mi := NIL;
p_md := libvlc_media_new_location(p_li, PAnsiChar('stream://\' + pname));
if (p_md <> NIL) then
begin
p_mi := libvlc_media_player_new_from_media(p_md);
if (p_mi <> NIL) then
begin
libvlc_media_player_set_display_window(p_mi, SELF.Handle);
end;
libvlc_media_player_play(p_mi);
libvlc_media_release(p_md);
end;
end;
procedure TMainForm.FormActivate(Sender: TObject);
begin
OnActivate := NIL;
Sleep(50);
server.Resume;
end;
procedure TMainForm.FormDestroy(Sender: TObject);
begin
server.Terminate;
server.WaitFor;
server.Free;
if (p_mi <> NIL) then
begin
libvlc_media_player_stop(p_mi);
libvlc_media_player_release(p_mi);
p_mi := NIL;
end;
if (p_li <> NIL) then
begin
libvlc_release(p_li);
p_li := NIL;
end;
stream.Free;
end;
end.

View File

@@ -0,0 +1,103 @@
(*
* 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 DemoStreamScreen;
{$APPTYPE CONSOLE}
{$R *.res}
uses
SysUtils,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas';
const
media_name : PAnsiChar = 'Screen streaming test';
media_input : PAnsiChar = 'screen://';
media_sout : PAnsiChar = '#transcode{vcodec=h264,vb=56,fps=4,scale=1,acodec=mp4a,ab=24,channels=1,samplerate=44100}:http{mux=ts,dst=:8090/}';
// media_sout : PAnsiChar = '#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:rtp{mux=ts,dst=127.0.0.1:8090/}';
// media_sout : PAnsiChar = '#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:http{mux=ts,dst=:8090/}';
// media_sout : PAnsiChar = '#rtp{access=udp,mux=ts,dst=127.0.0.1,port=8090}'; // ,group="Video",name=Jumper Movie"
// media_sout : PAnsiChar = '#standard{access=http,mux=ogg,dst=127.0.0.1:8090}';
var
p_li : libvlc_instance_t_ptr;
begin
{$IFDEF DELPHI2007_UP}
ReportMemoryLeaksOnShutdown := TRUE;
{$ENDIF}
try
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
raise Exception.Create(libvlc_dynamic_dll_error);
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
// '--vout=vdummy',
// '--aout=adummy'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'screen-top=0',
'screen-left=0',
'screen-width=640',
'screen-height=480',
'screen-fps=10'
]) do
begin
libvlc_vlm_add_broadcast(p_li, media_name, media_input, media_sout, ARGC, ARGS, 1, 0);
Free;
end;
// libvlc_vlm_add_broadcast(p_li, media_name, media_input, media_sout, 0, NIL, 1, 0);
libvlc_vlm_play_media(p_li, media_name);
Sleep(60 * 1000);
libvlc_vlm_stop_media(p_li, media_name);
libvlc_vlm_release(p_li);
libvlc_dynamic_dll_done();
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
end.

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{a9bac63e-9ae8-4c22-9046-c6803b648aa9}</ProjectGuid>
<MainSource>DemoStreamScreen.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoStreamScreen.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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">1045</VersionInfo><VersionInfo Name="CodePage">1250</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="FileDescription">DemoStreamScreen</VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">DemoStreamScreen</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">DemoStreamScreen</VersionInfoKeys><VersionInfoKeys Name="ProductName">DemoStreamScreen</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments">robert@prog.olsztyn.pl</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoStreamScreen.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoStreamScreen.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,94 @@
(*
* 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 DemoStreamVideo;
{$APPTYPE CONSOLE}
{$R *.res}
uses
SysUtils,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas';
var
p_li : libvlc_instance_t_ptr;
// https://www.videolan.org/doc/streaming-howto/en/ch04.html
// multiple port streaming
// #transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:duplicate{dst=display,dst=rtp{mux=ts,dst=239.255.12.42,sdp=sap://,name="TestStream"},dst=rtp{mux=ts,dst=192.168.1.2,port=50006}}
const
media_name : PAnsiChar = 'Video streaming test';
media_input : PAnsiChar = '..\..\_testFiles\Maximize.mp4';
// media_sout : PAnsiChar = '#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:http{mux=ts,dst=:8090/maximize.mp4}';
// media_sout : PAnsiChar = '#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:http{mux=ts,dst=:8090/maximize.mp4,sfilter=marq{marquee="MARQUEE",x=10,y=10}}';
// media_sout : PAnsiChar = '#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:http{mux=ts,dst=:8090/maximize.mp4,sfilter=logo{file="..\..\logo1.png",position=10}}';
media_sout : PAnsiChar = '#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100,sfilter={marq{marquee="MARQUEE",x=10,y=10}:logo{file="..\..\logo1.png",position=10}}}:http{mux=ts,dst=:8090/}';
// media_sout : PAnsiChar = '#transcode{vcodec=h264,vb=800,scale=2,acodec=mp3,ab=128,channels=2,samplerate=44100,sfilter={marq{marquee="MARQUEE",x=10,y=10}:logo{file="..\..\logo1.png",position=10}}}:rtp{mux=ts,dst=127.0.0.1,port=8090}';
begin
{$IFDEF DELPHI2007_UP}
ReportMemoryLeaksOnShutdown := TRUE;
{$ENDIF}
try
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
raise Exception.Create(libvlc_dynamic_dll_error);
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
// '--vout=vdummy',
// '--aout=adummy'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
libvlc_vlm_add_broadcast(p_li, media_name, media_input, media_sout, 0, NIL, 1, 1);
libvlc_vlm_play_media(p_li, media_name);
Sleep(60 * 1000);
libvlc_vlm_stop_media(p_li, media_name);
libvlc_vlm_release(p_li);
libvlc_dynamic_dll_done();
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
end.

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0307b428-f503-4958-a037-9e680109b9ec}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoStreamVideo.exe</DCC_DependencyCheckOutputName>
<MainSource>DemoStreamVideo.dpr</MainSource>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<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">1045</VersionInfo><VersionInfo Name="CodePage">1250</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="FileDescription">DemoStreamVideo</VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">DemoStreamVideo</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">DemoStreamVideo</VersionInfoKeys><VersionInfoKeys Name="ProductName">DemoStreamVideo</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments">robert@prog.olsztyn.pl</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoStreamVideo.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoStreamVideo.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,248 @@
(*
* 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 DemoUseLog;
{$APPTYPE CONSOLE}
{$R *.res}
uses
Windows, SysUtils, SyncObjs,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas';
const
DEMO_FILE = '..\..\_testFiles\Maximize.mp4';
var
p_li : libvlc_instance_t_ptr;
p_md : libvlc_media_t_ptr;
p_mi : libvlc_media_player_t_ptr;
f: TextFile;
procedure libvlc_log_cb(
data : Pointer;
level : libvlc_log_level_t;
const ctx : libvlc_log_t_ptr;
const fmt : PAnsiChar;
args : TVaPtrListPtr); cdecl;
var
fmt_chr : AnsiChar;
fmt_idx : Integer;
out_str : AnsiString;
tmp_str : AnsiString;
fmt_str : AnsiString;
fmt_spc : AnsiString;
tmp_chr : PAnsiChar;
begin
out_str := '';
fmt_str := fmt;
if (level = LIBVLC_LOG_DEBUG) then exit;
WriteLn(f, 'fmt: ', fmt); Flush(f);
while (fmt_str <> '') do
begin
fmt_idx := Pos('%', fmt_str);
if (fmt_idx < 1) then break;
out_str := out_str + Copy(fmt_str, 1, fmt_idx-1);
Delete(fmt_str, 1, fmt_idx);
fmt_spc := '';
while (fmt_str <> '') and (fmt_str[1] in ['0'..'9', '.', 'z', 'l', ' ', '+', '-', '#']) do
begin
fmt_spc := fmt_spc + fmt_str[1];
Delete(fmt_str, 1, 1);
end;
if (fmt_str = '') then break;
fmt_chr := fmt_str[1];
Delete(fmt_str, 1, 1);
case fmt_chr of
'%' : begin
out_str := out_str + '%';
continue;
end;
's' : begin
tmp_chr := PAnsiChar(args^);
tmp_str := '';
if (fmt_spc = '4.4') then
begin
if (tmp_chr^ <> #00) then
begin
tmp_str := tmp_str + tmp_chr^; Inc(tmp_chr);
end;
if (tmp_chr^ <> #00) then
begin
tmp_str := tmp_str + tmp_chr^; Inc(tmp_chr);
end;
if (tmp_chr^ <> #00) then
begin
tmp_str := tmp_str + tmp_chr^; Inc(tmp_chr);
end;
if (tmp_chr^ <> #00) then
begin
tmp_str := tmp_str + tmp_chr^; // Inc(tmp_chr);
end;
while (Length(tmp_str) < 4) do
begin
tmp_str := ' ' + tmp_str;
end;
end
else
begin
while (tmp_chr <> NIL) and (tmp_chr^ <> #00) do
begin
tmp_str := tmp_str + tmp_chr^;
Inc(tmp_chr);
end;
end;
out_str := out_str + tmp_str;
end;
'd' : begin
if (fmt_spc = 'll') then
begin
tmp_str := IntToStr(Integer(args^));
end
else
if (fmt_spc = 'l') then
begin
tmp_str := IntToStr(Integer(args^));
end
else
if (fmt_spc = 'z') then
begin
tmp_str := IntToStr(SmallInt(args^));
end
else
begin
tmp_str := IntToStr(Integer(args^));
end;
out_str := out_str + tmp_str;
end;
'i' : begin
tmp_str := IntToStr(Integer(args^));
out_str := out_str + tmp_str;
end;
'u' : begin
if (fmt_spc = 'll') then
begin
tmp_str := IntToStr(Cardinal(args^));
end
else
if (fmt_spc = 'z') then
begin
tmp_str := IntToStr(Word(args^));
end
else
begin
tmp_str := IntToStr(Cardinal(args^));
end;
out_str := out_str + tmp_str;
end;
'x', 'X' : begin
tmp_str := IntToHex(Cardinal(args^), 8);
out_str := out_str + tmp_str;
end;
'f' : begin
tmp_str := Format('%' + fmt_spc + fmt_chr, [Single(args^)]);
out_str := out_str + tmp_str;
end;
end;
Inc(args);
end;
out_str := out_str + fmt_str;
WriteLn(f, 'out: ', out_str); Flush(f);
WriteLn(out_str);
end;
begin
{$IFDEF DELPHI2007_UP}
ReportMemoryLeaksOnShutdown := TRUE;
{$ENDIF}
AssignFile(f, 'dump.txt');
ReWrite(f);
try
SetConsoleOutputCP(65001);
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
raise Exception.Create(libvlc_dynamic_dll_error);
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
libvlc_log_set(p_li, libvlc_log_cb, NIL);
p_md := libvlc_media_new_path(p_li, PAnsiChar(UTF8Encode(DEMO_FILE)));
libvlc_media_parse(p_md);
p_mi := libvlc_media_player_new_from_media(p_md);
libvlc_media_player_play(p_mi);
while (libvlc_media_player_get_state(p_mi) <> libvlc_Ended) do
begin
Sleep(50);
end;
libvlc_media_release(p_md);
libvlc_media_player_release(p_mi);
libvlc_release(p_li);
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
Flush(f);
Close(f);
ReadLn;
end.

View File

@@ -0,0 +1,37 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{4754135a-5f6e-46a6-8c5f-8d5622e9c43f}</ProjectGuid>
<MainSource>DemoUseLog.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoUseLog.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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">1045</VersionInfo><VersionInfo Name="CodePage">1250</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoUseLog.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoUseLog.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,76 @@
fmt: unknown box type %4.4s (incompletely loaded)
out: unknown box type mpod (incompletely loaded)
fmt: elst box found
out: elst box found
fmt: STTS table of %u entries
out: STTS table of 1 entries
fmt: elst box found
out: elst box found
fmt: STTS table of %u entries
out: STTS table of 1 entries
fmt: decoded zero sample
out: decoded zero sample
fmt: DirectWrite initialization failed. Falling back to GDI/Uniscribe
out: DirectWrite initialization failed. Falling back to GDI/Uniscribe
fmt: DirectWrite initialization failed. Falling back to GDI/Uniscribe
out: DirectWrite initialization failed. Falling back to GDI/Uniscribe
fmt: plane %d not aligned: disabling direct rendering
out: plane 0 not aligned: disabling direct rendering
fmt: playback too late (%lld): up-sampling
out: playback too late (88868): up-sampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (186741): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-351381): playing silence
fmt: playback too late (%lld): up-sampling
out: playback too late (72601): up-sampling
fmt: timing screwed (drift: %lld us): stopping resampling
out: timing screwed (drift: 149154 us): stopping resampling
fmt: playback too late (%lld): up-sampling
out: playback too late (178542): up-sampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (211953): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-337853): playing silence
fmt: playback too late (%lld): up-sampling
out: playback too late (76615): up-sampling
fmt: timing screwed (drift: %lld us): stopping resampling
out: timing screwed (drift: 157122 us): stopping resampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (182533): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-342705): playing silence
fmt: playback too late (%lld): up-sampling
out: playback too late (76615): up-sampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (182511): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-325191): playing silence
fmt: playback too late (%lld): up-sampling
out: playback too late (72601): up-sampling
fmt: timing screwed (drift: %lld us): stopping resampling
out: timing screwed (drift: 149109 us): stopping resampling
fmt: playback too late (%lld): up-sampling
out: playback too late (149498): up-sampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (182519): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-331630): playing silence
fmt: playback too late (%lld): up-sampling
out: playback too late (84210): up-sampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (182473): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-339726): playing silence
fmt: playback too late (%lld): up-sampling
out: playback too late (76601): up-sampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (182451): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-356165): playing silence
fmt: playback too late (%lld): up-sampling
out: playback too late (84211): up-sampling
fmt: playback way too late (%lld): flushing buffers
out: playback way too late (190038): flushing buffers
fmt: playback way too early (%lld): playing silence
out: playback way too early (-341018): playing silence

View File

@@ -0,0 +1,218 @@
(*
* 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 DemoVideoCallBacks;
{$APPTYPE CONSOLE}
{$R *.res}
uses
Windows, SysUtils, Graphics, SyncObjs,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas';
const
// DEMO_FILE = '..\..\_testFiles\Maximize.mp4';
// DEMO_FILE = '..\..\_testFiles\test.ts';
DEMO_FILE = '..\..\_testFiles\1941.mp4';
var
p_li : libvlc_instance_t_ptr;
p_md : libvlc_media_t_ptr;
p_mi : libvlc_media_player_t_ptr;
vctx : TVideoCbCtx;
bmpi : TBitmap;
bmpc : LongWord;
function libvlc_video_lock_cb(ptr : Pointer; planes : PVCBPlanes) : Pointer; cdecl;
var
pIdx : Integer;
begin
with PVideoCbCtx(ptr)^ do
begin
lock.Enter;
for pIdx := 0 to VOUT_MAX_PLANES-1 do
begin
planes^[pIdx] := buff_a32[pIdx];
end;
Result := buff_ptr[0];
end;
end;
procedure libvlc_video_unlock_cb(ptr : Pointer; picture : Pointer; planes : PVCBPlanes); cdecl;
begin
with PVideoCbCtx(ptr)^ do
begin
lock.Release;
end;
end;
procedure libvlc_video_display_cb(ptr : Pointer; picture : Pointer); cdecl;
var
y : Integer;
from_ptr : PByte;
pIdx : Integer;
fileNumb : ShortString;
fileName : ShortString;
begin
with PVideoCbCtx(ptr)^ do
begin
lock.Enter;
for pIdx := 0 to VOUT_MAX_PLANES-1 do
begin
if (pIdx > 0) then continue;
from_ptr := buff_a32[pIdx];
for y := 0 to video_h - 1 do
begin
Move(from_ptr^, bmpi.ScanLine[y]^, pitch_w);
Inc(from_ptr, pitch_w_a32);
end;
Inc(bmpc);
Str(bmpc, fileNumb);
fileName := Copy('000000', 1, 6 - Length(fileNumb)) + fileNumb + '_p' + IntToStr(pIdx) + '.bmp';
WriteLn(fileName);
bmpi.SaveToFile(fileName);
end;
lock.Leave;
end;
end;
function libvlc_video_format_cb(var ptr : Pointer; chroma : PAnsiChar; var width : LongWord; var height : LongWord; pitches : PVCBPitches; lines : PVCBLines) : LongWord; cdecl;
begin
chroma^ := AnsiChar('B'); Inc(chroma);
chroma^ := AnsiChar('G'); Inc(chroma);
chroma^ := AnsiChar('R'); Inc(chroma);
chroma^ := AnsiChar('A');
with PVideoCbCtx(ptr)^ do
begin
lock.Enter;
libvlc_video_cb_vctx_set_buffers(PVideoCbCtx(ptr), width, height, 4, pitches, lines);
bmpi.SetSize(video_w, video_h);
lock.Release;
end;
Result := 1;
end;
procedure libvlc_video_cleanup_cb(ptr : Pointer); cdecl;
begin
with PVideoCbCtx(ptr)^ do
begin
lock.Enter;
libvlc_video_cb_vctx_clr_buffers(PVideoCbCtx(ptr));
bmpi.SetSize(0, 0);
lock.Release;
end;
end;
begin
try
FillChar(vctx, sizeof(vctx), 0);
with vctx do
begin
lock := TCriticalSection.Create;
end;
libvlc_video_cb_vctx_set_buffers(@vctx, 320, 240, 4);
bmpi := Graphics.TBitmap.Create;
bmpi.PixelFormat := pf32bit;
bmpi.SetSize(vctx.video_w, vctx.video_h);
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
raise Exception.Create(libvlc_dynamic_dll_error);
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config'
// '--quiet',
// '--no-video-title-show',
// '--no-video-on-top'
// '--vout=vdummy',
// '--aout=adummy'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
p_md := libvlc_media_new_path(p_li, PAnsiChar(UTF8Encode(DEMO_FILE)));
libvlc_media_parse(p_md);
p_mi := libvlc_media_player_new_from_media(p_md);
libvlc_video_set_callbacks(p_mi, libvlc_video_lock_cb, libvlc_video_unlock_cb, libvlc_video_display_cb, @vctx);
// use this for set video size to your needs
// libvlc_video_set_format(p_mi, 'RV32', vctx.video_w, vctx.video_h, vctx.pitch_w);
// use this for handle change video size etc.
libvlc_video_set_format_callbacks(p_mi, libvlc_video_format_cb, libvlc_video_cleanup_cb);
libvlc_media_player_play(p_mi);
while (libvlc_media_player_get_state(p_mi) <> libvlc_Ended) do
begin
Sleep(50);
end;
libvlc_media_release(p_md);
libvlc_media_player_release(p_mi);
libvlc_release(p_li);
WriteLn('Press ENTER to quit...');
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
ReadLn;
end.

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8e4b0d1e-8d26-4f61-9c95-0fc089fee7dd}</ProjectGuid>
<MainSource>DemoVideoCallBacks.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoVideoCallBacks.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
<DCC_UnitSearchPath>.\..\..\source\;.\..\..\source.vcl\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\..\source\;.\..\..\source.vcl\</DCC_ResourcePath>
<DCC_ObjPath>.\..\..\source\;.\..\..\source.vcl\</DCC_ObjPath>
<DCC_IncludePath>.\..\..\source\;.\..\..\source.vcl\</DCC_IncludePath>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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">1045</VersionInfo><VersionInfo Name="CodePage">1250</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="FileDescription">DemoVideoCallBacks</VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">DemoVideoCallBacks</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">DemoVideoCallBacks</VersionInfoKeys><VersionInfoKeys Name="ProductName">DemoVideoCallBacks</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments">robert@prog.olsztyn.pl</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoVideoCallBacks.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoVideoCallBacks.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,124 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{45654adb-d240-4043-a769-10b6e8189706}</ProjectGuid>
</PropertyGroup>
<ItemGroup />
<ItemGroup>
<Projects Include="DemoPasLibVlcMediaListPlayer\DemoPasLibVlcMediaListPlayer.dproj" />
<Projects Include="DemoPasLibVlcPlayerPauseAtStart\DemoPasLibVlcPlayerPauseAtStart.dproj" />
<Projects Include="DemoPasLibVlcPlayer\DemoPasLibVlcPlayer.dproj" />
<Projects Include="DemoPasLibVlc\DemoPasLibVlc.dproj" />
<Projects Include="DemoPlayViaPipe\DemoPlayViaPipe.dproj" />
<Projects Include="DemoStreamScreen\DemoStreamScreen.dproj" />
<Projects Include="DemoStreamVideo\DemoStreamVideo.dproj" />
<Projects Include="DemoUseLog\DemoUseLog.dproj" />
<Projects Include="DemoVideoCallBacks\DemoVideoCallBacks.dproj" />
<Projects Include="PasLibVlcPlayer.dproj" />
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Default.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""><Default.Personality></Default.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Target Name="PasLibVlcPlayer">
<MSBuild Projects="PasLibVlcPlayer.dproj" Targets="" />
</Target>
<Target Name="PasLibVlcPlayer:Clean">
<MSBuild Projects="PasLibVlcPlayer.dproj" Targets="Clean" />
</Target>
<Target Name="PasLibVlcPlayer:Make">
<MSBuild Projects="PasLibVlcPlayer.dproj" Targets="Make" />
</Target>
<Target Name="DemoPasLibVlc">
<MSBuild Projects="DemoPasLibVlc\DemoPasLibVlc.dproj" Targets="" />
</Target>
<Target Name="DemoPasLibVlc:Clean">
<MSBuild Projects="DemoPasLibVlc\DemoPasLibVlc.dproj" Targets="Clean" />
</Target>
<Target Name="DemoPasLibVlc:Make">
<MSBuild Projects="DemoPasLibVlc\DemoPasLibVlc.dproj" Targets="Make" />
</Target>
<Target Name="DemoPasLibVlcPlayer">
<MSBuild Projects="DemoPasLibVlcPlayer\DemoPasLibVlcPlayer.dproj" Targets="" />
</Target>
<Target Name="DemoPasLibVlcPlayer:Clean">
<MSBuild Projects="DemoPasLibVlcPlayer\DemoPasLibVlcPlayer.dproj" Targets="Clean" />
</Target>
<Target Name="DemoPasLibVlcPlayer:Make">
<MSBuild Projects="DemoPasLibVlcPlayer\DemoPasLibVlcPlayer.dproj" Targets="Make" />
</Target>
<Target Name="DemoPasLibVlcPlayerPauseAtStart">
<MSBuild Projects="DemoPasLibVlcPlayerPauseAtStart\DemoPasLibVlcPlayerPauseAtStart.dproj" Targets="" />
</Target>
<Target Name="DemoPasLibVlcPlayerPauseAtStart:Clean">
<MSBuild Projects="DemoPasLibVlcPlayerPauseAtStart\DemoPasLibVlcPlayerPauseAtStart.dproj" Targets="Clean" />
</Target>
<Target Name="DemoPasLibVlcPlayerPauseAtStart:Make">
<MSBuild Projects="DemoPasLibVlcPlayerPauseAtStart\DemoPasLibVlcPlayerPauseAtStart.dproj" Targets="Make" />
</Target>
<Target Name="DemoPasLibVlcMediaListPlayer">
<MSBuild Projects="DemoPasLibVlcMediaListPlayer\DemoPasLibVlcMediaListPlayer.dproj" Targets="" />
</Target>
<Target Name="DemoPasLibVlcMediaListPlayer:Clean">
<MSBuild Projects="DemoPasLibVlcMediaListPlayer\DemoPasLibVlcMediaListPlayer.dproj" Targets="Clean" />
</Target>
<Target Name="DemoPasLibVlcMediaListPlayer:Make">
<MSBuild Projects="DemoPasLibVlcMediaListPlayer\DemoPasLibVlcMediaListPlayer.dproj" Targets="Make" />
</Target>
<Target Name="DemoPlayViaPipe">
<MSBuild Projects="DemoPlayViaPipe\DemoPlayViaPipe.dproj" Targets="" />
</Target>
<Target Name="DemoPlayViaPipe:Clean">
<MSBuild Projects="DemoPlayViaPipe\DemoPlayViaPipe.dproj" Targets="Clean" />
</Target>
<Target Name="DemoPlayViaPipe:Make">
<MSBuild Projects="DemoPlayViaPipe\DemoPlayViaPipe.dproj" Targets="Make" />
</Target>
<Target Name="DemoStreamVideo">
<MSBuild Projects="DemoStreamVideo\DemoStreamVideo.dproj" Targets="" />
</Target>
<Target Name="DemoStreamVideo:Clean">
<MSBuild Projects="DemoStreamVideo\DemoStreamVideo.dproj" Targets="Clean" />
</Target>
<Target Name="DemoStreamVideo:Make">
<MSBuild Projects="DemoStreamVideo\DemoStreamVideo.dproj" Targets="Make" />
</Target>
<Target Name="DemoStreamScreen">
<MSBuild Projects="DemoStreamScreen\DemoStreamScreen.dproj" Targets="" />
</Target>
<Target Name="DemoStreamScreen:Clean">
<MSBuild Projects="DemoStreamScreen\DemoStreamScreen.dproj" Targets="Clean" />
</Target>
<Target Name="DemoStreamScreen:Make">
<MSBuild Projects="DemoStreamScreen\DemoStreamScreen.dproj" Targets="Make" />
</Target>
<Target Name="DemoVideoCallBacks">
<MSBuild Projects="DemoVideoCallBacks\DemoVideoCallBacks.dproj" Targets="" />
</Target>
<Target Name="DemoVideoCallBacks:Clean">
<MSBuild Projects="DemoVideoCallBacks\DemoVideoCallBacks.dproj" Targets="Clean" />
</Target>
<Target Name="DemoVideoCallBacks:Make">
<MSBuild Projects="DemoVideoCallBacks\DemoVideoCallBacks.dproj" Targets="Make" />
</Target>
<Target Name="DemoUseLog">
<MSBuild Projects="DemoUseLog\DemoUseLog.dproj" Targets="" />
</Target>
<Target Name="DemoUseLog:Clean">
<MSBuild Projects="DemoUseLog\DemoUseLog.dproj" Targets="Clean" />
</Target>
<Target Name="DemoUseLog:Make">
<MSBuild Projects="DemoUseLog\DemoUseLog.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="PasLibVlcPlayer;DemoPasLibVlc;DemoPasLibVlcPlayer;DemoPasLibVlcPlayerPauseAtStart;DemoPasLibVlcMediaListPlayer;DemoPlayViaPipe;DemoStreamVideo;DemoStreamScreen;DemoVideoCallBacks;DemoUseLog" />
</Target>
<Target Name="Clean">
<CallTarget Targets="PasLibVlcPlayer:Clean;DemoPasLibVlc:Clean;DemoPasLibVlcPlayer:Clean;DemoPasLibVlcPlayerPauseAtStart:Clean;DemoPasLibVlcMediaListPlayer:Clean;DemoPlayViaPipe:Clean;DemoStreamVideo:Clean;DemoStreamScreen:Clean;DemoVideoCallBacks:Clean;DemoUseLog:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="PasLibVlcPlayer:Make;DemoPasLibVlc:Make;DemoPasLibVlcPlayer:Make;DemoPasLibVlcPlayerPauseAtStart:Make;DemoPasLibVlcMediaListPlayer:Make;DemoPlayViaPipe:Make;DemoStreamVideo:Make;DemoStreamScreen:Make;DemoVideoCallBacks:Make;DemoUseLog:Make" />
</Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project>

View File

@@ -0,0 +1,38 @@
package PasLibVlcPlayer;
{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DESCRIPTION 'PasLibVlcPlayer design time package'}
{$IMPLICITBUILD OFF}
{$DEFINE RELEASE}
requires
vcl,
rtl;
contains
PasLibVlcUnit in '..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\source.vcl\PasLibVlcPlayerUnit.pas';
end.

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{52609e8a-2ed7-44c7-81a5-f5d0b797dcdc}</ProjectGuid>
<MainSource>PasLibVlcPlayer.dpk</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>C:\Documents and Settings\All Users\Dokumenty\RAD Studio\5.0\Bpl\PasLibVlcPlayer.bpl</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
<DCC_UnitSearchPath>.\..\source\</DCC_UnitSearchPath>
<DCC_ResourcePath>.\..\source\</DCC_ResourcePath>
<DCC_ObjPath>.\..\source\</DCC_ObjPath>
<DCC_IncludePath>.\..\source\</DCC_IncludePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="PackageDescription">PasLibVlcPlayer design time package</Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">True</VersionInfo><VersionInfo Name="MajorVer">3</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">6</VersionInfo><VersionInfo Name="Build">202</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">1045</VersionInfo><VersionInfo Name="CodePage">1250</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="FileDescription">PasLibVclPlayer</VersionInfoKeys><VersionInfoKeys Name="FileVersion">3.0.6.202</VersionInfoKeys><VersionInfoKeys Name="InternalName">PasLibVclPlayer</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks">Robert Jędrzejczyk</VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">PasLibVclPlayer</VersionInfoKeys><VersionInfoKeys Name="ProductName">PasLibVclPlayer</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">3.0.6</VersionInfoKeys><VersionInfoKeys Name="Comments">robert@prog.olsztyn.pl</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">PasLibVlcPlayer.dpk</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="PasLibVlcPlayer.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\source.vcl\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\source\PasLibVlcUnit.pas" />
<DCCReference Include="C:\Documents and Settings\robert\rtl40.dcp" />
<DCCReference Include="C:\Documents and Settings\robert\vcl40.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="vcl.dcp" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,40 @@
(*
* 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 DemoPasLibVlc;
uses
Forms,
MainFormUnit in 'MainFormUnit.pas' {MainForm},
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas';
{$R *.RES}
begin
Application.Initialize;
Application.Title := 'DemoPasLibVlc';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

Binary file not shown.

View File

@@ -0,0 +1,181 @@
(*
* 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
Windows,
Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, Menus,
PasLibVlcUnit;
const
MAX_ARGS = 255;
type
TMainForm = class(TForm)
OpenDialog: TOpenDialog;
MainMenu: TMainMenu;
MenuFile: TMenuItem;
MenuFileOpen: TMenuItem;
MenuFileQuit: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure MenuFileOpenClick(Sender: TObject);
procedure MenuFileQuitClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
p_li : libvlc_instance_t_ptr;
p_mi : libvlc_media_player_t_ptr;
procedure PlayerInit();
procedure PlayerPlay(fileName: WideString);
procedure PlayerStop();
procedure PlayerDestroy();
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.PlayerInit();
begin
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
MessageDlg(libvlc_dynamic_dll_error, mtError, [mbOK], 0);
Application.Terminate();
exit;
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
if (p_li <> NIL) then
begin
p_mi := libvlc_media_player_new(p_li);
end;
end;
procedure TMainForm.PlayerPlay(fileName: WideString);
var
p_md: libvlc_media_t_ptr;
begin
if (p_li <> NIL) then
begin
p_md := libvlc_media_new_path(p_li, PAnsiChar(UTF8Encode(fileName)));
if (p_md <> NIL) then
begin
if (p_mi <> NIL) then
begin
libvlc_media_player_set_display_window(p_mi, SELF.Handle);
libvlc_media_player_set_media(p_mi, p_md);
libvlc_media_player_play(p_mi);
end;
libvlc_media_release(p_md);
end;
end;
end;
procedure TMainForm.PlayerStop();
begin
if (p_mi <> NIL) then
begin
if (libvlc_media_player_is_playing(p_mi) = 1) then
begin
libvlc_media_player_stop(p_mi);
Sleep(50);
while (libvlc_media_player_is_playing(p_mi) = 1) do
begin
Sleep(50);
end;
end;
libvlc_media_player_release(p_mi);
p_mi := NIL;
Sleep(50);
end;
end;
procedure TMainForm.PlayerDestroy();
begin
if (p_li <> NIL) then
begin
PlayerStop();
libvlc_release(p_li);
p_li := NIL;
end;
libvlc_dynamic_dll_done();
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
p_li := NIL;
p_mi := NIL;
PlayerInit();
if (libvlc_dynamic_dll_error = '') then
begin
Caption := Caption + ', libvlc: ' + libvlc_dynamic_dll_vlc_version_str;
if (ParamStr(1) <> '') then
begin
PlayerPlay(ParamStr(1));
end;
end;
end;
procedure TMainForm.FormDestroy(Sender: TObject);
begin
PlayerDestroy();
end;
procedure TMainForm.MenuFileOpenClick(Sender: TObject);
begin
if OpenDialog.Execute() then
begin
PlayerPlay(OpenDialog.FileName);
end;
end;
procedure TMainForm.MenuFileQuitClick(Sender: TObject);
begin
Close();
end;
end.

View File

@@ -0,0 +1,41 @@
(*
* 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 DemoPasLibVlcPlayer;
uses
Forms,
MainFormUnit in 'MainFormUnit.pas' {MainForm},
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\..\source.vcl\PasLibVlcPlayerUnit.pas';
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

Binary file not shown.

View File

@@ -0,0 +1,89 @@
(*
* 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
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus, ExtCtrls, PasLibVlcUnit, PasLibVlcPlayerUnit;
type
TMainForm = class(TForm)
MainMenu: TMainMenu;
MenuFile: TMenuItem;
MenuFileOpen: TMenuItem;
MenuFileQuit: TMenuItem;
OpenDialog: TOpenDialog;
PasLibVlcPlayer: TPasLibVlcPlayer;
procedure MenuFileQuitClick(Sender: TObject);
procedure MenuFileOpenClick(Sender: TObject);
procedure PasLibVlcPlayerMediaPlayerMediaChanged(Sender: TObject;
mrl: String);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.DFM}
procedure TMainForm.MenuFileQuitClick(Sender: TObject);
begin
Close();
end;
procedure TMainForm.MenuFileOpenClick(Sender: TObject);
var
logo_file_1 : string;
logo_file_2 : string;
begin
if OpenDialog.Execute() then
begin
PasLibVlcPlayer.Play(OpenDialog.FileName);
logo_file_1 := ExtractFilePath(Application.ExeName) + 'logo1.png';
logo_file_2 := ExtractFilePath(Application.ExeName) + 'logo2.png';
if (FileExists(logo_file_1) and FileExists(logo_file_2)) then
begin
PasLibVlcPlayer.LogoShowFiles([logo_file_1, logo_file_2], libvlc_position_top);
end;
PasLibVlcPlayer.MarqueeShowText('marquee test %H:%M:%S', libvlc_position_bottom);
end;
end;
procedure TMainForm.PasLibVlcPlayerMediaPlayerMediaChanged(Sender: TObject;
mrl: String);
begin
Caption := mrl;
end;
end.

View File

@@ -0,0 +1,26 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = PasLibVlcPlayer.bpl DemoPasLibVlc.exe DemoPasLibVlcPlayer.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
DemoPasLibVlc.exe: DemoPasLibVlc\DemoPasLibVlc.dpr
$(DCC)
DemoPasLibVlcPlayer.exe: DemoPasLibVlcPlayer\DemoPasLibVlcPlayer.dpr
$(DCC)
PasLibVlcPlayer.bpl: PasLibVlcPlayer.dpk
$(DCC)

View File

@@ -0,0 +1,37 @@
package PasLibVlcPlayer;
{$R *.RES}
{$ALIGN ON}
{$ASSERTIONS OFF}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 4}
{$IMAGEBASE $00400000}
{$DESCRIPTION 'PasLibVlcPlayer design time package'}
{$IMPLICITBUILD ON}
{$DEFINE RELEASE}
requires
vcl40;
contains
PasLibVlcUnit in '..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\source.vcl\PasLibVlcPlayerUnit.pas';
end.

View File

@@ -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 DemoPasLibVlc;
uses
Forms,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\..\source.vcl\PasLibVlcPlayerUnit.pas',
MainFormUnit in 'MainFormUnit.pas' {MainForm};
{$R *.res}
begin
Application.Initialize;
Application.Title := 'PasLibVlcDemo';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8da1e076-0f08-4057-b905-f843d99de2ee}</ProjectGuid>
<MainSource>DemoPasLibVlc.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlc.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoPasLibVlc.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoPasLibVlc.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,44 @@
object MainForm: TMainForm
Left = 411
Top = 197
Width = 640
Height = 499
Caption = 'libvlc demo'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Menu = MainMenu
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object OpenDialog: TOpenDialog
DefaultExt = '*.*'
Filter = 'All files|*.*'
Title = 'Select file to play'
Left = 8
Top = 12
end
object MainMenu: TMainMenu
Left = 44
Top = 12
object MenuFile: TMenuItem
Caption = 'File'
object MenuFileOpen: TMenuItem
Caption = 'Open'
ShortCut = 16463
OnClick = MenuFileOpenClick
end
object MenuFileQuit: TMenuItem
Caption = 'Quit'
ShortCut = 16465
OnClick = MenuFileQuitClick
end
end
end
end

View File

@@ -0,0 +1,182 @@
(*
* 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
Windows,
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, Menus, ActiveX,
PasLibVlcUnit;
type
TMainForm = class(TForm)
OpenDialog: TOpenDialog;
MainMenu: TMainMenu;
MenuFile: TMenuItem;
MenuFileOpen: TMenuItem;
MenuFileQuit: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure MenuFileOpenClick(Sender: TObject);
procedure MenuFileQuitClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
p_li : libvlc_instance_t_ptr;
p_mi : libvlc_media_player_t_ptr;
procedure PlayerInit();
procedure PlayerPlay(fileName: WideString);
procedure PlayerStop();
procedure PlayerDestroy();
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.PlayerInit();
begin
// libvlc_dynamic_dll_init_with_path('C:\Program Files\VideoLAN\VLC');
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
MessageDlg(libvlc_dynamic_dll_error, mtError, [mbOK], 0);
Application.Terminate();
exit;
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
if (p_li <> NIL) then
begin
p_mi := libvlc_media_player_new(p_li);
end;
end;
procedure TMainForm.PlayerPlay(fileName: WideString);
var
p_md : libvlc_media_t_ptr;
begin
if (p_li <> NIL) then
begin
p_md := libvlc_media_new_path(p_li, PAnsiChar(UTF8Encode(fileName)));
if (p_md <> NIL) then
begin
if (p_mi <> NIL) then
begin
// libvlc_video_set_key_input(p_mi, 1);
// libvlc_video_set_mouse_input(p_mi, 1);
libvlc_media_player_set_display_window(p_mi, SELF.Handle);
libvlc_media_player_set_media(p_mi, p_md);
libvlc_media_player_play(p_mi);
end;
libvlc_media_release(p_md);
end;
end;
end;
procedure TMainForm.PlayerStop();
begin
if (p_mi <> NIL) then
begin
if (libvlc_media_player_is_playing(p_mi) = 1) then
begin
libvlc_media_player_stop(p_mi);
Sleep(50);
while (libvlc_media_player_is_playing(p_mi) = 1) do
begin
Sleep(50);
end;
end;
libvlc_media_player_release(p_mi);
p_mi := NIL;
Sleep(50);
end;
end;
procedure TMainForm.PlayerDestroy();
begin
if (p_li <> NIL) then
begin
PlayerStop();
libvlc_release(p_li);
p_li := NIL;
end;
libvlc_dynamic_dll_done();
end;
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
PlayerDestroy();
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
p_li := NIL;
p_mi := NIL;
PlayerInit();
if (libvlc_dynamic_dll_error = '') then
begin
Caption := Caption + ', libvlc: ' + libvlc_dynamic_dll_vlc_version_str;
if (ParamStr(1) <> '') then
begin
PlayerPlay(ParamStr(1));
end;
end;
end;
procedure TMainForm.MenuFileOpenClick(Sender: TObject);
begin
if OpenDialog.Execute() then
begin
PlayerPlay(OpenDialog.FileName);
end;
end;
procedure TMainForm.MenuFileQuitClick(Sender: TObject);
begin
Close();
end;
end.

View File

@@ -0,0 +1,49 @@
(*
* 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 DemoPasLibVlcPlayer;
uses
Forms,
PasLibVlcUnit in '..\..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\..\source.vcl\PasLibVlcPlayerUnit.pas',
MainFormUnit in 'MainFormUnit.pas' {MainForm},
FullScreenFormUnit in 'FullScreenFormUnit.pas' {FullScreenForm},
SetEqualizerPresetFormUnit in 'SetEqualizerPresetFormUnit.pas' {SetEqualizerPresetForm},
SelectOutputDeviceFormUnit in 'SelectOutputDeviceFormUnit.pas' {SelectOutputDeviceForm},
VideoAdjustFormUnit in 'VideoAdjustFormUnit.pas' {VideoAdjustForm};
{$R *.res}
begin
Application.Initialize;
Application.Title := 'PasLibVlcPlayerDemo';
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TSetEqualizerPresetForm, SetEqualizerPresetForm);
Application.CreateForm(TSelectOutputDeviceForm, SelectOutputDeviceForm);
Application.CreateForm(TVideoAdjustForm, VideoAdjustForm);
Application.Run;
end.

View File

@@ -0,0 +1,54 @@
<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>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlcPlayer.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<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><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">DemoPasLibVlcPlayer.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="DemoPasLibVlcPlayer.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\PasLibVlcClassUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcPlayerUnit.pas" />
<DCCReference Include="..\..\source\PasLibVlcUnit.pas" />
<DCCReference Include="FullScreenFormUnit.pas">
<Form>FullScreenForm</Form>
</DCCReference>
<DCCReference Include="MainFormUnit.pas">
<Form>MainForm</Form>
</DCCReference>
<DCCReference Include="SelectOutputDeviceFormUnit.pas">
<Form>SelectOutputDeviceForm</Form>
</DCCReference>
<DCCReference Include="SetEqualizerPresetFormUnit.pas">
<Form>SetEqualizerPresetForm</Form>
</DCCReference>
<DCCReference Include="VideoAdjustFormUnit.pas">
<Form>VideoAdjustForm</Form>
</DCCReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,22 @@
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
OnKeyPress = FormKeyPress
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
end

View File

@@ -0,0 +1,61 @@
(*
* 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
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,510 @@
object MainForm: TMainForm
Left = 491
Top = 194
Width = 543
Height = 575
Caption = 'PasLibVlcPlayerDemo'
Color = clBtnFace
Constraints.MinHeight = 455
Constraints.MinWidth = 435
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PopupMenu = PopupMenu
Position = poScreenCenter
OnCreate = FormCreate
OnDestroy = FormDestroy
OnMouseDown = FormMouseDown
OnResize = FormResize
PixelsPerInch = 96
TextHeight = 13
object PR: TPanel
Left = 356
Top = 0
Width = 179
Height = 548
Align = alRight
BevelOuter = bvNone
TabOrder = 0
object PlayBtn: TButton
Left = 8
Top = 10
Width = 75
Height = 25
Caption = 'Play'
TabOrder = 0
OnClick = PlayClick
end
object PauseBtn: TButton
Left = 8
Top = 41
Width = 75
Height = 25
Caption = 'Pause'
TabOrder = 1
OnClick = PauseClick
end
object GetWidthBtn: TButton
Left = 8
Top = 99
Width = 75
Height = 25
Caption = 'Get width'
TabOrder = 2
OnClick = GetWidthClick
end
object GetHeightBtn: TButton
Left = 8
Top = 128
Width = 75
Height = 25
Caption = 'Get height'
TabOrder = 3
OnClick = GetHeightBtnClick
end
object GetStateBtn: TButton
Left = 8
Top = 157
Width = 75
Height = 25
Caption = 'Get state'
TabOrder = 4
OnClick = GetStateClick
end
object ResumeBtn: TButton
Left = 8
Top = 70
Width = 75
Height = 25
Caption = 'Resume'
TabOrder = 5
OnClick = ResumeClick
end
object GetPosLenBtn: TButton
Left = 8
Top = 184
Width = 75
Height = 25
Caption = 'Get pos, len'
TabOrder = 6
OnClick = GetPosLenClick
end
object Scale10Btn: TButton
Left = 8
Top = 215
Width = 75
Height = 25
Caption = 'Scale -10%'
TabOrder = 7
OnClick = Scale10Click
end
object ScaleFitBtn: TButton
Left = 8
Top = 244
Width = 75
Height = 25
Caption = 'ScaleFit'
TabOrder = 8
OnClick = ScaleFitClick
end
object SnapShotBtn: TButton
Left = 8
Top = 273
Width = 75
Height = 25
Caption = 'SnapShot'
TabOrder = 9
OnClick = SnapShotClick
end
object NextFrameBtn: TButton
Left = 8
Top = 304
Width = 75
Height = 25
Caption = 'Next Frame'
TabOrder = 10
OnClick = NextFrameClick
end
object GetASpectRatioBtn: TButton
Left = 96
Top = 10
Width = 75
Height = 25
Caption = 'Get Aspect'
TabOrder = 11
OnClick = GetASpectRatioClick
end
object SetAsp11Btn: TButton
Left = 96
Top = 41
Width = 75
Height = 25
Caption = 'Set asp 1:1'
TabOrder = 12
OnClick = SetAsp11Click
end
object SetAsp43Btn: TButton
Left = 96
Top = 70
Width = 75
Height = 25
Caption = 'Set asp 4:3'
TabOrder = 13
OnClick = SetAsp43Click
end
object GetVolume: TButton
Left = 96
Top = 99
Width = 75
Height = 25
Caption = 'Get Volume'
TabOrder = 14
OnClick = GetVolumeClick
end
object SetVolumeUp10: TButton
Left = 96
Top = 128
Width = 75
Height = 25
Caption = 'Volume +10'
TabOrder = 15
OnClick = SetVolumeUp10Click
end
object SetVolumeDo10: TButton
Left = 96
Top = 157
Width = 75
Height = 25
Caption = 'Volume -10'
TabOrder = 16
OnClick = SetVolumeDo10Click
end
object GetPlayRateBtn: TButton
Left = 96
Top = 186
Width = 75
Height = 25
Caption = 'Get Play Rate'
TabOrder = 17
OnClick = GetPlayRateBtnClick
end
object SetPlayRate2xBtn: TButton
Left = 96
Top = 215
Width = 75
Height = 25
Caption = 'Play Rate 2x'
TabOrder = 18
OnClick = SetPlayRate2xBtnClick
end
object SetPlayRateHalfBtn: TButton
Left = 96
Top = 244
Width = 75
Height = 25
Caption = 'Play Rate 1/2'
TabOrder = 19
OnClick = SetPlayRateHalfBtnClick
end
object FullScreenYesBtn: TButton
Left = 96
Top = 273
Width = 75
Height = 25
Caption = 'FullScreen'
TabOrder = 20
OnClick = FullScreenYesBtnClick
end
object DeInterlaceBtn: TButton
Left = 8
Top = 335
Width = 75
Height = 25
Caption = 'DeInterlace'
TabOrder = 21
OnClick = DeInterlaceBtnClick
end
object GetAudioChannel: TButton
Left = 96
Top = 304
Width = 75
Height = 25
Caption = 'Get Audio Ch'
TabOrder = 22
OnClick = GetAudioChannelClick
end
object SetAudioChannelLeft: TButton
Left = 96
Top = 335
Width = 75
Height = 25
Caption = 'Set Audio C L'
TabOrder = 23
OnClick = SetAudioChannelLeftClick
end
object SetAudioChannelRight: TButton
Left = 96
Top = 366
Width = 75
Height = 25
Caption = 'Set Audio C R'
TabOrder = 24
OnClick = SetAudioChannelRightClick
end
object SetAudioChannelStereo: TButton
Left = 96
Top = 397
Width = 75
Height = 25
Caption = 'Set Audio C S'
TabOrder = 26
OnClick = SetAudioChannelStereoClick
end
object GetAudioOutListBtn: TButton
Left = 8
Top = 366
Width = 75
Height = 25
Caption = 'AudioOutList'
TabOrder = 25
OnClick = GetAudioOutListBtnClick
end
object GetAudioOutDevEnumBtn: TButton
Left = 8
Top = 397
Width = 75
Height = 25
Caption = 'AOutDevEnum'
TabOrder = 27
OnClick = GetAudioOutDevEnumBtnClick
end
object SetEqualizerBtn: TButton
Left = 96
Top = 428
Width = 75
Height = 25
Caption = 'Set Equalizer'
TabOrder = 28
OnClick = SetEqualizerBtnClick
end
object GetEqPreListBtn: TButton
Left = 96
Top = 459
Width = 75
Height = 25
Caption = 'EqalizerPreList'
TabOrder = 29
OnClick = GetEqPreListBtnClick
end
object ChAudioOut: TButton
Left = 8
Top = 428
Width = 75
Height = 25
Caption = 'Ch Audio Out'
TabOrder = 30
OnClick = ChAudioOutClick
end
object GetAudioTrackListBtn: TButton
Left = 8
Top = 459
Width = 75
Height = 25
Caption = 'AudioTrackList'
TabOrder = 31
OnClick = GetAudioTrackListBtnClick
end
object GetAudioFilterListBtn: TButton
Left = 8
Top = 490
Width = 75
Height = 25
Caption = 'AudioFilterList'
TabOrder = 32
OnClick = GetAudioFilterListBtnClick
end
object GetVideoFilterListBtn: TButton
Left = 96
Top = 490
Width = 75
Height = 25
Caption = 'VideoFilterList'
TabOrder = 33
OnClick = GetVideoFilterListBtnClick
end
object VideoAdjustBtn: TButton
Left = 8
Top = 521
Width = 75
Height = 25
Caption = 'Video Adjust'
TabOrder = 34
OnClick = VideoAdjustBtnClick
end
end
object PL: TPanel
Left = 0
Top = 0
Width = 356
Height = 548
Align = alClient
BevelOuter = bvNone
TabOrder = 1
object MrlLab: TLabel
Left = 8
Top = 4
Width = 60
Height = 13
Caption = 'MRL to play:'
FocusControl = MrlEdit
end
object MrlEdit: TEdit
Left = 8
Top = 20
Width = 320
Height = 21
TabOrder = 0
Text = '..\..\_testFiles\Maximize.mp4'
end
object PasLibVlcPlayer1: TPasLibVlcPlayer
Left = 8
Top = 45
Height = 202
OnClick = PasLibVlcPlayer1Click
OnDblClick = PasLibVlcPlayer1DblClick
OnMouseDown = PasLibVlcPlayer1MouseDown
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 = 8
Top = 252
Width = 320
Height = 46
TabOrder = 2
object ProgLabel1: TLabel
Left = 1
Top = 25
Width = 44
Height = 20
Align = alLeft
Caption = '00:00:00'
end
object ProgLabel2: TLabel
Left = 275
Top = 25
Width = 44
Height = 20
Align = alRight
Caption = '00:00:00'
end
object ProgBar: TTrackBar
Left = 1
Top = 1
Width = 318
Height = 24
Align = alTop
TabOrder = 0
ThumbLength = 15
TickStyle = tsNone
OnChange = ProgBarChange
end
end
object LB: TListBox
Left = 9
Top = 309
Width = 320
Height = 176
ItemHeight = 13
PopupMenu = LbPopupMenu
TabOrder = 3
end
object BtnSelect: TButton
Left = 276
Top = 21
Width = 51
Height = 19
Caption = 'Select'
TabOrder = 4
OnClick = BtnSelectClick
end
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
DefaultExt = '*.*'
Filter = 'All files|*.*'
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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
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
ItemHeight = 16
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,90 @@
(*
* 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
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,85 @@
(*
* 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
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.

View File

@@ -0,0 +1,127 @@
object VideoAdjustForm: TVideoAdjustForm
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'Video Adjust'
ClientHeight = 509
ClientWidth = 337
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object labVideoAdjustContrast: TLabel
Left = 20
Top = 52
Width = 76
Height = 13
Caption = 'Adjust Contrast'
FocusControl = tbVideoAdjustContrast
end
object labVideoAdjustBrightness: TLabel
Left = 20
Top = 140
Width = 84
Height = 13
Caption = 'Adjust Brightness'
FocusControl = tbVideoAdjustBrightness
end
object labVideoAdjustHue: TLabel
Left = 20
Top = 228
Width = 53
Height = 13
Caption = 'Adjust Hue'
FocusControl = tbVideoAdjustHue
end
object labVideoAdjustSaturation: TLabel
Left = 20
Top = 316
Width = 84
Height = 13
Caption = 'Adjust Saturation'
FocusControl = tbVideoAdjustSaturation
end
object labVideoAdjustGamma: TLabel
Left = 20
Top = 408
Width = 66
Height = 13
Caption = 'AdjustGamma'
FocusControl = tbVideoAdjustGamma
end
object chkVideoAdjustEnable: TCheckBox
Left = 20
Top = 16
Width = 113
Height = 17
Caption = 'Video Adjust Enable'
TabOrder = 0
OnClick = chkVideoAdjustEnableClick
end
object tbVideoAdjustContrast: TTrackBar
Left = 20
Top = 76
Width = 293
Height = 45
Max = 200
PageSize = 0
Frequency = 10
Position = 100
TabOrder = 1
OnChange = tbVideoAdjustContrastChange
end
object tbVideoAdjustBrightness: TTrackBar
Left = 20
Top = 164
Width = 293
Height = 45
Max = 200
PageSize = 0
Frequency = 10
Position = 100
TabOrder = 2
OnChange = tbVideoAdjustBrightnessChange
end
object tbVideoAdjustHue: TTrackBar
Left = 20
Top = 252
Width = 293
Height = 45
Max = 360
PageSize = 0
Frequency = 10
TabOrder = 3
OnChange = tbVideoAdjustHueChange
end
object tbVideoAdjustSaturation: TTrackBar
Left = 20
Top = 340
Width = 293
Height = 45
Max = 300
PageSize = 0
Frequency = 10
Position = 100
TabOrder = 4
OnChange = tbVideoAdjustSaturationChange
end
object tbVideoAdjustGamma: TTrackBar
Left = 20
Top = 432
Width = 293
Height = 45
Max = 1000
PageSize = 0
Frequency = 50
Position = 100
TabOrder = 5
OnChange = tbVideoAdjustGammaChange
end
end

View File

@@ -0,0 +1,160 @@
(*
* 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 VideoAdjustFormUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TVideoAdjustForm = class(TForm)
chkVideoAdjustEnable: TCheckBox;
tbVideoAdjustContrast: TTrackBar;
labVideoAdjustContrast: TLabel;
tbVideoAdjustBrightness: TTrackBar;
labVideoAdjustBrightness: TLabel;
tbVideoAdjustHue: TTrackBar;
labVideoAdjustHue: TLabel;
tbVideoAdjustSaturation: TTrackBar;
labVideoAdjustSaturation: TLabel;
tbVideoAdjustGamma: TTrackBar;
labVideoAdjustGamma: TLabel;
procedure chkVideoAdjustEnableClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure tbVideoAdjustContrastChange(Sender: TObject);
procedure tbVideoAdjustBrightnessChange(Sender: TObject);
procedure tbVideoAdjustHueChange(Sender: TObject);
procedure tbVideoAdjustSaturationChange(Sender: TObject);
procedure tbVideoAdjustGammaChange(Sender: TObject);
private
FHandleChanges : Boolean;
public
end;
var
VideoAdjustForm: TVideoAdjustForm;
implementation
{$R *.dfm}
uses
MainFormUnit;
procedure TVideoAdjustForm.chkVideoAdjustEnableClick(Sender: TObject);
begin
MainForm.PasLibVlcPlayer1.SetVideoAdjustEnable(chkVideoAdjustEnable.Checked);
tbVideoAdjustContrast.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustContrast.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustBrightness.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustBrightness.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustHue.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustHue.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustSaturation.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustSaturation.Enabled := chkVideoAdjustEnable.Checked;
tbVideoAdjustGamma.Enabled := chkVideoAdjustEnable.Checked;
labVideoAdjustGamma.Enabled := chkVideoAdjustEnable.Checked;
end;
procedure TVideoAdjustForm.FormShow(Sender: TObject);
begin
FHandleChanges := FALSE;
// chkVideoAdjustEnable.Checked := MainForm.PasLibVlcPlayer1.GetVideoAdjustEnable();
chkVideoAdjustEnableClick(SELF);
with MainForm.PasLibVlcPlayer1 do
begin
tbVideoAdjustContrast.Position := Round(100 * GetVideoAdjustContrast());
tbVideoAdjustBrightness.Position := Round(100 * GetVideoAdjustBrightness());
tbVideoAdjustHue.Position := Round(GetVideoAdjustHue());
tbVideoAdjustSaturation.Position := Round(100 * GetVideoAdjustSaturation());
tbVideoAdjustGamma.Position := Round(100 * GetVideoAdjustGamma());
end;
FHandleChanges := TRUE;
end;
procedure TVideoAdjustForm.tbVideoAdjustBrightnessChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustBrightness(tbVideoAdjustBrightness.Position / 100);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustContrastChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustContrast(tbVideoAdjustContrast.Position / 100);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustGammaChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustGamma(tbVideoAdjustGamma.Position / 100);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustHueChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustHue(tbVideoAdjustHue.Position);
end;
end;
end;
procedure TVideoAdjustForm.tbVideoAdjustSaturationChange(Sender: TObject);
begin
if FHandleChanges then
begin
with MainForm.PasLibVlcPlayer1 do
begin
SetVideoAdjustSaturation(tbVideoAdjustSaturation.Position);
end;
end;
end;
end.

View File

@@ -0,0 +1,26 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = PasLibVlcPlayer.bpl DemoPasLibVlc.exe DemoPasLibVlcPlayer.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
DemoPasLibVlc.exe: DemoPasLibVlc\DemoPasLibVlc.dpr
$(DCC)
DemoPasLibVlcPlayer.exe: DemoPasLibVlcPlayer\DemoPasLibVlcPlayer.dpr
$(DCC)
PasLibVlcPlayer.bpl: PasLibVlcPlayer.dpk
$(DCC)

View File

@@ -0,0 +1,38 @@
package PasLibVlcPlayer;
{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DESCRIPTION 'PasLibVlcPlayer design time package'}
{$IMPLICITBUILD ON}
{$DEFINE RELEASE}
requires
vcl,
rtl;
contains
PasLibVlcUnit in '..\source\PasLibVlcUnit.pas',
PasLibVlcClassUnit in '..\source\PasLibVlcClassUnit.pas',
PasLibVlcPlayerUnit in '..\source.vcl\PasLibVlcPlayerUnit.pas';
end.

View File

@@ -0,0 +1,36 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('$(BDS)\bin\CodeGear.Deployment.targets')" Project="$(BDS)\bin\CodeGear.Deployment.targets"/>
<ProjectExtensions>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<PropertyGroup/>
<ItemGroup Condition="'$(Platform)'=='iOSDevice64'"/>
<ItemGroup Condition="'$(Platform)'=='Win64'">
<DeployFile Include="Win64\Debug\DemoPasLibVlc.exe" Condition="'$(Config)'=='Debug'">
<RemoteDir>DemoPasLibVlc\</RemoteDir>
<RemoteName>DemoPasLibVlc.exe</RemoteName>
<DeployClass>ProjectOutput</DeployClass>
<Operation>0</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
<Required>True</Required>
</DeployFile>
<DeployFile Include="Win64\Release\DemoPasLibVlc.exe" Condition="'$(Config)'=='Release'">
<RemoteDir>DemoPasLibVlc\</RemoteDir>
<RemoteName>DemoPasLibVlc.exe</RemoteName>
<DeployClass>ProjectOutput</DeployClass>
<Operation>0</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
<Required>True</Required>
</DeployFile>
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='iOSDevice32'"/>
<ItemGroup Condition="'$(Platform)'=='Win32'"/>
<ItemGroup Condition="'$(Platform)'=='Linux64'"/>
<ItemGroup Condition="'$(Platform)'=='OSX32'"/>
<ItemGroup Condition="'$(Platform)'=='Android'"/>
<ItemGroup Condition="'$(Platform)'=='iOSSimulator'"/>
</Project>

View File

@@ -0,0 +1,41 @@
(*
* 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 DemoPasLibVlc;
uses
Forms,
MainFormUnit in 'MainFormUnit.pas' {MainForm};
{$R *.res}
begin
ReportMemoryLeaksOnShutdown := True;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.Title := 'PasLibVlcDemo' + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,599 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8da1e076-0f08-4057-b905-f843d99de2ee}</ProjectGuid>
<MainSource>DemoPasLibVlc.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DemoPasLibVlc.exe</DCC_DependencyCheckOutputName>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Application</AppType>
<FrameworkType>VCL</FrameworkType>
<ProjectVersion>18.6</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="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
<Cfg_2_Win64>true</Cfg_2_Win64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<VerInfo_Locale>1045</VerInfo_Locale>
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
<SanitizedProjectName>DemoPasLibVlc</SanitizedProjectName>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlc;FileVersion=1.0.0.0;InternalName=DemoPasLibVlc;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlc;ProductName=DemoPasLibVlc;ProductVersion=1.0.0.0;Comments=robert@prog.olsztyn.pl</VerInfo_Keys>
<DCC_UnitSearchPath>.\..\..\source;.\..\..\source.vcl;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
</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=DemoPasLibVlc;FileVersion=1.0.0.65;InternalName=DemoPasLibVlc;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlc;ProductName=DemoPasLibVlc;ProductVersion=1.0.0.0;Comments=robert@prog.olsztyn.pl;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
<VerInfo_Build>65</VerInfo_Build>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<VerInfo_Locale>1033</VerInfo_Locale>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_Build>65</VerInfo_Build>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlc;FileVersion=1.0.0.65;InternalName=DemoPasLibVlc;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlc;ProductName=DemoPasLibVlc;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>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_Build>3</VerInfo_Build>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlc;FileVersion=1.0.0.3;InternalName=DemoPasLibVlc;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlc;ProductName=DemoPasLibVlc;ProductVersion=1.0.0.0;Comments=robert@prog.olsztyn.pl</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_Build>12</VerInfo_Build>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlc;FileVersion=1.0.0.12;InternalName=DemoPasLibVlc;LegalCopyright=Robert Jędrzejczyk;LegalTrademarks=Robert Jędrzejczyk;OriginalFilename=DemoPasLibVlc;ProductName=DemoPasLibVlc;ProductVersion=1.0.0.0;Comments=robert@prog.olsztyn.pl</VerInfo_Keys>
</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">DemoPasLibVlc.dpr</Source>
</Source>
</Delphi.Personality>
<Platforms>
<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>
</Platforms>
<Deployment Version="3">
<DeployFile LocalName="Win32\Release\DemoPasLibVlc.exe" Configuration="Release" Class="ProjectOutput"/>
<DeployFile LocalName="Win64\Debug\DemoPasLibVlc.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win64">
<RemoteName>DemoPasLibVlc.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="Win64\Release\DemoPasLibVlc.exe" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win64">
<RemoteName>DemoPasLibVlc.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</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="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<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="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<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="OSX64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<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="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1024">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1536">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch320">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640x1136">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="ProjectiOSEntitlements"/>
<DeployClass Name="ProjectiOSInfoPList"/>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug"/>
<DeployClass Name="ProjectOSXEntitlements"/>
<DeployClass Name="ProjectOSXInfoPList"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" 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>
<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,43 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'libvlc demo'
ClientHeight = 453
ClientWidth = 632
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Menu = MainMenu
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnDestroy = FormDestroy
PixelsPerInch = 96
TextHeight = 13
object OpenDialog: TOpenDialog
DefaultExt = '*.*'
Title = 'Select file to play'
Left = 8
Top = 12
end
object MainMenu: TMainMenu
Left = 44
Top = 12
object MenuFile: TMenuItem
Caption = 'File'
object MenuFileOpen: TMenuItem
Caption = 'Open'
ShortCut = 16463
OnClick = MenuFileOpenClick
end
object MenuFileQuit: TMenuItem
Caption = 'Quit'
ShortCut = 16465
OnClick = MenuFileQuitClick
end
end
end
end

View File

@@ -0,0 +1,190 @@
(*
* 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
{$IFDEF UNIX}Unix,{$ENDIF}
{$IFDEF MSWINDOWS}Windows,{$ENDIF}
{$IFDEF LCLGTK2}Gtk2, {$IFDEF UNIX}Gdk2x,{$ENDIF}{$ENDIF}
{$IFDEF LCLQT}Qt4, QtWidgets, {$ENDIF}
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, Menus, System.UITypes,
PasLibVlcUnit;
const
MAX_ARGS = 255;
type
TMainForm = class(TForm)
OpenDialog: TOpenDialog;
MainMenu: TMainMenu;
MenuFile: TMenuItem;
MenuFileOpen: TMenuItem;
MenuFileQuit: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure MenuFileOpenClick(Sender: TObject);
procedure MenuFileQuitClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
p_li : libvlc_instance_t_ptr;
p_mi : libvlc_media_player_t_ptr;
procedure PlayerInit();
procedure PlayerStop();
procedure PlayerPlay(fileName: WideString);
procedure PlayerDestroy();
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.PlayerInit();
begin
// libvlc_dynamic_dll_init_with_path('C:\Program Files (x86)\VideoLAN\VLC');
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
MessageDlg(libvlc_dynamic_dll_error, mtError, [mbOK], 0);
Application.Terminate;
exit;
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
if (p_li <> NIL) then
begin
p_mi := libvlc_media_player_new(p_li);
end;
end;
procedure TMainForm.PlayerStop();
begin
if (p_mi <> NIL) then
begin
if (libvlc_media_player_is_playing(p_mi) = 1) then
begin
libvlc_media_player_stop(p_mi);
Sleep(50);
while (libvlc_media_player_is_playing(p_mi) = 1) do
begin
Sleep(50);
end;
end;
libvlc_media_player_release(p_mi);
p_mi := NIL;
Sleep(50);
end;
end;
procedure TMainForm.PlayerPlay(fileName: WideString);
var
p_md : libvlc_media_t_ptr;
begin
if (p_li <> NIL) then
begin
p_md := libvlc_media_new_path(p_li, PAnsiChar(UTF8Encode(fileName)));
if (p_md <> NIL) then
begin
if (p_mi <> NIL) then
begin
// libvlc_video_set_key_input(p_mi, 1);
// libvlc_video_set_mouse_input(p_mi, 1);
libvlc_media_player_set_display_window(p_mi, SELF.Handle);
libvlc_media_player_set_media(p_mi, p_md);
libvlc_media_player_play(p_mi);
end;
libvlc_media_release(p_md);
end;
end;
end;
procedure TMainForm.PlayerDestroy();
begin
if (p_li <> NIL) then
begin
PlayerStop();
libvlc_release(p_li);
p_li := NIL;
end;
libvlc_dynamic_dll_done();
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
p_li := NIL;
p_mi := NIL;
PlayerInit();
Caption := Caption + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
if (libvlc_dynamic_dll_error = '') then
begin
Caption := Caption + ', libvlc: ' + libvlc_dynamic_dll_vlc_version_str;
if (ParamStr(1) <> '') then
begin
PlayerPlay(ParamStr(1));
end;
end;
end;
procedure TMainForm.FormDestroy(Sender: TObject);
begin
PlayerDestroy();
end;
procedure TMainForm.MenuFileOpenClick(Sender: TObject);
begin
if OpenDialog.Execute(SELF.Handle) then
begin
PlayerPlay(OpenDialog.FileName);
OpenDialog.InitialDir := ExtractFilePath(OpenDialog.FileName);
end;
end;
procedure TMainForm.MenuFileQuitClick(Sender: TObject);
begin
Close();
end;
end.

View File

@@ -0,0 +1,26 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('$(BDS)\bin\CodeGear.Deployment.targets')" Project="$(BDS)\bin\CodeGear.Deployment.targets"/>
<ProjectExtensions>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<PropertyGroup/>
<ItemGroup Condition="'$(Platform)'=='iOSDevice64'"/>
<ItemGroup Condition="'$(Platform)'=='Win64'">
<DeployFile Include="Win64\Release\DemoPasLibVlcPlayer.exe" Condition="'$(Config)'=='Release'">
<RemoteDir>DemoPasLibVlcPlayer\</RemoteDir>
<RemoteName>DemoPasLibVlcPlayer.exe</RemoteName>
<DeployClass>ProjectOutput</DeployClass>
<Operation>0</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
<Required>True</Required>
</DeployFile>
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='iOSDevice32'"/>
<ItemGroup Condition="'$(Platform)'=='Win32'"/>
<ItemGroup Condition="'$(Platform)'=='Linux64'"/>
<ItemGroup Condition="'$(Platform)'=='OSX32'"/>
<ItemGroup Condition="'$(Platform)'=='Android'"/>
<ItemGroup Condition="'$(Platform)'=='iOSSimulator'"/>
</Project>

View File

@@ -0,0 +1,46 @@
(*
* 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 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,598 @@
<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.6</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="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
<Cfg_2_Win64>true</Cfg_2_Win64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<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.67;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>67</VerInfo_Build>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_Build>61</VerInfo_Build>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlcPlayer;FileVersion=1.0.0.61;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>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_Build>4</VerInfo_Build>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlcPlayer;FileVersion=1.0.0.4;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>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_Build>5</VerInfo_Build>
<VerInfo_Keys>CompanyName=Robert Jędrzejczyk;FileDescription=DemoPasLibVlcPlayer;FileVersion=1.0.0.5;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>
<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="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</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="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<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="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<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="OSX64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<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="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1024">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1536">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch320">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640x1136">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="ProjectiOSEntitlements"/>
<DeployClass Name="ProjectiOSInfoPList"/>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug"/>
<DeployClass Name="ProjectOSXEntitlements"/>
<DeployClass Name="ProjectOSXInfoPList"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" 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,25 @@
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
ExplicitWidth = 320
ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
end

View File

@@ -0,0 +1,61 @@
(*
* 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
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,483 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'PasLibVlcPlayerDemo'
ClientHeight = 496
ClientWidth = 519
Color = clBtnFace
Constraints.MinHeight = 455
Constraints.MinWidth = 435
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PopupMenu = PopupMenu
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
OnMouseDown = FormMouseDown
OnResize = FormResize
PixelsPerInch = 96
TextHeight = 13
object MrlLab: TLabel
Left = 8
Top = 4
Width = 60
Height = 13
Caption = 'MRL to play:'
FocusControl = MrlEdit
end
object PR: TPanel
Left = 340
Top = 0
Width = 179
Height = 496
Align = alRight
BevelOuter = bvNone
TabOrder = 0
object PlayBtn: TButton
Left = 8
Top = 10
Width = 75
Height = 25
Caption = 'Play'
TabOrder = 0
OnClick = PlayClick
end
object PauseBtn: TButton
Left = 8
Top = 41
Width = 75
Height = 25
Caption = 'Pause'
TabOrder = 1
OnClick = PauseClick
end
object GetWidthBtn: TButton
Left = 8
Top = 99
Width = 75
Height = 25
Caption = 'Get width'
TabOrder = 2
OnClick = GetWidthClick
end
object GetHeightBtn: TButton
Left = 8
Top = 128
Width = 75
Height = 25
Caption = 'Get height'
TabOrder = 3
OnClick = GetHeightBtnClick
end
object GetStateBtn: TButton
Left = 8
Top = 157
Width = 75
Height = 25
Caption = 'Get state'
TabOrder = 4
OnClick = GetStateClick
end
object ResumeBtn: TButton
Left = 8
Top = 70
Width = 75
Height = 25
Caption = 'Resume'
TabOrder = 5
OnClick = ResumeClick
end
object GetPosLenBtn: TButton
Left = 8
Top = 184
Width = 75
Height = 25
Caption = 'Get pos, len'
TabOrder = 6
OnClick = GetPosLenClick
end
object Scale10Btn: TButton
Left = 8
Top = 215
Width = 75
Height = 25
Caption = 'Scale -10%'
TabOrder = 7
OnClick = Scale10Click
end
object ScaleFitBtn: TButton
Left = 8
Top = 244
Width = 75
Height = 25
Caption = 'ScaleFit'
TabOrder = 8
OnClick = ScaleFitClick
end
object SnapShotBtn: TButton
Left = 8
Top = 273
Width = 75
Height = 25
Caption = 'SnapShot'
TabOrder = 9
OnClick = SnapShotClick
end
object NextFrameBtn: TButton
Left = 8
Top = 304
Width = 75
Height = 25
Caption = 'Next Frame'
TabOrder = 10
OnClick = NextFrameClick
end
object GetASpectRatioBtn: TButton
Left = 96
Top = 10
Width = 75
Height = 25
Caption = 'Get Aspect'
TabOrder = 11
OnClick = GetASpectRatioClick
end
object SetAsp11Btn: TButton
Left = 96
Top = 41
Width = 75
Height = 25
Caption = 'Set asp 1:1'
TabOrder = 12
OnClick = SetAsp11Click
end
object SetAsp43Btn: TButton
Left = 96
Top = 70
Width = 75
Height = 25
Caption = 'Set asp 4:3'
TabOrder = 13
OnClick = SetAsp43Click
end
object GetVolume: TButton
Left = 96
Top = 99
Width = 75
Height = 25
Caption = 'Get Volume'
TabOrder = 14
OnClick = GetVolumeClick
end
object SetVolumeUp10: TButton
Left = 96
Top = 128
Width = 75
Height = 25
Caption = 'Volume +10'
TabOrder = 15
OnClick = SetVolumeUp10Click
end
object SetVolumeDo10: TButton
Left = 96
Top = 157
Width = 75
Height = 25
Caption = 'Volume -10'
TabOrder = 16
OnClick = SetVolumeDo10Click
end
object GetPlayRateBtn: TButton
Left = 96
Top = 186
Width = 75
Height = 25
Caption = 'Get Play Rate'
TabOrder = 17
OnClick = GetPlayRateBtnClick
end
object SetPlayRate2xBtn: TButton
Left = 96
Top = 215
Width = 75
Height = 25
Caption = 'Play Rate 2x'
TabOrder = 18
OnClick = SetPlayRate2xBtnClick
end
object SetPlayRateHalfBtn: TButton
Left = 96
Top = 244
Width = 75
Height = 25
Caption = 'Play Rate 1/2'
TabOrder = 19
OnClick = SetPlayRateHalfBtnClick
end
object FullScreenYesBtn: TButton
Left = 96
Top = 273
Width = 75
Height = 25
Caption = 'FullScreen'
TabOrder = 20
OnClick = FullScreenYesBtnClick
end
object DeInterlaceBtn: TButton
Left = 8
Top = 335
Width = 75
Height = 25
Caption = 'DeInterlace'
TabOrder = 21
OnClick = DeInterlaceBtnClick
end
object GetAudioChannel: TButton
Left = 96
Top = 304
Width = 75
Height = 25
Caption = 'Get Audio Ch'
TabOrder = 22
OnClick = GetAudioChannelClick
end
object SetAudioChannelLeft: TButton
Left = 96
Top = 335
Width = 75
Height = 25
Caption = 'Set Audio C L'
TabOrder = 23
OnClick = SetAudioChannelLeftClick
end
object SetAudioChannelRight: TButton
Left = 96
Top = 366
Width = 75
Height = 25
Caption = 'Set Audio C R'
TabOrder = 24
OnClick = SetAudioChannelRightClick
end
object SetAudioChannelStereo: TButton
Left = 96
Top = 397
Width = 75
Height = 25
Caption = 'Set Audio C S'
TabOrder = 26
OnClick = SetAudioChannelStereoClick
end
object GetAudioOutListBtn: TButton
Left = 8
Top = 366
Width = 75
Height = 25
Caption = 'AudioOutList'
TabOrder = 25
OnClick = GetAudioOutListBtnClick
end
object GetAudioOutDevEnumBtn: TButton
Left = 8
Top = 397
Width = 75
Height = 25
Caption = 'AOutDevEnum'
TabOrder = 27
OnClick = GetAudioOutDevEnumBtnClick
end
object GetEqPreListBtn: TButton
Left = 96
Top = 459
Width = 75
Height = 25
Caption = 'EqalizerPreList'
TabOrder = 28
OnClick = GetEqPreListBtnClick
end
object SetEqualizerBtn: TButton
Left = 96
Top = 428
Width = 75
Height = 25
Caption = 'Set Equalizer'
TabOrder = 29
OnClick = SetEqualizerBtnClick
end
object ChAudioOut: TButton
Left = 8
Top = 428
Width = 75
Height = 25
Caption = 'Ch Audio Out'
TabOrder = 30
OnClick = ChAudioOutClick
end
object GetAudioTrackList: TButton
Left = 8
Top = 459
Width = 75
Height = 25
Caption = 'AudioTrackList'
TabOrder = 31
OnClick = GetAudioTrackListClick
end
end
object LB: TListBox
AlignWithMargins = True
Left = 9
Top = 309
Width = 320
Height = 176
Margins.Left = 8
Margins.Top = 8
Margins.Right = 8
Margins.Bottom = 8
ItemHeight = 13
PopupMenu = LbPopupMenu
TabOrder = 1
end
object MrlEdit: TEdit
Left = 8
Top = 20
Width = 320
Height = 21
TabOrder = 2
end
object PasLibVlcPlayer1: TPasLibVlcPlayer
Left = 8
Top = 45
Height = 202
OnClick = PasLibVlcPlayer1Click
OnDblClick = PasLibVlcPlayer1DblClick
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 = 8
Top = 252
Width = 320
Height = 46
TabOrder = 4
object ProgLabel1: TLabel
AlignWithMargins = True
Left = 4
Top = 28
Width = 44
Height = 14
Align = alLeft
Caption = '00:00:00'
ExplicitHeight = 13
end
object ProgLabel2: TLabel
AlignWithMargins = True
Left = 272
Top = 28
Width = 44
Height = 14
Align = alRight
Caption = '00:00:00'
ExplicitHeight = 13
end
object ProgBar: TTrackBar
Left = 1
Top = 1
Width = 318
Height = 24
Align = alTop
PositionToolTip = ptBottom
TabOrder = 0
ThumbLength = 15
TickStyle = tsNone
OnChange = ProgBarChange
end
end
object BtnSelect: TButton
Left = 272
Top = 19
Width = 56
Height = 22
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 = 280
Top = 68
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,994 @@
(*
* 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
{$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);
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(TFileStream.Create(MrlEdit.Text, fmOpenRead), [libvlc_media_record_str('c:\Users\robert\Desktop\stream.mp4', '', '', 0, 0, 0, '', 0, 0, 0, TRUE)]);
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('MediaPlayerAudioVolume: ' + 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: ' + IntToStr(time));
ProgLabel1.Caption := time2str(time, 'hh:mm:ss.ms');
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.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,
MrlEdit.Top,
BtnSelect.Width,
MrlEdit.Height
);
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,90 @@
(*
* 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
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,85 @@
(*
* 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
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.

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<%appSandboxKeys%>
</dict>
</plist>

View File

@@ -0,0 +1,5 @@
FmxDemoPasLibVlc.app\../\FmxDemoPasLibVlc.entitlements
FmxDemoPasLibVlc.app\Contents\MacOS\libcgunwind.1.0.dylib
FmxDemoPasLibVlc.app\Contents\Resources\FmxDemoPasLibVlc.icns
FmxDemoPasLibVlc.app\Contents\Info.plist
FmxDemoPasLibVlc.app\Contents\MacOS\FmxDemoPasLibVlc

View File

@@ -0,0 +1,106 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('$(BDS)\bin\CodeGear.Deployment.targets')" Project="$(BDS)\bin\CodeGear.Deployment.targets"/>
<ProjectExtensions>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<ItemGroup Condition="'$(Platform)'=='Android'"/>
<ItemGroup Condition="'$(Platform)'=='iOSDevice'"/>
<ItemGroup Condition="'$(Platform)'=='Win32'">
<DeployFile Include="Win32\Debug\FmxDemoPasLibVlc.exe" Condition="'$(Config)'=='Debug'">
<RemoteDir>FmxDemoPasLibVlc\</RemoteDir>
<RemoteName>FmxDemoPasLibVlc.exe</RemoteName>
<Operation>0</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
<Required>True</Required>
</DeployFile>
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='OSX32'">
<DeployFile Include="OSX32\Debug\FmxDemoPasLibVlc.info.plist" Condition="'$(Config)'=='Debug'">
<RemoteDir>FmxDemoPasLibVlc.app\Contents\</RemoteDir>
<RemoteName>Info.plist</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
<DeployFile Include="OSX32\Release\FmxDemoPasLibVlc.entitlements" Condition="'$(Config)'=='Release'">
<RemoteDir>FmxDemoPasLibVlc.app\../\</RemoteDir>
<RemoteName>FmxDemoPasLibVlc.entitlements</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
<DeployFile Include="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib">
<RemoteDir>FmxDemoPasLibVlc.app\Contents\MacOS\</RemoteDir>
<RemoteName>libcgunwind.1.0.dylib</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
<DeployFile Include="$(BDS)\bin\delphi_PROJECTICNS.icns" Condition="'$(Config)'=='Debug'">
<RemoteDir>FmxDemoPasLibVlc.app\Contents\Resources\</RemoteDir>
<RemoteName>FmxDemoPasLibVlc.icns</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
<DeployFile Include="$(BDS)\bin\delphi_PROJECTICNS.icns" Condition="'$(Config)'=='Release'">
<RemoteDir>FmxDemoPasLibVlc.app\Contents\Resources\</RemoteDir>
<RemoteName>FmxDemoPasLibVlc.icns</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
<DeployFile Include="OSX32\Release\FmxDemoPasLibVlc.info.plist" Condition="'$(Config)'=='Release'">
<RemoteDir>FmxDemoPasLibVlc.app\Contents\</RemoteDir>
<RemoteName>Info.plist</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
<DeployFile Include="OSX32\Debug\FmxDemoPasLibVlc" Condition="'$(Config)'=='Debug'">
<RemoteDir>FmxDemoPasLibVlc.app\Contents\MacOS\</RemoteDir>
<RemoteName>FmxDemoPasLibVlc</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
<Required>True</Required>
</DeployFile>
<DeployFile Include="OSX32\Debug\FmxDemoPasLibVlc.entitlements" Condition="'$(Config)'=='Debug'">
<RemoteDir>FmxDemoPasLibVlc.app\../\</RemoteDir>
<RemoteName>FmxDemoPasLibVlc.entitlements</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
<DeployFile Include="OSX32\Release\FmxDemoPasLibVlc" Condition="'$(Config)'=='Release'">
<RemoteDir>FmxDemoPasLibVlc.app\Contents\MacOS\</RemoteDir>
<RemoteName>FmxDemoPasLibVlc</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
<Required>True</Required>
</DeployFile>
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='iOSSimulator'">
<DeployFile Include="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib">
<RemoteDir>FmxDemoPasLibVlc.app\</RemoteDir>
<RemoteName>libcgunwind.1.0.dylib</RemoteName>
<Operation>1</Operation>
<LocalCommand/>
<RemoteCommand/>
<Overwrite>True</Overwrite>
</DeployFile>
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='Win64'"/>
</Project>

View File

@@ -0,0 +1,41 @@
(*
* 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 FmxDemoPasLibVlc;
uses
System.StartUpCopy,
FMX.Forms,
MainFormUnit in 'MainFormUnit.pas' {MainForm};
{$R *.res}
begin
ReportMemoryLeaksOnShutdown := True;
Application.Initialize;
Application.Title := 'FmxDemoPasLibVlc' + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
inherited MainForm_LgXhdpiPh: TMainForm_LgXhdpiPh
ClientHeight = 695
ClientWidth = 450
DesignerMasterStyle = 0
end

View File

@@ -0,0 +1,5 @@
inherited MainForm_SmXhdpiPh: TMainForm_SmXhdpiPh
ClientHeight = 375
ClientWidth = 250
DesignerMasterStyle = 0
end

View File

@@ -0,0 +1,5 @@
inherited MainForm_Surface: TMainForm_Surface
ClientHeight = 1920
ClientWidth = 1080
DesignerMasterStyle = 0
end

View File

@@ -0,0 +1,3 @@
inherited MainForm_Windows: TMainForm_Windows
DesignerMasterStyle = 0
end

View File

@@ -0,0 +1,39 @@
object MainForm: TMainForm
Left = 0
Top = 0
Caption = 'FmxDemoPasLibVlc'
ClientHeight = 480
ClientWidth = 640
Position = ScreenCenter
FormFactor.Width = 320
FormFactor.Height = 480
FormFactor.Devices = [Desktop]
OnActivate = FormActivate
OnCreate = FormCreate
OnClose = FormClose
DesignerMasterStyle = 0
object MainMenu: TMainMenu
Left = 128
Top = 80
object MenuFile: TMenuItem
Text = 'File'
object MenuOpen: TMenuItem
Locked = True
ShortCut = 16463
Text = 'Open'
OnClick = MenuOpenClick
end
object MenuQuit: TMenuItem
Locked = True
ShortCut = 16465
Text = 'Quit'
OnClick = MenuQuitClick
end
end
end
object OpenDialog: TOpenDialog
InitialDir = 'C:\_LibXE\vlc\_testFiles'
Left = 40
Top = 80
end
end

View File

@@ -0,0 +1,5 @@
inherited MainForm_iPad: TMainForm_iPad
ClientHeight = 1004
ClientWidth = 768
DesignerMasterStyle = 0
end

View File

@@ -0,0 +1,5 @@
inherited MainForm_iPhone55in: TMainForm_iPhone55in
ClientHeight = 716
ClientWidth = 414
DesignerMasterStyle = 0
end

View File

@@ -0,0 +1,238 @@
(*
* 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
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Menus,
{$IFDEF MSWINDOWS}
FMX.Platform.Win,
{$ENDIF}
{$IFDEF MACOS}
FMX.Platform.Mac,
Macapi.AppKit,
Macapi.CocoaTypes,
Macapi.Foundation,
Macapi.Helpers,
Macapi.ObjectiveC,
Macapi.CoreGraphics,
Macapi.CoreFoundation,
{$ENDIF}
FMX.StdCtrls, FMX.Viewport3D, FMX.Objects, FMX.Media,
FMX.ExtCtrls, FMX.Advertising,
PasLibVlcUnit;
type
TMainForm = class(TForm)
MainMenu: TMainMenu;
MenuFile: TMenuItem;
MenuOpen: TMenuItem;
OpenDialog: TOpenDialog;
MenuQuit: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure MenuOpenClick(Sender: TObject);
procedure MenuQuitClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormActivate(Sender: TObject);
private
p_li : libvlc_instance_t_ptr;
p_mi : libvlc_media_t_ptr;
public
procedure PlayerInit();
procedure PlayerStop();
procedure PlayerPlay(fileName: WideString);
procedure PlayerDestroy();
end;
var
MainForm: TMainForm;
implementation
{$R *.fmx}
{$R *.Windows.fmx MSWINDOWS}
{$R *.Surface.fmx MSWINDOWS}
{$R *.SmXhdpiPh.fmx ANDROID}
{$R *.LgXhdpiPh.fmx ANDROID}
{$R *.iPad.fmx IOS}
{$R *.iPhone55in.fmx IOS}
procedure TMainForm.PlayerInit();
begin
// libvlc_dynamic_dll_init_with_path('C:\Program Files (x86)\VideoLAN\VLC');
libvlc_dynamic_dll_init();
if (libvlc_dynamic_dll_error <> '') then
begin
ShowMessage(libvlc_dynamic_dll_error);
Application.Terminate;
exit;
end;
with TArgcArgs.Create([
libvlc_dynamic_dll_path,
'--intf=dummy',
'--ignore-config',
'--quiet',
'--no-video-title-show',
'--no-video-on-top'
]) do
begin
p_li := libvlc_new(ARGC, ARGS);
Free;
end;
if (p_li <> NIL) then
begin
p_mi := libvlc_media_player_new(p_li);
end;
end;
procedure TMainForm.PlayerStop();
begin
if (p_mi <> NIL) then
begin
if (libvlc_media_player_is_playing(p_mi) = 1) then
begin
libvlc_media_player_stop(p_mi);
Sleep(50);
while (libvlc_media_player_is_playing(p_mi) = 1) do
begin
Sleep(50);
end;
end;
libvlc_media_player_release(p_mi);
p_mi := NIL;
Sleep(50);
end;
end;
procedure TMainForm.PlayerPlay(fileName: WideString);
var
p_md : libvlc_media_t_ptr;
begin
if (p_li <> NIL) then
begin
p_md := libvlc_media_new_path(p_li, PAnsiChar(UTF8Encode(fileName)));
if (p_md <> NIL) then
begin
if (p_mi <> NIL) then
begin
// libvlc_video_set_key_input(p_mi, 1);
// libvlc_video_set_mouse_input(p_mi, 1);
{$IFDEF MSWINDOWS}
libvlc_media_player_set_display_window(p_mi, WindowHandleToPlatform(MainForm.Handle).Wnd);
{$ENDIF}
{$IFDEF MACOS}
libvlc_media_player_set_display_window(p_mi, WindowHandleToPlatform(MainForm.Handle).View.superview);
{$ENDIF}
libvlc_media_player_set_media(p_mi, p_md);
libvlc_media_player_play(p_mi);
end;
libvlc_media_release(p_md);
end;
end;
end;
procedure TMainForm.PlayerDestroy();
begin
if (p_li <> NIL) then
begin
PlayerStop();
libvlc_release(p_li);
p_li := NIL;
end;
libvlc_dynamic_dll_done();
end;
procedure TMainForm.FormActivate(Sender: TObject);
{$IFDEF MACOS}
var
windowHandle : TMacWindowHandle;
size : NSSize;
begin
windowHandle := WindowHandleToPlatform( Handle );
// set the minimum size of the window
size.width := 512;
size.height := 512;
windowHandle.Wnd.setContentMinSize( size );
// set the maximum size of the window
size.width := 1024;
size.height := 768;
windowHandle.Wnd.setContentMaxSize( size );
// set window remember screen size
windowHandle.Wnd.setFrameAutosaveName(StrToNSStr('MainForm'));
// Allow dragging of an FMX form by clicking anywhere in the client area, not just the title bar
windowHandle.Wnd.setMovableByWindowBackground( true );
end;
{$ELSE}
begin
end;
{$ENDIF}
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
PlayerDestroy();
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
p_li := NIL;
p_mi := NIL;
PlayerInit();
Caption := Caption + ' - ' + {$IFDEF CPUX64}'64'{$ELSE}'32'{$ENDIF} + ' bit';
if (libvlc_dynamic_dll_error = '') then
begin
Caption := Caption + ', libvlc: ' + libvlc_dynamic_dll_vlc_version_str;
if (ParamStr(1) <> '') then
begin
PlayerPlay(ParamStr(1));
end;
end;
end;
procedure TMainForm.MenuOpenClick(Sender: TObject);
begin
if OpenDialog.Execute() then
begin
PlayerPlay(OpenDialog.FileName);
OpenDialog.InitialDir := ExtractFilePath(OpenDialog.FileName);
end;
end;
procedure TMainForm.MenuQuitClick(Sender: TObject);
begin
Application.Terminate;
end;
end.

View File

@@ -0,0 +1,13 @@
object PlayForm: TPlayForm
Left = 0
Top = 0
Border.Styling = False
BorderIcons = []
Caption = 'Form1'
ClientHeight = 200
ClientWidth = 200
FormFactor.Width = 320
FormFactor.Height = 480
FormFactor.Devices = [Desktop]
DesignerMasterStyle = 0
end

Some files were not shown because too many files have changed in this diff Show More