Стартовый пул
This commit is contained in:
103
PasLibVlc/Delphi2007/DemoStreamScreen/DemoStreamScreen.dpr
Normal file
103
PasLibVlc/Delphi2007/DemoStreamScreen/DemoStreamScreen.dpr
Normal 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.
|
46
PasLibVlc/Delphi2007/DemoStreamScreen/DemoStreamScreen.dproj
Normal file
46
PasLibVlc/Delphi2007/DemoStreamScreen/DemoStreamScreen.dproj
Normal 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>
|
Reference in New Issue
Block a user