update subtitle methods

This commit is contained in:
Luke Pulverenti
2015-07-19 23:43:13 -04:00
parent 3bb65c6f99
commit 3178896004
24 changed files with 65 additions and 35 deletions

View File

@@ -902,13 +902,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
// TODO: Perhaps also use original_size=1920x800 ??
return string.Format("subtitles=filename='{0}'{1},setpts=PTS -{2}/TB",
subtitlePath.Replace('\\', '/').Replace("'", "\\'").Replace(":/", "\\:/"),
subtitlePath.Replace('\\', '/').Replace(":/", "\\:/"),
charsetParam,
seconds.ToString(UsCulture));
}
return string.Format("subtitles='{0}:si={1}',setpts=PTS -{2}/TB",
state.MediaPath.Replace('\\', '/').Replace("'", "\\'").Replace(":/", "\\:/"),
state.MediaPath.Replace('\\', '/').Replace(":/", "\\:/"),
state.InternalSubtitleStreamOffset.ToString(UsCulture),
seconds.ToString(UsCulture));
}

View File

@@ -81,7 +81,6 @@
<Compile Include="Subtitles\AssParser.cs" />
<Compile Include="Subtitles\SsaParser.cs" />
<Compile Include="Subtitles\SubtitleEncoder.cs" />
<Compile Include="Subtitles\SubtitleTrackInfo.cs" />
<Compile Include="Subtitles\TtmlWriter.cs" />
<Compile Include="Subtitles\VttWriter.cs" />
</ItemGroup>

View File

@@ -6,6 +6,7 @@ using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{

View File

@@ -1,5 +1,6 @@
using System.IO;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{

View File

@@ -1,5 +1,6 @@
using System.IO;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Serialization;
using System.IO;
using System.Text;
using System.Threading;

View File

@@ -6,6 +6,7 @@ using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{

View File

@@ -3,6 +3,7 @@ using System;
using System.IO;
using System.Text;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{

View File

@@ -1,22 +0,0 @@
using System.Collections.Generic;
namespace MediaBrowser.MediaEncoding.Subtitles
{
public class SubtitleTrackInfo
{
public List<SubtitleTrackEvent> TrackEvents { get; set; }
public SubtitleTrackInfo()
{
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; }
}
}

View File

@@ -3,6 +3,7 @@ using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{

View File

@@ -3,6 +3,7 @@ using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.MediaEncoding.Subtitles
{