mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-17 15:53:42 +01:00
added subtitle parsing stubs
This commit is contained in:
@@ -61,6 +61,10 @@
|
||||
<Compile Include="Encoder\InternalEncodingTaskFactory.cs" />
|
||||
<Compile Include="Encoder\MediaEncoder.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Subtitles\ISubtitleParser.cs" />
|
||||
<Compile Include="Subtitles\SrtParser.cs" />
|
||||
<Compile Include="Subtitles\SsaParser.cs" />
|
||||
<Compile Include="Subtitles\SubtitleInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
|
||||
@@ -79,6 +83,7 @@
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
9
MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs
Normal file
9
MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
{
|
||||
public interface ISubtitleParser
|
||||
{
|
||||
SubtitleInfo Parse(Stream stream);
|
||||
}
|
||||
}
|
||||
17
MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
Normal file
17
MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
{
|
||||
public class SrtParser
|
||||
{
|
||||
public SubtitleInfo Parse(Stream stream)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
17
MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
Normal file
17
MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
{
|
||||
public class SsaParser
|
||||
{
|
||||
public SubtitleInfo Parse(Stream stream)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
22
MediaBrowser.MediaEncoding/Subtitles/SubtitleInfo.cs
Normal file
22
MediaBrowser.MediaEncoding/Subtitles/SubtitleInfo.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
{
|
||||
public class SubtitleInfo
|
||||
{
|
||||
public List<SubtitleTrackEvent> TrackEvents { get; set; }
|
||||
|
||||
public SubtitleInfo()
|
||||
{
|
||||
TrackEvents = new List<SubtitleTrackEvent>();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubtitleTrackEvent
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Text { get; set; }
|
||||
public long StartPositionTicks { get; set; }
|
||||
public long EndPositionTicks { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user