mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Change chapter property
This commit is contained in:
parent
20db994a87
commit
5c40450a04
@ -28,6 +28,7 @@
|
|||||||
* Optimize saving of TTML files
|
* Optimize saving of TTML files
|
||||||
* Allow new syntax for yt transcript +1 hour - thx Vasudeo
|
* Allow new syntax for yt transcript +1 hour - thx Vasudeo
|
||||||
* FcpXml now supports latest version - thx Dvid
|
* FcpXml now supports latest version - thx Dvid
|
||||||
|
* Improve "Redo casing" in "Batch convert" - thx chschmit
|
||||||
* FIXED:
|
* FIXED:
|
||||||
* Fix extra space after font in EBU STL - thx Stefan
|
* Fix extra space after font in EBU STL - thx Stefan
|
||||||
* Fix possible crash in batch convert w overwrite - thx chensimmons
|
* Fix possible crash in batch convert w overwrite - thx chensimmons
|
||||||
|
@ -198,9 +198,9 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<MatroskaChapter> _chapters = new List<MatroskaChapter>();
|
private MatroskaChapter[] _chapters = Array.Empty<MatroskaChapter>();
|
||||||
|
|
||||||
public List<MatroskaChapter> Chapters
|
public MatroskaChapter[] Chapters
|
||||||
{
|
{
|
||||||
get => _chapters;
|
get => _chapters;
|
||||||
set
|
set
|
||||||
@ -726,7 +726,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var index = 0;
|
var index = 0;
|
||||||
while (index < _chapters.Count)
|
while (index < _chapters.Length)
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
try
|
try
|
||||||
@ -746,7 +746,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
{
|
{
|
||||||
string name;
|
string name;
|
||||||
var x = pos + 3;
|
var x = pos + 3;
|
||||||
var y = index + 1 < _chapters.Count && Math.Abs(_chapters[index].StartTime - _chapters[index + 1].StartTime) < 0.01 ? Height / 2 - font.Height - 12 : Height / 2 - 12;
|
var y = index + 1 < _chapters.Length && Math.Abs(_chapters[index].StartTime - _chapters[index + 1].StartTime) < 0.01 ? Height / 2 - font.Height - 12 : Height / 2 - 12;
|
||||||
using (var chapterTextBackBrush = new SolidBrush(ChaptersColor))
|
using (var chapterTextBackBrush = new SolidBrush(ChaptersColor))
|
||||||
{
|
{
|
||||||
name = _chapters[index].Nested ? "+ " + _chapters[index].Name : _chapters[index].Name;
|
name = _chapters[index].Nested ? "+ " + _chapters[index].Name : _chapters[index].Name;
|
||||||
|
@ -125,17 +125,8 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
private readonly ToolTip _currentPositionToolTip = new ToolTip();
|
private readonly ToolTip _currentPositionToolTip = new ToolTip();
|
||||||
private int _lastCurrentPositionToolTipX;
|
private int _lastCurrentPositionToolTipX;
|
||||||
private int _lastCurrentPositionToolTipY;
|
private int _lastCurrentPositionToolTipY;
|
||||||
private List<MatroskaChapter> _chapters = new List<MatroskaChapter>();
|
|
||||||
|
|
||||||
public List<MatroskaChapter> Chapters
|
public MatroskaChapter[] Chapters { get; set; }
|
||||||
{
|
|
||||||
get => _chapters;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_chapters = value;
|
|
||||||
Invalidate(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public RightToLeft TextRightToLeft
|
public RightToLeft TextRightToLeft
|
||||||
{
|
{
|
||||||
@ -201,7 +192,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
|
|
||||||
public VideoPlayerContainer()
|
public VideoPlayerContainer()
|
||||||
{
|
{
|
||||||
_chapters = new List<MatroskaChapter>();
|
Chapters = Array.Empty<MatroskaChapter>();
|
||||||
FontSizeFactor = 1.0F;
|
FontSizeFactor = 1.0F;
|
||||||
BorderStyle = BorderStyle.None;
|
BorderStyle = BorderStyle.None;
|
||||||
_resources = new System.ComponentModel.ComponentResourceManager(typeof(VideoPlayerContainer));
|
_resources = new System.ComponentModel.ComponentResourceManager(typeof(VideoPlayerContainer));
|
||||||
@ -1532,23 +1523,23 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
double cursorVideoPosition = CursorVideoPosition(mouseX);
|
double cursorVideoPosition = CursorVideoPosition(mouseX);
|
||||||
string toolTiptext = TimeCode.FromSeconds(cursorVideoPosition + Configuration.Settings.General.CurrentVideoOffsetInMs / TimeCode.BaseUnit).ToDisplayString();
|
string toolTiptext = TimeCode.FromSeconds(cursorVideoPosition + Configuration.Settings.General.CurrentVideoOffsetInMs / TimeCode.BaseUnit).ToDisplayString();
|
||||||
|
|
||||||
if (_chapters?.Count > 0)
|
if (Chapters?.Length > 0)
|
||||||
{
|
{
|
||||||
toolTiptext += " - ";
|
toolTiptext += " - ";
|
||||||
|
|
||||||
for (int index = 0; index < _chapters.Count; index++)
|
for (int index = 0; index < Chapters.Length; index++)
|
||||||
{
|
{
|
||||||
var chapterTime = _chapters[index].StartTime;
|
var chapterTime = Chapters[index].StartTime;
|
||||||
var nextChapterTime = index + 1 < _chapters.Count ? _chapters[index + 1].StartTime : Duration;
|
var nextChapterTime = index + 1 < Chapters.Length ? Chapters[index + 1].StartTime : Duration;
|
||||||
|
|
||||||
if (cursorVideoPosition >= chapterTime && cursorVideoPosition < nextChapterTime)
|
if (cursorVideoPosition >= chapterTime && cursorVideoPosition < nextChapterTime)
|
||||||
{
|
{
|
||||||
if (_chapters[index].Nested)
|
if (Chapters[index].Nested)
|
||||||
{
|
{
|
||||||
toolTiptext += "+ ";
|
toolTiptext += "+ ";
|
||||||
}
|
}
|
||||||
|
|
||||||
toolTiptext += _chapters[index].Name;
|
toolTiptext += Chapters[index].Name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1563,12 +1554,12 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
{
|
{
|
||||||
int max = _pictureBoxProgressbarBackground.Width - 9;
|
int max = _pictureBoxProgressbarBackground.Width - 9;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while (index < _chapters.Count)
|
while (index < Chapters.Length)
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
double time = _chapters[index++].StartTime;
|
double time = Chapters[index++].StartTime;
|
||||||
pos = SecondsToXPosition(time) + mergin;
|
pos = SecondsToXPosition(time) + mergin;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@ -1604,7 +1595,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
|
|
||||||
private void PictureBoxProgressbarBackgroundPaint(object sender, PaintEventArgs e)
|
private void PictureBoxProgressbarBackgroundPaint(object sender, PaintEventArgs e)
|
||||||
{
|
{
|
||||||
if (_chapters?.Count > 0)
|
if (Chapters?.Length > 0)
|
||||||
{
|
{
|
||||||
DrawChapters(e.Graphics, 3, _pictureBoxProgressBar.Location.Y, _pictureBoxProgressBar.Location.Y + 3);
|
DrawChapters(e.Graphics, 3, _pictureBoxProgressBar.Location.Y, _pictureBoxProgressBar.Location.Y + 3);
|
||||||
}
|
}
|
||||||
@ -1612,7 +1603,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
|
|
||||||
private void PictureBoxProgressBarPaint(object sender, PaintEventArgs e)
|
private void PictureBoxProgressBarPaint(object sender, PaintEventArgs e)
|
||||||
{
|
{
|
||||||
if (_chapters?.Count > 0)
|
if (Chapters?.Length > 0)
|
||||||
{
|
{
|
||||||
DrawChapters(e.Graphics, -1, 1, _pictureBoxProgressBar.Height);
|
DrawChapters(e.Graphics, -1, 1, _pictureBoxProgressBar.Height);
|
||||||
}
|
}
|
||||||
@ -1997,7 +1988,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
PanelPlayer.Hide();
|
PanelPlayer.Hide();
|
||||||
Pause();
|
Pause();
|
||||||
SubtitleText = string.Empty;
|
SubtitleText = string.Empty;
|
||||||
Chapters = new List<MatroskaChapter>();
|
Chapters = Array.Empty<MatroskaChapter>();
|
||||||
MpvPreviewStyleHeader = null;
|
MpvPreviewStyleHeader = null;
|
||||||
var temp = VideoPlayer;
|
var temp = VideoPlayer;
|
||||||
VideoPlayer = null;
|
VideoPlayer = null;
|
||||||
|
3
src/ui/Forms/GetVideoPosition.Designer.cs
generated
3
src/ui/Forms/GetVideoPosition.Designer.cs
generated
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Nikse.SubtitleEdit.Core.Common;
|
using Nikse.SubtitleEdit.Core.Common;
|
||||||
using Nikse.SubtitleEdit.Core.ContainerFormats.Matroska;
|
using Nikse.SubtitleEdit.Core.ContainerFormats.Matroska;
|
||||||
|
|
||||||
|
@ -1,140 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>157, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<data name="videoPlayerContainer1.Chapters" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>
|
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAI4BbGlic2UsIFZlcnNpb249My42LjExLjEyNSwgQ3VsdHVyZT1u
|
|
||||||
ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0sIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1
|
|
||||||
bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQwDAAAAP2xpYnNlLCBW
|
|
||||||
ZXJzaW9uPTMuNi4xMS4xMjUsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAUBAAAA
|
|
||||||
ZFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbTmlrc2UuU3VidGl0bGVFZGl0LkNvcmUu
|
|
||||||
Q29udGFpbmVyRm9ybWF0cy5NYXRyb3NrYS5NYXRyb3NrYUNoYXB0ZXIDAAAABl9pdGVtcwVfc2l6ZQhf
|
|
||||||
dmVyc2lvbgQAAENOaWtzZS5TdWJ0aXRsZUVkaXQuQ29yZS5Db250YWluZXJGb3JtYXRzLk1hdHJvc2th
|
|
||||||
Lk1hdHJvc2thQ2hhcHRlcltdAwAAAAgIAgAAAAkEAAAAAAAAAAAAAAAHBAAAAAABAAAAAAAAAARBTmlr
|
|
||||||
c2UuU3VidGl0bGVFZGl0LkNvcmUuQ29udGFpbmVyRm9ybWF0cy5NYXRyb3NrYS5NYXRyb3NrYUNoYXB0
|
|
||||||
ZXIDAAAACw==
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
@ -3701,7 +3701,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
audioVisualizer.WavePeaks = null;
|
audioVisualizer.WavePeaks = null;
|
||||||
audioVisualizer.SetSpectrogram(null);
|
audioVisualizer.SetSpectrogram(null);
|
||||||
audioVisualizer.ShotChanges = new List<double>();
|
audioVisualizer.ShotChanges = new List<double>();
|
||||||
audioVisualizer.Chapters = new List<MatroskaChapter>();
|
audioVisualizer.Chapters = Array.Empty<MatroskaChapter>();
|
||||||
}
|
}
|
||||||
|
|
||||||
var oldSaveFormat = Configuration.Settings.General.LastSaveAsFormat;
|
var oldSaveFormat = Configuration.Settings.General.LastSaveAsFormat;
|
||||||
@ -3943,7 +3943,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
audioVisualizer.WavePeaks = null;
|
audioVisualizer.WavePeaks = null;
|
||||||
audioVisualizer.SetSpectrogram(null);
|
audioVisualizer.SetSpectrogram(null);
|
||||||
audioVisualizer.ShotChanges = new List<double>();
|
audioVisualizer.ShotChanges = new List<double>();
|
||||||
audioVisualizer.Chapters = new List<MatroskaChapter>();
|
audioVisualizer.Chapters = Array.Empty<MatroskaChapter>();
|
||||||
|
|
||||||
Configuration.Settings.RecentFiles.Add(fileName, FirstVisibleIndex, FirstSelectedIndex, _videoFileName, VideoAudioTrackNumber, _subtitleOriginalFileName, Configuration.Settings.General.CurrentVideoOffsetInMs, Configuration.Settings.General.CurrentVideoIsSmpte);
|
Configuration.Settings.RecentFiles.Add(fileName, FirstVisibleIndex, FirstSelectedIndex, _videoFileName, VideoAudioTrackNumber, _subtitleOriginalFileName, Configuration.Settings.General.CurrentVideoOffsetInMs, Configuration.Settings.General.CurrentVideoIsSmpte);
|
||||||
Configuration.Settings.Save();
|
Configuration.Settings.Save();
|
||||||
@ -5195,7 +5195,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
audioVisualizer.WavePeaks = null;
|
audioVisualizer.WavePeaks = null;
|
||||||
audioVisualizer.SetSpectrogram(null);
|
audioVisualizer.SetSpectrogram(null);
|
||||||
audioVisualizer.ShotChanges = new List<double>();
|
audioVisualizer.ShotChanges = new List<double>();
|
||||||
audioVisualizer.Chapters = new List<MatroskaChapter>();
|
audioVisualizer.Chapters = Array.Empty<MatroskaChapter>();
|
||||||
if (mediaPlayer.VideoPlayer != null)
|
if (mediaPlayer.VideoPlayer != null)
|
||||||
{
|
{
|
||||||
mediaPlayer.PauseAndDisposePlayer();
|
mediaPlayer.PauseAndDisposePlayer();
|
||||||
@ -17338,7 +17338,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
else if (mediaPlayer.Chapters?.Count > 0 && e.KeyData == _shortcuts.VideoGoToPrevChapter)
|
else if (mediaPlayer.Chapters?.Length > 0 && e.KeyData == _shortcuts.VideoGoToPrevChapter)
|
||||||
{
|
{
|
||||||
var cp = mediaPlayer.CurrentPosition - 0.01;
|
var cp = mediaPlayer.CurrentPosition - 0.01;
|
||||||
foreach (var chapter in mediaPlayer.Chapters.Reverse<MatroskaChapter>())
|
foreach (var chapter in mediaPlayer.Chapters.Reverse<MatroskaChapter>())
|
||||||
@ -17352,7 +17352,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
else if (mediaPlayer.Chapters?.Count > 0 && e.KeyData == _shortcuts.VideoGoToNextChapter)
|
else if (mediaPlayer.Chapters?.Length > 0 && e.KeyData == _shortcuts.VideoGoToNextChapter)
|
||||||
{
|
{
|
||||||
var cp = mediaPlayer.CurrentPosition + 0.01;
|
var cp = mediaPlayer.CurrentPosition + 0.01;
|
||||||
foreach (var chapter in mediaPlayer.Chapters)
|
foreach (var chapter in mediaPlayer.Chapters)
|
||||||
@ -21729,7 +21729,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
audioVisualizer.WavePeaks = null;
|
audioVisualizer.WavePeaks = null;
|
||||||
audioVisualizer.SetSpectrogram(null);
|
audioVisualizer.SetSpectrogram(null);
|
||||||
audioVisualizer.ShotChanges = new List<double>();
|
audioVisualizer.ShotChanges = new List<double>();
|
||||||
audioVisualizer.Chapters = new List<MatroskaChapter>();
|
audioVisualizer.Chapters = Array.Empty<MatroskaChapter>();
|
||||||
|
|
||||||
if (Configuration.Settings.General.WaveformAutoGenWhenOpeningVideo)
|
if (Configuration.Settings.General.WaveformAutoGenWhenOpeningVideo)
|
||||||
{
|
{
|
||||||
@ -25798,7 +25798,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaPlayer.Chapters?.Count > 0)
|
if (mediaPlayer.Chapters?.Length > 0)
|
||||||
{
|
{
|
||||||
audioVisualizer.Chapters = mediaPlayer.Chapters;
|
audioVisualizer.Chapters = mediaPlayer.Chapters;
|
||||||
}
|
}
|
||||||
@ -25830,7 +25830,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
audioVisualizer.WavePeaks = null;
|
audioVisualizer.WavePeaks = null;
|
||||||
audioVisualizer.SetSpectrogram(null);
|
audioVisualizer.SetSpectrogram(null);
|
||||||
audioVisualizer.ShotChanges = new List<double>();
|
audioVisualizer.ShotChanges = new List<double>();
|
||||||
audioVisualizer.Chapters = new List<MatroskaChapter>();
|
audioVisualizer.Chapters = Array.Empty<MatroskaChapter>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaPlayer.VideoPlayer is LibVlcDynamic && audioTrackNumber != -1)
|
if (mediaPlayer.VideoPlayer is LibVlcDynamic && audioTrackNumber != -1)
|
||||||
@ -27894,7 +27894,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
audioVisualizer.WavePeaks = null;
|
audioVisualizer.WavePeaks = null;
|
||||||
audioVisualizer.SetSpectrogram(null);
|
audioVisualizer.SetSpectrogram(null);
|
||||||
audioVisualizer.ShotChanges = new List<double>();
|
audioVisualizer.ShotChanges = new List<double>();
|
||||||
audioVisualizer.Chapters = new List<MatroskaChapter>();
|
audioVisualizer.Chapters = Array.Empty<MatroskaChapter>();
|
||||||
trackBarWaveformPosition.Value = 0;
|
trackBarWaveformPosition.Value = 0;
|
||||||
timeUpDownVideoPositionAdjust.TimeCode = new TimeCode();
|
timeUpDownVideoPositionAdjust.TimeCode = new TimeCode();
|
||||||
timeUpDownVideoPositionAdjust.Enabled = false;
|
timeUpDownVideoPositionAdjust.Enabled = false;
|
||||||
@ -31797,11 +31797,11 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
if (chaps?.Count > 0)
|
if (chaps?.Count > 0)
|
||||||
{
|
{
|
||||||
mediaPlayer.Chapters = chaps;
|
mediaPlayer.Chapters = chaps.ToArray();
|
||||||
|
|
||||||
if (audioVisualizer.WavePeaks != null)
|
if (audioVisualizer.WavePeaks != null)
|
||||||
{
|
{
|
||||||
audioVisualizer.Chapters = chaps;
|
audioVisualizer.Chapters = chaps.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowStatus(string.Format(_language.XChaptersImported, chaps?.Count));
|
ShowStatus(string.Format(_language.XChaptersImported, chaps?.Count));
|
||||||
@ -32686,7 +32686,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
audioVisualizer.WavePeaks = null;
|
audioVisualizer.WavePeaks = null;
|
||||||
audioVisualizer.SetSpectrogram(null);
|
audioVisualizer.SetSpectrogram(null);
|
||||||
audioVisualizer.ShotChanges = new List<double>();
|
audioVisualizer.ShotChanges = new List<double>();
|
||||||
audioVisualizer.Chapters = new List<MatroskaChapter>();
|
audioVisualizer.Chapters = Array.Empty<MatroskaChapter>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!panelVideoPlayer.Visible)
|
if (!panelVideoPlayer.Visible)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Nikse.SubtitleEdit.Core.ContainerFormats.Matroska;
|
using Nikse.SubtitleEdit.Core.ContainerFormats.Matroska;
|
||||||
|
|
||||||
namespace Nikse.SubtitleEdit.Forms.ShotChanges
|
namespace Nikse.SubtitleEdit.Forms.ShotChanges
|
||||||
@ -112,7 +113,6 @@ namespace Nikse.SubtitleEdit.Forms.ShotChanges
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.audioVisualizer.BackColor = System.Drawing.Color.Black;
|
this.audioVisualizer.BackColor = System.Drawing.Color.Black;
|
||||||
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
|
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
|
||||||
this.audioVisualizer.Chapters = ((System.Collections.Generic.List<Nikse.SubtitleEdit.Core.ContainerFormats.Matroska.MatroskaChapter>)(resources.GetObject("audioVisualizer.Chapters")));
|
|
||||||
this.audioVisualizer.ChaptersColor = System.Drawing.Color.Empty;
|
this.audioVisualizer.ChaptersColor = System.Drawing.Color.Empty;
|
||||||
this.audioVisualizer.ClosenessForBorderSelection = 15;
|
this.audioVisualizer.ClosenessForBorderSelection = 15;
|
||||||
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
|
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
|
||||||
@ -375,7 +375,6 @@ namespace Nikse.SubtitleEdit.Forms.ShotChanges
|
|||||||
//
|
//
|
||||||
this.videoPlayerContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.videoPlayerContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.videoPlayerContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
this.videoPlayerContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||||
this.videoPlayerContainer1.Chapters = ((System.Collections.Generic.List<Nikse.SubtitleEdit.Core.ContainerFormats.Matroska.MatroskaChapter>)(resources.GetObject("videoPlayerContainer1.Chapters")));
|
|
||||||
this.videoPlayerContainer1.CurrentPosition = 0D;
|
this.videoPlayerContainer1.CurrentPosition = 0D;
|
||||||
this.videoPlayerContainer1.FontSizeFactor = 1F;
|
this.videoPlayerContainer1.FontSizeFactor = 1F;
|
||||||
this.videoPlayerContainer1.LastParagraph = null;
|
this.videoPlayerContainer1.LastParagraph = null;
|
||||||
|
@ -1589,9 +1589,6 @@
|
|||||||
<EmbeddedResource Include="Forms\DownloadVosk.resx">
|
<EmbeddedResource Include="Forms\DownloadVosk.resx">
|
||||||
<DependentUpon>DownloadVosk.cs</DependentUpon>
|
<DependentUpon>DownloadVosk.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\GetVideoPosition.resx">
|
|
||||||
<DependentUpon>GetVideoPosition.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Forms\Ocr\WordSplitDictionaryGenerator.resx">
|
<EmbeddedResource Include="Forms\Ocr\WordSplitDictionaryGenerator.resx">
|
||||||
<DependentUpon>WordSplitDictionaryGenerator.cs</DependentUpon>
|
<DependentUpon>WordSplitDictionaryGenerator.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
Loading…
Reference in New Issue
Block a user