mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Merge pull request #533 from xylographe/mpcrf
Try "K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" in GetMpcHcFileName()
This commit is contained in:
commit
4bd0ba0657
@ -782,7 +782,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bmp.Save(fileName, imageFormat);
|
bmp.Save(fileName, imageFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1368,7 +1368,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
|||||||
if (param.Bitmap.Width == 720 && param.Bitmap.Width == 480) // NTSC
|
if (param.Bitmap.Width == 720 && param.Bitmap.Width == 480) // NTSC
|
||||||
return string.Format("{0:00};{1:00};{2:00};{3:00}", time.Hours, time.Minutes, time.Seconds, SubtitleFormat.MillisecondsToFramesMaxFrameRate(time.Milliseconds));
|
return string.Format("{0:00};{1:00};{2:00};{3:00}", time.Hours, time.Minutes, time.Seconds, SubtitleFormat.MillisecondsToFramesMaxFrameRate(time.Milliseconds));
|
||||||
|
|
||||||
// drop frame
|
// drop frame
|
||||||
if (Math.Abs(param.FramesPerSeconds - 24 * (999 / 1000)) < 0.01 ||
|
if (Math.Abs(param.FramesPerSeconds - 24 * (999 / 1000)) < 0.01 ||
|
||||||
Math.Abs(param.FramesPerSeconds - 29 * (999 / 1000)) < 0.01 ||
|
Math.Abs(param.FramesPerSeconds - 29 * (999 / 1000)) < 0.01 ||
|
||||||
Math.Abs(param.FramesPerSeconds - 59 * (999 / 1000)) < 0.01)
|
Math.Abs(param.FramesPerSeconds - 59 * (999 / 1000)) < 0.01)
|
||||||
|
@ -482,7 +482,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
for (double zoomCounter = AudioVisualizer.ZoomMininum; zoomCounter <= AudioVisualizer.ZoomMaxinum + (0.001); zoomCounter += 0.1)
|
for (double zoomCounter = AudioVisualizer.ZoomMininum; zoomCounter <= AudioVisualizer.ZoomMaxinum + (0.001); zoomCounter += 0.1)
|
||||||
{
|
{
|
||||||
int percent = (int)Math.Round((zoomCounter * 100));
|
int percent = (int)Math.Round((zoomCounter * 100));
|
||||||
ComboBoxZoomItem item = new ComboBoxZoomItem() { Text = percent + "%", ZoomFactor = zoomCounter };
|
ComboBoxZoomItem item = new ComboBoxZoomItem { Text = percent + "%", ZoomFactor = zoomCounter };
|
||||||
toolStripComboBoxWaveform.Items.Add(item);
|
toolStripComboBoxWaveform.Items.Add(item);
|
||||||
if (percent == 100)
|
if (percent == 100)
|
||||||
toolStripComboBoxWaveform.SelectedIndex = toolStripComboBoxWaveform.Items.Count - 1;
|
toolStripComboBoxWaveform.SelectedIndex = toolStripComboBoxWaveform.Items.Count - 1;
|
||||||
@ -15676,7 +15676,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
else if (update.Action == "MSG")
|
else if (update.Action == "MSG")
|
||||||
{
|
{
|
||||||
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry() { User = update.User, Message = update.Text });
|
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry { User = update.User, Message = update.Text });
|
||||||
if (_networkChat == null || _networkChat.IsDisposed)
|
if (_networkChat == null || _networkChat.IsDisposed)
|
||||||
{
|
{
|
||||||
_networkChat = new NetworkChat();
|
_networkChat = new NetworkChat();
|
||||||
|
@ -52,7 +52,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_networkSession.SendChatMessage(textBoxChat.Text.Trim());
|
_networkSession.SendChatMessage(textBoxChat.Text.Trim());
|
||||||
AddChatMessage(_networkSession.CurrentUser, textBoxChat.Text.Trim());
|
AddChatMessage(_networkSession.CurrentUser, textBoxChat.Text.Trim());
|
||||||
listViewChat.EnsureVisible(listViewChat.Items.Count - 1);
|
listViewChat.EnsureVisible(listViewChat.Items.Count - 1);
|
||||||
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry() { User = _networkSession.CurrentUser, Message = textBoxChat.Text.Trim() });
|
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry { User = _networkSession.CurrentUser, Message = textBoxChat.Text.Trim() });
|
||||||
}
|
}
|
||||||
textBoxChat.Text = string.Empty;
|
textBoxChat.Text = string.Empty;
|
||||||
textBoxChat.Focus();
|
textBoxChat.Focus();
|
||||||
|
@ -112,12 +112,12 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
checkBoxAutoWrapWhileTyping.Checked = gs.AutoWrapLineWhileTyping;
|
checkBoxAutoWrapWhileTyping.Checked = gs.AutoWrapLineWhileTyping;
|
||||||
textBoxShowLineBreaksAs.Text = gs.ListViewLineSeparatorString;
|
textBoxShowLineBreaksAs.Text = gs.ListViewLineSeparatorString;
|
||||||
|
|
||||||
numericUpDownDurationMin.Value = Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds;
|
numericUpDownDurationMin.Value = gs.SubtitleMinimumDisplayMilliseconds;
|
||||||
numericUpDownDurationMax.Value = Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds;
|
numericUpDownDurationMax.Value = gs.SubtitleMaximumDisplayMilliseconds;
|
||||||
|
|
||||||
if (Configuration.Settings.General.MininumMillisecondsBetweenLines >= numericUpDownMinGapMs.Minimum &&
|
if (gs.MininumMillisecondsBetweenLines >= numericUpDownMinGapMs.Minimum &&
|
||||||
Configuration.Settings.General.MininumMillisecondsBetweenLines <= numericUpDownMinGapMs.Maximum)
|
gs.MininumMillisecondsBetweenLines <= numericUpDownMinGapMs.Maximum)
|
||||||
numericUpDownMinGapMs.Value = Configuration.Settings.General.MininumMillisecondsBetweenLines;
|
numericUpDownMinGapMs.Value = gs.MininumMillisecondsBetweenLines;
|
||||||
|
|
||||||
if (gs.VideoPlayer.Trim().Equals("VLC", StringComparison.OrdinalIgnoreCase) && LibVlcDynamic.IsInstalled)
|
if (gs.VideoPlayer.Trim().Equals("VLC", StringComparison.OrdinalIgnoreCase) && LibVlcDynamic.IsInstalled)
|
||||||
radioButtonVideoPlayerVLC.Checked = true;
|
radioButtonVideoPlayerVLC.Checked = true;
|
||||||
@ -141,7 +141,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC.MpcHc.GetMpcHcFileName() == null)
|
if (Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC.MpcHc.GetMpcHcFileName() == null)
|
||||||
radioButtonVideoPlayerMpcHc.Enabled = false;
|
radioButtonVideoPlayerMpcHc.Enabled = false;
|
||||||
|
|
||||||
textBoxVlcPath.Text = Configuration.Settings.General.VlcLocation;
|
textBoxVlcPath.Text = gs.VlcLocation;
|
||||||
textBoxVlcPath.Left = labelVideoPlayerVLC.Left + labelVideoPlayerVLC.Width + 5;
|
textBoxVlcPath.Left = labelVideoPlayerVLC.Left + labelVideoPlayerVLC.Width + 5;
|
||||||
textBoxVlcPath.Width = buttonVlcPathBrowse.Left - textBoxVlcPath.Left - 5;
|
textBoxVlcPath.Width = buttonVlcPathBrowse.Left - textBoxVlcPath.Left - 5;
|
||||||
|
|
||||||
@ -305,7 +305,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
comboBoxTimeCodeMode.Items.Clear();
|
comboBoxTimeCodeMode.Items.Clear();
|
||||||
comboBoxTimeCodeMode.Items.Add(language.TimeCodeModeHHMMSSMS);
|
comboBoxTimeCodeMode.Items.Add(language.TimeCodeModeHHMMSSMS);
|
||||||
comboBoxTimeCodeMode.Items.Add(language.TimeCodeModeHHMMSSFF);
|
comboBoxTimeCodeMode.Items.Add(language.TimeCodeModeHHMMSSFF);
|
||||||
if (Configuration.Settings.General.UseTimeFormatHHMMSSFF)
|
if (gs.UseTimeFormatHHMMSSFF)
|
||||||
comboBoxTimeCodeMode.SelectedIndex = 1;
|
comboBoxTimeCodeMode.SelectedIndex = 1;
|
||||||
else
|
else
|
||||||
comboBoxTimeCodeMode.SelectedIndex = 0;
|
comboBoxTimeCodeMode.SelectedIndex = 0;
|
||||||
@ -329,7 +329,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
labelVideoPlayerMPlayer.Text = language.MPlayerDescription;
|
labelVideoPlayerMPlayer.Text = language.MPlayerDescription;
|
||||||
radioButtonVideoPlayerVLC.Text = language.VlcMediaPlayer;
|
radioButtonVideoPlayerVLC.Text = language.VlcMediaPlayer;
|
||||||
labelVideoPlayerVLC.Text = language.VlcMediaPlayerDescription;
|
labelVideoPlayerVLC.Text = language.VlcMediaPlayerDescription;
|
||||||
Configuration.Settings.General.VlcLocation = textBoxVlcPath.Text;
|
gs.VlcLocation = textBoxVlcPath.Text;
|
||||||
|
|
||||||
checkBoxVideoPlayerShowStopButton.Text = language.ShowStopButton;
|
checkBoxVideoPlayerShowStopButton.Text = language.ShowStopButton;
|
||||||
checkBoxVideoPlayerShowMuteButton.Text = language.ShowMuteButton;
|
checkBoxVideoPlayerShowMuteButton.Text = language.ShowMuteButton;
|
||||||
@ -462,8 +462,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
comboBoxListViewDoubleClickEvent.Items.Add(language.MainListViewEditTextAndPause);
|
comboBoxListViewDoubleClickEvent.Items.Add(language.MainListViewEditTextAndPause);
|
||||||
comboBoxListViewDoubleClickEvent.Items.Add(language.MainListViewEditText);
|
comboBoxListViewDoubleClickEvent.Items.Add(language.MainListViewEditText);
|
||||||
|
|
||||||
if (Configuration.Settings.General.ListViewDoubleClickAction >= 0 && Configuration.Settings.General.ListViewDoubleClickAction < comboBoxListViewDoubleClickEvent.Items.Count)
|
if (gs.ListViewDoubleClickAction >= 0 && gs.ListViewDoubleClickAction < comboBoxListViewDoubleClickEvent.Items.Count)
|
||||||
comboBoxListViewDoubleClickEvent.SelectedIndex = Configuration.Settings.General.ListViewDoubleClickAction;
|
comboBoxListViewDoubleClickEvent.SelectedIndex = gs.ListViewDoubleClickAction;
|
||||||
|
|
||||||
if (gs.AutoBackupSeconds == 60)
|
if (gs.AutoBackupSeconds == 60)
|
||||||
comboBoxAutoBackup.SelectedIndex = 1;
|
comboBoxAutoBackup.SelectedIndex = 1;
|
||||||
@ -474,7 +474,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
else
|
else
|
||||||
comboBoxAutoBackup.SelectedIndex = 0;
|
comboBoxAutoBackup.SelectedIndex = 0;
|
||||||
|
|
||||||
checkBoxCheckForUpdates.Checked = Configuration.Settings.General.CheckForUpdates;
|
checkBoxCheckForUpdates.Checked = gs.CheckForUpdates;
|
||||||
|
|
||||||
if (gs.SpellChecker.Contains("word", StringComparison.OrdinalIgnoreCase))
|
if (gs.SpellChecker.Contains("word", StringComparison.OrdinalIgnoreCase))
|
||||||
comboBoxSpellChecker.SelectedIndex = 1;
|
comboBoxSpellChecker.SelectedIndex = 1;
|
||||||
@ -595,8 +595,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (Configuration.Settings.VideoControls.WaveformBorderHitMs >= numericUpDownWaveformBorderHitMs.Minimum &&
|
if (Configuration.Settings.VideoControls.WaveformBorderHitMs >= numericUpDownWaveformBorderHitMs.Minimum &&
|
||||||
Configuration.Settings.VideoControls.WaveformBorderHitMs <= numericUpDownWaveformBorderHitMs.Maximum)
|
Configuration.Settings.VideoControls.WaveformBorderHitMs <= numericUpDownWaveformBorderHitMs.Maximum)
|
||||||
numericUpDownWaveformBorderHitMs.Value = Configuration.Settings.VideoControls.WaveformBorderHitMs;
|
numericUpDownWaveformBorderHitMs.Value = Configuration.Settings.VideoControls.WaveformBorderHitMs;
|
||||||
checkBoxUseFFmpeg.Checked = Configuration.Settings.General.UseFFmpegForWaveExtraction;
|
checkBoxUseFFmpeg.Checked = gs.UseFFmpegForWaveExtraction;
|
||||||
textBoxFFmpegPath.Text = Configuration.Settings.General.FFmpegLocation;
|
textBoxFFmpegPath.Text = gs.FFmpegLocation;
|
||||||
var generalNode = new TreeNode(Configuration.Settings.Language.General.GeneralText);
|
var generalNode = new TreeNode(Configuration.Settings.Language.General.GeneralText);
|
||||||
generalNode.Nodes.Add(language.MergeSelectedLines + GetShortcutText(Configuration.Settings.Shortcuts.GeneralMergeSelectedLines));
|
generalNode.Nodes.Add(language.MergeSelectedLines + GetShortcutText(Configuration.Settings.Shortcuts.GeneralMergeSelectedLines));
|
||||||
generalNode.Nodes.Add(language.MergeSelectedLinesOnlyFirstText + GetShortcutText(Configuration.Settings.Shortcuts.GeneralMergeSelectedLinesOnlyFirstText));
|
generalNode.Nodes.Add(language.MergeSelectedLinesOnlyFirstText + GetShortcutText(Configuration.Settings.Shortcuts.GeneralMergeSelectedLinesOnlyFirstText));
|
||||||
@ -798,8 +798,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
comboBoxShortcutKey.Left = labelShortcutKey.Left + labelShortcutKey.Width + 2;
|
comboBoxShortcutKey.Left = labelShortcutKey.Left + labelShortcutKey.Width + 2;
|
||||||
buttonUpdateShortcut.Left = comboBoxShortcutKey.Left + comboBoxShortcutKey.Width + 15;
|
buttonUpdateShortcut.Left = comboBoxShortcutKey.Left + comboBoxShortcutKey.Width + 15;
|
||||||
|
|
||||||
_oldVlcLocation = Configuration.Settings.General.VlcLocation;
|
_oldVlcLocation = gs.VlcLocation;
|
||||||
_oldVlcLocationRelative = Configuration.Settings.General.VlcLocationRelative;
|
_oldVlcLocationRelative = gs.VlcLocationRelative;
|
||||||
|
|
||||||
labelPlatform.Text = (IntPtr.Size * 8) + "-bit";
|
labelPlatform.Text = (IntPtr.Size * 8) + "-bit";
|
||||||
}
|
}
|
||||||
@ -1059,10 +1059,10 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
else
|
else
|
||||||
gs.AutoBackupSeconds = 0;
|
gs.AutoBackupSeconds = 0;
|
||||||
|
|
||||||
Configuration.Settings.General.CheckForUpdates = checkBoxCheckForUpdates.Checked;
|
gs.CheckForUpdates = checkBoxCheckForUpdates.Checked;
|
||||||
|
|
||||||
if (comboBoxTimeCodeMode.Visible)
|
if (comboBoxTimeCodeMode.Visible)
|
||||||
Configuration.Settings.General.UseTimeFormatHHMMSSFF = comboBoxTimeCodeMode.SelectedIndex == 1;
|
gs.UseTimeFormatHHMMSSFF = comboBoxTimeCodeMode.SelectedIndex == 1;
|
||||||
|
|
||||||
if (comboBoxSpellChecker.SelectedIndex == 1)
|
if (comboBoxSpellChecker.SelectedIndex == 1)
|
||||||
gs.SpellChecker = "word";
|
gs.SpellChecker = "word";
|
||||||
@ -1189,8 +1189,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Configuration.Settings.VideoControls.WaveformFocusOnMouseEnter = checkBoxWaveformHoverFocus.Checked;
|
Configuration.Settings.VideoControls.WaveformFocusOnMouseEnter = checkBoxWaveformHoverFocus.Checked;
|
||||||
Configuration.Settings.VideoControls.WaveformListViewFocusOnMouseEnter = checkBoxListViewMouseEnterFocus.Checked;
|
Configuration.Settings.VideoControls.WaveformListViewFocusOnMouseEnter = checkBoxListViewMouseEnterFocus.Checked;
|
||||||
Configuration.Settings.VideoControls.WaveformBorderHitMs = Convert.ToInt32(numericUpDownWaveformBorderHitMs.Value);
|
Configuration.Settings.VideoControls.WaveformBorderHitMs = Convert.ToInt32(numericUpDownWaveformBorderHitMs.Value);
|
||||||
Configuration.Settings.General.UseFFmpegForWaveExtraction = checkBoxUseFFmpeg.Checked;
|
gs.UseFFmpegForWaveExtraction = checkBoxUseFFmpeg.Checked;
|
||||||
Configuration.Settings.General.FFmpegLocation = textBoxFFmpegPath.Text;
|
gs.FFmpegLocation = textBoxFFmpegPath.Text;
|
||||||
|
|
||||||
//Main General
|
//Main General
|
||||||
foreach (TreeNode node in treeViewShortcuts.Nodes[0].Nodes)
|
foreach (TreeNode node in treeViewShortcuts.Nodes[0].Nodes)
|
||||||
|
@ -350,7 +350,7 @@ https://github.com/SubtitleEdit/subtitleedit
|
|||||||
|
|
||||||
private void buttonExport_Click(object sender, EventArgs e)
|
private void buttonExport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var saveFile = new SaveFileDialog() { Filter = "Text files (*.txt)|*.txt|NFO files (*.nfo)|*.nfo" };
|
var saveFile = new SaveFileDialog { Filter = "Text files (*.txt)|*.txt|NFO files (*.nfo)|*.nfo" };
|
||||||
if (saveFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
if (saveFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||||
{
|
{
|
||||||
string fileName = saveFile.FileName;
|
string fileName = saveFile.FileName;
|
||||||
|
@ -1077,7 +1077,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void SaveAsTarga(string fileName)
|
public void SaveAsTarga(string fileName)
|
||||||
{
|
{
|
||||||
// TGA header (18-byte fixed header)
|
// TGA header (18-byte fixed header)
|
||||||
byte[] header =
|
byte[] header =
|
||||||
{
|
{
|
||||||
|
@ -274,6 +274,10 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
|
|||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
|
path = @"C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe";
|
||||||
|
if (File.Exists(path))
|
||||||
|
return path;
|
||||||
|
|
||||||
path = @"C:\Program Files (x86)\MPC-HC\mpc-hc64.exe";
|
path = @"C:\Program Files (x86)\MPC-HC\mpc-hc64.exe";
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
return path;
|
return path;
|
||||||
|
Loading…
Reference in New Issue
Block a user