Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
FROM mono:latest
MAINTAINER Colin D. Munro <colin@mice-software.com>

FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
WORKDIR /app
EXPOSE 12345

ADD . /src
RUN nuget restore /src/ThirdParty/onvif-discovery/OnvifDiscovery.sln
RUN nuget restore /src/ThirdParty/bmff/BMFF.sln
RUN nuget restore /src/MiniNVR/TestConsole.sln
RUN msbuild /p:Configuration=Release /src/MiniNVR/TestConsole.sln
CMD ["mono", "/src/MiniNVR/TestConsole/bin/Release/TestConsole.exe"]

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY . .
RUN dotnet restore ThirdParty/bmff
RUN dotnet restore ThirdParty/onvif-discovery
RUN dotnet restore ThirdParty/RtspClientSharp
RUN dotnet build MiniNVR/TestConsole -c Release -o /app/build

FROM base AS final
WORKDIR /app
COPY --from=build /app/build .
LABEL MAINTAINER="Colin D. Munro <colin@mice-software.com>"
ENTRYPOINT ["dotnet", "TestConsole.dll"]
36 changes: 0 additions & 36 deletions MiniNVR/TestConsole/Properties/AssemblyInfo.cs

This file was deleted.

169 changes: 14 additions & 155 deletions MiniNVR/TestConsole/TestConsole.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -8,7 +7,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>TestConsole</RootNamespace>
<AssemblyName>TestConsole</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFramework>net6.0</TargetFramework>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
Expand All @@ -34,150 +33,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Data.Sqlite, Version=5.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Data.Sqlite.Core.5.0.2\lib\netstandard2.0\Microsoft.Data.Sqlite.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SQLitePCLRaw.batteries_v2, Version=2.0.4.976, Culture=neutral, PublicKeyToken=8226ea5df37bcae9, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.bundle_e_sqlite3.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll</HintPath>
</Reference>
<Reference Include="SQLitePCLRaw.core, Version=2.0.4.976, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll</HintPath>
</Reference>
<Reference Include="SQLitePCLRaw.nativelibrary, Version=2.0.4.976, Culture=neutral, PublicKeyToken=502ed628492ab262, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.bundle_e_sqlite3.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll</HintPath>
</Reference>
<Reference Include="SQLitePCLRaw.provider.dynamic_cdecl, Version=2.0.4.976, Culture=neutral, PublicKeyToken=b68184102cba0b3b, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Services" />
<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.Xml" />
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions">
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="Microsoft.Extensions.Logging.Abstractions">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.Buffers">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Numerics.Vectors">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Memory">
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Primitives">
<HintPath>..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options">
<HintPath>..\packages\Microsoft.Extensions.Options.5.0.0\lib\net461\Microsoft.Extensions.Options.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.DiagnosticSource">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.5.0.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encodings.Web">
<HintPath>..\packages\System.Text.Encodings.Web.5.0.1\lib\net461\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection">
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.5.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging">
<HintPath>..\packages\Microsoft.Extensions.Logging.5.0.0\lib\net461\Microsoft.Extensions.Logging.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json">
<HintPath>..\packages\System.Text.Json.5.0.1\lib\net461\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="IdentityModel">
<HintPath>..\packages\IdentityModel.5.1.0\lib\net472\IdentityModel.dll</HintPath>
</Reference>
<Reference Include="IdentityModel.OidcClient">
<HintPath>..\packages\IdentityModel.OidcClient.4.0.0\lib\netstandard2.0\IdentityModel.OidcClient.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration\Cameras.cs" />
<Compile Include="Configuration\ConfigurableList.cs" />
<Compile Include="Configuration\Database.cs" />
<Compile Include="Configuration\Storage.cs" />
<Compile Include="Connected Services\Onvif.PTZ\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="MP4\Mp4Helper.cs" />
<Compile Include="MP4\Mp4Metadata.cs" />
<Compile Include="MP4\SpsParser.cs" />
<Compile Include="Onvif\BaseService.cs" />
<Compile Include="Onvif\DeviceLink.cs" />
<Compile Include="Onvif\Discoverer.cs" />
<Compile Include="Onvif\Events.cs" />
<Compile Include="Onvif\MediaLink.cs" />
<Compile Include="Onvif\Soap\SoapHelper.cs" />
<Compile Include="Connected Services\Onvif.Event\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="Connected Services\Onvif.Device\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="Connected Services\Onvif.Media\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Onvif\Soap\UsernameTokenEndpointBehaviour.cs" />
<Compile Include="Streamer\Camera.cs" />
<Compile Include="Streamer\CameraManager.cs" />
<Compile Include="Streamer\Recorder\FileFormat\CircularFile.cs" />
<Compile Include="Streamer\Recorder\DataFile.cs" />
<Compile Include="Streamer\Recorder\FileFormat\Header.cs" />
<Compile Include="Streamer\StorageManager.cs" />
<Compile Include="Streamer\Utils\StreamWatcher.cs" />
<Compile Include="Streamer\Utils\WebStream.cs" />
<Compile Include="WebInterface.cs" />
<Compile Include="WebServer.cs" />
<Compile Include="Configuration\Users\ISession.cs" />
<Compile Include="Configuration\Users\IProvider.cs" />
<Compile Include="Configuration\Users\Configuration.cs" />
<Compile Include="Configuration\Users\SessionManager.cs" />
<Compile Include="Configuration\Users\OpenID.cs" />
<Compile Include="Configuration\Users\PlainLogin.cs" />
<Compile Include="Configuration\User.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Connected Services\Onvif.Event\b-2.xsd">
Expand Down Expand Up @@ -934,12 +789,16 @@
<ItemGroup>
<EmbeddedResource Include="WebContent\backup_devices_2-1.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\SQLitePCLRaw.lib.e_sqlite3.2.0.4\build\net461\SQLitePCLRaw.lib.e_sqlite3.targets" Condition="Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.2.0.4\build\net461\SQLitePCLRaw.lib.e_sqlite3.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.2.0.4\build\net461\SQLitePCLRaw.lib.e_sqlite3.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SQLitePCLRaw.lib.e_sqlite3.2.0.4\build\net461\SQLitePCLRaw.lib.e_sqlite3.targets'))" />
</Target>
<ItemGroup>
<PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="IdentityModel.OidcClient" Version="5.0.2" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.7" />
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="6.0.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.ServiceModel.Http" Version="4.9.0" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.9.0" />
</ItemGroup>
</Project>
4 changes: 3 additions & 1 deletion MiniNVR/TestConsole/WebServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public interface IEndpoint
result.Content = output.ToArray();
}
}
result.MimeType = System.Web.MimeMapping.GetMimeMapping(name);
// FIXME: Website doesn't work.
// result.MimeType = System.Web.MimeMapping.GetMimeMapping(name);
result.MimeType = "test/html";
if (result.MimeType.StartsWith("text"))
result.MimeType += "; charset=utf-8";
return result;
Expand Down