Skip to content

Commit

Permalink
Основа
Browse files Browse the repository at this point in the history
Добавленна основа плеера за исключением звука
  • Loading branch information
konvikkor committed Mar 16, 2018
1 parent ccc2026 commit 1989aca
Show file tree
Hide file tree
Showing 8 changed files with 789 additions and 165 deletions.
36 changes: 36 additions & 0 deletions ALL_FFMPEG.groupproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{9DE645B4-16B3-4477-BE5B-79FE6970F9A8}</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<Projects Include="example\MainTest.dproj">
<Dependencies/>
</Projects>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Default.Personality.12</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<Default.Personality/>
</BorlandProject>
</ProjectExtensions>
<Target Name="MainTest">
<MSBuild Projects="example\MainTest.dproj"/>
</Target>
<Target Name="MainTest:Clean">
<MSBuild Projects="example\MainTest.dproj" Targets="Clean"/>
</Target>
<Target Name="MainTest:Make">
<MSBuild Projects="example\MainTest.dproj" Targets="Make"/>
</Target>
<Target Name="Build">
<CallTarget Targets="MainTest"/>
</Target>
<Target Name="Clean">
<CallTarget Targets="MainTest:Clean"/>
</Target>
<Target Name="Make">
<CallTarget Targets="MainTest:Make"/>
</Target>
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
</Project>
4 changes: 3 additions & 1 deletion FFMPEG.dpk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package FFMPEG;

{$R *.res}
{$R *.dres}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
Expand Down Expand Up @@ -28,7 +29,8 @@ package FFMPEG;
{$IMPLICITBUILD ON}

requires
rtl;
rtl,
vcl;

contains
uFFMPG in 'uFFMPG.pas';
Expand Down
38 changes: 27 additions & 11 deletions FFMPEG.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSX32' and '$(Base)'=='true') or '$(Base_OSX32)'!=''">
<Base_OSX32>true</Base_OSX32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
Expand Down Expand Up @@ -69,21 +74,29 @@
<DCC_K>false</DCC_K>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android)'!=''">
<DCC_UsePackage>rtl;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSDevice)'!=''">
<DCC_UsePackage>rtl;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSSimulator)'!=''">
<DCC_UsePackage>rtl;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSX32)'!=''">
<DCC_UsePackage>rtl;$(DCC_UsePackage)</DCC_UsePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>rtl;vcl;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>rtl;vcl;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
Expand Down Expand Up @@ -111,7 +124,16 @@
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="rtl.dcp"/>
<DCCReference Include="vcl.dcp"/>
<DCCReference Include="uFFMPG.pas"/>
<RcItem Include="fC.bmp">
<ResourceType>BITMAP</ResourceType>
<ResourceId>TMyFFMpeg</ResourceId>
</RcItem>
<RcItem Include="fd.bmp">
<ResourceType>BITMAP</ResourceType>
<ResourceId>TMyFFMpegDisplay</ResourceId>
</RcItem>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
Expand Down Expand Up @@ -140,23 +162,17 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\FFMPEG.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>FFMPEG.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64\FFMPEG.rsm" Configuration="Debug" Class="DebugSymbols">
<Platform Name="Win64">
<RemoteName>FFMPEG.rsm</RemoteName>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand Down
72 changes: 66 additions & 6 deletions example/uMain.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,72 @@ object Form1: TForm1
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 208
object Splitter1: TSplitter
Left = 0
Top = 396
Width = 635
Height = 3
Cursor = crVSplit
Align = alBottom
ExplicitTop = 0
ExplicitWidth = 399
end
object MyFFMpegDisplay1: TMyFFMpegDisplay
Left = 0
Top = 0
Width = 635
Height = 396
PopupMenu = PopupMenu1
Align = alClient
end
object Memo1: TMemo
Left = 0
Top = 399
Width = 635
Height = 89
Align = alBottom
TabOrder = 1
end
object StatusBar1: TStatusBar
Left = 0
Top = 488
Width = 635
Height = 19
Panels = <>
end
object MyFFMpeg1: TMyFFMpeg
Display = MyFFMpegDisplay1
Seek = 0
Left = 128
Top = 144
Width = 185
Height = 41
Caption = 'Panel1'
TabOrder = 0
end
object PopupMenu1: TPopupMenu
Left = 248
Top = 152
object File1: TMenuItem
Caption = 'File'
object Open1: TMenuItem
Caption = 'Open'
OnClick = Open1Click
end
object Close1: TMenuItem
Caption = 'Close'
end
end
object Actions1: TMenuItem
Caption = 'Actions'
object Play1: TMenuItem
Caption = 'Play'
OnClick = Play1Click
end
object Stop1: TMenuItem
Caption = 'Stop'
OnClick = Stop1Click
end
end
end
object OpenDialog1: TOpenDialog
Left = 128
Top = 72
end
end
41 changes: 39 additions & 2 deletions example/uMain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,27 @@ interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls;
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, uFFMPG, Vcl.Menus,
Vcl.StdCtrls, Vcl.ComCtrls;

type
TForm1 = class(TForm)
Panel1: TPanel;
MyFFMpegDisplay1: TMyFFMpegDisplay;
MyFFMpeg1: TMyFFMpeg;
PopupMenu1: TPopupMenu;
File1: TMenuItem;
Open1: TMenuItem;
Close1: TMenuItem;
Actions1: TMenuItem;
Play1: TMenuItem;
Stop1: TMenuItem;
OpenDialog1: TOpenDialog;
Memo1: TMemo;
StatusBar1: TStatusBar;
Splitter1: TSplitter;
procedure Open1Click(Sender: TObject);
procedure Play1Click(Sender: TObject);
procedure Stop1Click(Sender: TObject);
private
{ Private declarations }
public
Expand All @@ -22,4 +38,25 @@ implementation

{$R *.dfm}

procedure TForm1.Open1Click(Sender: TObject);
begin
if OpenDialog1.Execute then begin
MyFFMpeg1.OpenFile(OpenDialog1.FileName);
Self.Caption:=string(
MyFFMpeg1.AVStream[MyFFMpeg1.VideoStreamIndex].stream.codec.codec.long_name)+' - ('+
inttostr(MyFFMpeg1.AVStream[MyFFMpeg1.VideoStreamIndex].stream.codec.width)+'x'+
inttostr(MyFFMpeg1.AVStream[MyFFMpeg1.VideoStreamIndex].stream.codec.height)+')';
end;
end;

procedure TForm1.Play1Click(Sender: TObject);
begin
MyFFMpeg1.Play;
end;

procedure TForm1.Stop1Click(Sender: TObject);
begin
MyFFMpeg1.Stop;
end;

end.
Binary file added fC.bmp
Binary file not shown.
Binary file added fd.bmp
Binary file not shown.
Loading

0 comments on commit 1989aca

Please sign in to comment.