13 changed files with 379 additions and 2 deletions
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<configuration> |
||||
<configSections> |
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
||||
</configSections> |
||||
<startup> |
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> |
||||
</startup> |
||||
<entityFramework> |
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> |
||||
<parameters> |
||||
<parameter value="mssqllocaldb" /> |
||||
</parameters> |
||||
</defaultConnectionFactory> |
||||
<providers> |
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> |
||||
</providers> |
||||
</entityFramework> |
||||
<runtime> |
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" /> |
||||
</dependentAssembly> |
||||
</assemblyBinding> |
||||
</runtime> |
||||
</configuration> |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.ServiceProcess; |
||||
using System.Text; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace TeknikStreaming |
||||
{ |
||||
static class Program |
||||
{ |
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
static void Main() |
||||
{ |
||||
ServiceBase[] ServicesToRun; |
||||
ServicesToRun = new ServiceBase[] |
||||
{ |
||||
new Server() |
||||
}; |
||||
ServiceBase.Run(ServicesToRun); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
using System.Reflection; |
||||
using System.Runtime.CompilerServices; |
||||
using System.Runtime.InteropServices; |
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TeknikStreaming")] |
||||
[assembly: AssemblyDescription("")] |
||||
[assembly: AssemblyConfiguration("")] |
||||
[assembly: AssemblyCompany("")] |
||||
[assembly: AssemblyProduct("TeknikStreaming")] |
||||
[assembly: AssemblyCopyright("Copyright © 2017")] |
||||
[assembly: AssemblyTrademark("")] |
||||
[assembly: AssemblyCulture("")] |
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)] |
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("7695ce9a-a0db-4d73-bc9b-2206481f0254")] |
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")] |
||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
namespace TeknikStreaming |
||||
{ |
||||
partial class Server |
||||
{ |
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null; |
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) |
||||
{ |
||||
if (disposing && (components != null)) |
||||
{ |
||||
components.Dispose(); |
||||
} |
||||
base.Dispose(disposing); |
||||
} |
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() |
||||
{ |
||||
components = new System.ComponentModel.Container(); |
||||
this.ServiceName = "Service1"; |
||||
} |
||||
|
||||
#endregion
|
||||
} |
||||
} |
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
using Media.Rtsp; |
||||
using Media.Rtsp.Server.MediaTypes; |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.ComponentModel; |
||||
using System.Data; |
||||
using System.Diagnostics; |
||||
using System.Linq; |
||||
using System.ServiceProcess; |
||||
using System.Text; |
||||
using System.Threading.Tasks; |
||||
using Teknik.Areas.Users.Models; |
||||
using Teknik.Models; |
||||
|
||||
namespace TeknikStreaming |
||||
{ |
||||
public partial class Server : ServiceBase |
||||
{ |
||||
private RtspServer _RTSPServer; |
||||
|
||||
public Server() |
||||
{ |
||||
InitializeComponent(); |
||||
} |
||||
|
||||
protected override void OnStart(string[] args) |
||||
{ |
||||
_RTSPServer = new RtspServer(System.Net.Sockets.AddressFamily.NetBios, 555); |
||||
|
||||
LoadStreams(); |
||||
|
||||
_RTSPServer.Start(); |
||||
} |
||||
|
||||
protected override void OnStop() |
||||
{ |
||||
_RTSPServer.Stop(); |
||||
} |
||||
|
||||
private void LoadStreams() |
||||
{ |
||||
TeknikEntities db = new TeknikEntities(); |
||||
|
||||
List<User> users = db.Users.ToList(); |
||||
if (users != null) |
||||
{ |
||||
foreach (User user in users) |
||||
{ |
||||
RtspSource source = new RtspSource(string.Format("TeknikLiveStream_{0}", user.Username), string.Format("rtsp://localhost/live/{0}/stream.amp", user.Username)); |
||||
|
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,143 @@
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
||||
<PropertyGroup> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<ProjectGuid>{7695CE9A-A0DB-4D73-BC9B-2206481F0254}</ProjectGuid> |
||||
<OutputType>WinExe</OutputType> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
<RootNamespace>TeknikStreaming</RootNamespace> |
||||
<AssemblyName>TeknikStreaming</AssemblyName> |
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> |
||||
<FileAlignment>512</FileAlignment> |
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
<DebugSymbols>true</DebugSymbols> |
||||
<DebugType>full</DebugType> |
||||
<Optimize>false</Optimize> |
||||
<OutputPath>bin\Debug\</OutputPath> |
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||
<ErrorReport>prompt</ErrorReport> |
||||
<WarningLevel>4</WarningLevel> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
<DebugType>pdbonly</DebugType> |
||||
<Optimize>true</Optimize> |
||||
<OutputPath>bin\Release\</OutputPath> |
||||
<DefineConstants>TRACE</DefineConstants> |
||||
<ErrorReport>prompt</ErrorReport> |
||||
<WarningLevel>4</WarningLevel> |
||||
</PropertyGroup> |
||||
<ItemGroup> |
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Codec, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Codec.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Codecs.Image, Version=1.0.7.41646, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Codecs.Image.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Codecs.Video.H264, Version=1.0.7.41646, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Codecs.Video.H264.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Common, Version=1.0.7.41642, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Common.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Compression, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Compression.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Container, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Container.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Containers.Mpeg, Version=1.0.7.41645, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Containers.Mpeg.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Ntp, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Ntp.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Rtmp, Version=1.0.7.41644, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Rtmp.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Rtp, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Rtp.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.RtpTools, Version=1.0.7.41644, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.RtpTools.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Rtsp, Version=1.0.7.41644, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Rtsp.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.RtspServer, Version=1.0.7.41647, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.RtspServer.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="Media.Sdp, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL"> |
||||
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Sdp.dll</HintPath> |
||||
<Private>True</Private> |
||||
</Reference> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.ComponentModel.DataAnnotations" /> |
||||
<Reference Include="System.Core" /> |
||||
<Reference Include="System.Xml.Linq" /> |
||||
<Reference Include="System.Data.DataSetExtensions" /> |
||||
<Reference Include="Microsoft.CSharp" /> |
||||
<Reference Include="System.Data" /> |
||||
<Reference Include="System.Net.Http" /> |
||||
<Reference Include="System.ServiceProcess" /> |
||||
<Reference Include="System.Xml" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Compile Include="Server.cs"> |
||||
<SubType>Component</SubType> |
||||
</Compile> |
||||
<Compile Include="Server.Designer.cs"> |
||||
<DependentUpon>Server.cs</DependentUpon> |
||||
</Compile> |
||||
<Compile Include="Program.cs" /> |
||||
<Compile Include="Properties\AssemblyInfo.cs" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<None Include="App.config" /> |
||||
<None Include="packages.config" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="..\Teknik\Teknik.csproj"> |
||||
<Project>{B20317CD-76C6-4A7B-BCE1-E4BEF8E4F964}</Project> |
||||
<Name>Teknik</Name> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
||||
Other similar extension points exist, see Microsoft.Common.targets. |
||||
<Target Name="BeforeBuild"> |
||||
</Target> |
||||
<Target Name="AfterBuild"> |
||||
</Target> |
||||
--> |
||||
</Project> |
Loading…
Reference in new issue