You've already forked lazarus-ccr
mplayer: moved example to Simple Use
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3218 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 134 KiB |
@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="MPlayerControlLaz"/>
|
||||
<MinVersion Valid="True"/>
|
||||
<DefaultFilename Value="../mplayercontrollaz.lpk"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
@ -1,21 +0,0 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, MPlayerControlLaz, LResources
|
||||
{ you can add units after this };
|
||||
|
||||
//{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
|
||||
|
||||
begin
|
||||
{$I project1.lrs}
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="CompanyName.ProductName.YourApp" type="win32"/>
|
||||
<description>Your application description here.</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
@ -1,7 +0,0 @@
|
||||
#define RT_MANIFEST 24
|
||||
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
|
||||
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
|
||||
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
|
||||
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "project1.manifest"
|
||||
MAINICON ICON "project1.ico"
|
@ -1,89 +0,0 @@
|
||||
object Form1: TForm1
|
||||
Left = 290
|
||||
Height = 390
|
||||
Top = 189
|
||||
Width = 583
|
||||
ActiveControl = Panel1
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 390
|
||||
ClientWidth = 583
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.0.14.0'
|
||||
object MPlayerControl1: TMPlayerControl
|
||||
Left = 6
|
||||
Height = 334
|
||||
Top = 27
|
||||
Width = 571
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 6
|
||||
Loop = 0
|
||||
Volume = 0
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 0
|
||||
Width = 583
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
ClientHeight = 21
|
||||
ClientWidth = 583
|
||||
TabOrder = 1
|
||||
object PlaySpeedButton: TSpeedButton
|
||||
Left = 1
|
||||
Height = 19
|
||||
Top = 1
|
||||
Width = 26
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
Caption = 'Play'
|
||||
NumGlyphs = 0
|
||||
OnClick = PlaySpeedButtonClick
|
||||
end
|
||||
object PauseSpeedButton: TSpeedButton
|
||||
Left = 27
|
||||
Height = 19
|
||||
Top = 1
|
||||
Width = 35
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
Caption = 'Pause'
|
||||
NumGlyphs = 0
|
||||
OnClick = PauseSpeedButtonClick
|
||||
end
|
||||
object StopSpeedButton: TSpeedButton
|
||||
Left = 62
|
||||
Height = 19
|
||||
Top = 1
|
||||
Width = 28
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
Caption = 'Stop'
|
||||
NumGlyphs = 0
|
||||
OnClick = StopSpeedButtonClick
|
||||
end
|
||||
object OpenSpeedButton: TSpeedButton
|
||||
Left = 90
|
||||
Height = 19
|
||||
Top = 1
|
||||
Width = 52
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
Caption = 'Open file'
|
||||
NumGlyphs = 0
|
||||
OnClick = OpenSpeedButtonClick
|
||||
end
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 367
|
||||
Width = 583
|
||||
Panels = <>
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Options = [ofFileMustExist, ofEnableSizing, ofViewDetail]
|
||||
left = 235
|
||||
top = 127
|
||||
end
|
||||
end
|
@ -1,27 +0,0 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'"'#1#6'Height'#3#134#1#3'Top'#3#189#0#5'W'
|
||||
+'idth'#3'G'#2#13'ActiveControl'#7#6'Panel1'#7'Caption'#6#5'Form1'#12'ClientH'
|
||||
+'eight'#3#134#1#11'ClientWidth'#3'G'#2#8'OnCreate'#7#10'FormCreate'#10'LCLVe'
|
||||
+'rsion'#6#8'1.0.14.0'#0#15'TMPlayerControl'#15'MPlayerControl1'#4'Left'#2#6#6
|
||||
+'Height'#3'N'#1#3'Top'#2#27#5'Width'#3';'#2#5'Align'#7#8'alClient'#20'Border'
|
||||
+'Spacing.Around'#2#6#4'Loop'#2#0#6'Volume'#2#0#0#0#6'TPanel'#6'Panel1'#4'Lef'
|
||||
+'t'#2#0#6'Height'#2#21#3'Top'#2#0#5'Width'#3'G'#2#5'Align'#7#5'alTop'#8'Auto'
|
||||
+'Size'#9#12'ClientHeight'#2#21#11'ClientWidth'#3'G'#2#8'TabOrder'#2#1#0#12'T'
|
||||
+'SpeedButton'#15'PlaySpeedButton'#4'Left'#2#1#6'Height'#2#19#3'Top'#2#1#5'Wi'
|
||||
+'dth'#2#26#5'Align'#7#6'alLeft'#8'AutoSize'#9#7'Caption'#6#4'Play'#9'NumGlyp'
|
||||
+'hs'#2#0#7'OnClick'#7#20'PlaySpeedButtonClick'#0#0#12'TSpeedButton'#16'Pause'
|
||||
+'SpeedButton'#4'Left'#2#27#6'Height'#2#19#3'Top'#2#1#5'Width'#2'#'#5'Align'#7
|
||||
+#6'alLeft'#8'AutoSize'#9#7'Caption'#6#5'Pause'#9'NumGlyphs'#2#0#7'OnClick'#7
|
||||
+#21'PauseSpeedButtonClick'#0#0#12'TSpeedButton'#15'StopSpeedButton'#4'Left'#2
|
||||
+'>'#6'Height'#2#19#3'Top'#2#1#5'Width'#2#28#5'Align'#7#6'alLeft'#8'AutoSize'
|
||||
+#9#7'Caption'#6#4'Stop'#9'NumGlyphs'#2#0#7'OnClick'#7#20'StopSpeedButtonClic'
|
||||
+'k'#0#0#12'TSpeedButton'#15'OpenSpeedButton'#4'Left'#2'Z'#6'Height'#2#19#3'T'
|
||||
+'op'#2#1#5'Width'#2'4'#5'Align'#7#6'alLeft'#8'AutoSize'#9#7'Caption'#6#9'Ope'
|
||||
+'n file'#9'NumGlyphs'#2#0#7'OnClick'#7#20'OpenSpeedButtonClick'#0#0#0#10'TSt'
|
||||
+'atusBar'#10'StatusBar1'#4'Left'#2#0#6'Height'#2#23#3'Top'#3'o'#1#5'Width'#3
|
||||
+'G'#2#6'Panels'#14#0#0#0#11'TOpenDialog'#11'OpenDialog1'#7'Options'#11#15'of'
|
||||
+'FileMustExist'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#235#0#3'top'
|
||||
+#2#127#0#0#0
|
||||
]);
|
@ -1,90 +0,0 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
Buttons, ComCtrls, ExtCtrls, MPlayerCtrl;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
MPlayerControl1: TMPlayerControl;
|
||||
OpenDialog1: TOpenDialog;
|
||||
Panel1: TPanel;
|
||||
PlaySpeedButton: TSpeedButton;
|
||||
PauseSpeedButton: TSpeedButton;
|
||||
OpenSpeedButton: TSpeedButton;
|
||||
StatusBar1: TStatusBar;
|
||||
StopSpeedButton: TSpeedButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure OpenSpeedButtonClick(Sender: TObject);
|
||||
procedure PauseSpeedButtonClick(Sender: TObject);
|
||||
procedure PlaySpeedButtonClick(Sender: TObject);
|
||||
procedure StopSpeedButtonClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.PlaySpeedButtonClick(Sender: TObject);
|
||||
begin
|
||||
if not FileExistsUTF8(MPlayerControl1.Filename) then begin
|
||||
MessageDlg('File not found',
|
||||
'Please choose a file before playing',mtError,[mbCancel],0);
|
||||
exit;
|
||||
end;
|
||||
MPlayerControl1.Play;
|
||||
end;
|
||||
|
||||
procedure TForm1.StopSpeedButtonClick(Sender: TObject);
|
||||
begin
|
||||
MPlayerControl1.Stop;
|
||||
end;
|
||||
|
||||
procedure TForm1.PauseSpeedButtonClick(Sender: TObject);
|
||||
begin
|
||||
MPlayerControl1.Paused:=not MPlayerControl1.Paused;
|
||||
end;
|
||||
|
||||
procedure TForm1.OpenSpeedButtonClick(Sender: TObject);
|
||||
begin
|
||||
if not OpenDialog1.Execute then exit;
|
||||
MPlayerControl1.Stop;
|
||||
MPlayerControl1.Filename:=OpenDialog1.FileName;
|
||||
StatusBar1.SimpleText:=CleanAndExpandFilename(MPlayerControl1.Filename);
|
||||
MPlayerControl1.Play;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
if Paramcount>0 then begin
|
||||
MPlayerControl1.Filename:=CleanAndExpandFilename(ParamStrUTF8(1));
|
||||
StatusBar1.SimpleText:=MPlayerControl1.Filename;
|
||||
end;
|
||||
{$IFDEF Linux}
|
||||
MPlayerControl1.MPlayerPath:='';
|
||||
MPlayerControl1.StartParam:='-vo x11 -zoom -fs';
|
||||
{$else $IFDEF Windows}
|
||||
// Download MPlayer generic for Windows and save under Programm Folder Directory
|
||||
// http://sourceforge.net/projects/mplayer-win32/
|
||||
MPlayerControl1.MPlayerPath:=extractfilepath(application.exename)+'MPlayer/mplayer.exe' ;
|
||||
MPlayerControl1.StartParam:='-zoom -fs';
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I unit1.lrs}
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user