mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Fixed some trouble
This commit is contained in:
parent
13d870bdd3
commit
60c0cf5b8b
@ -668,7 +668,10 @@ namespace Nikse.SubtitleEdit.Core
|
||||
OpenSubtitleExtraExtensions = "*.mp4;*.m4v;*.mkv;*.ts"; // matroska/mp4/m4v files (can contain subtitles)
|
||||
ListViewColumnsRememberSize = true;
|
||||
VlcWaveTranscodeSettings = "acodec=s16l"; // "acodec=s16l,channels=1,ab=64,samplerate=8000";
|
||||
MpvVideoOutput = "vaapi"; // mpv "vo" option
|
||||
if(Configuration.IsRunningOnLinux())
|
||||
MpvVideoOutput = "vaapi"; // mpv "vo" option
|
||||
else
|
||||
MpvVideoOutput = "direct3d_shaders";
|
||||
UseTimeFormatHHMMSSFF = false;
|
||||
ClearStatusBarAfterSeconds = 10;
|
||||
MoveVideo100Or500MsPlaySmallSample = false;
|
||||
|
@ -2327,10 +2327,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void RefreshMpvSettings()
|
||||
{
|
||||
radioButtonVideoPlayerMPV.Enabled = LibMpvDynamic.IsInstalled;
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
labelMpvSettings.Text = "--vo=" + Configuration.Settings.General.MpvVideoOutput;
|
||||
else
|
||||
if (Configuration.IsRunningOnLinux() && (Configuration.Settings.General.MpvVideoOutput == "direct3d_shaders"))
|
||||
labelMpvSettings.Text = "--vo=vaapi";
|
||||
else
|
||||
labelMpvSettings.Text = "--vo=" + Configuration.Settings.General.MpvVideoOutput;
|
||||
}
|
||||
|
||||
private void linkLabelBingSubscribe_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
|
42
src/Forms/SettingsMpv.Designer.cs
generated
42
src/Forms/SettingsMpv.Designer.cs
generated
@ -40,36 +40,26 @@
|
||||
//
|
||||
// buttonDownload
|
||||
//
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
{
|
||||
this.buttonDownload.Location = new System.Drawing.Point(12, 24);
|
||||
this.buttonDownload.Name = "buttonDownload";
|
||||
this.buttonDownload.Size = new System.Drawing.Size(186, 23);
|
||||
this.buttonDownload.TabIndex = 0;
|
||||
this.buttonDownload.Text = "Download mpv dll";
|
||||
this.buttonDownload.UseVisualStyleBackColor = true;
|
||||
this.buttonDownload.Click += new System.EventHandler(this.buttonDownload_Click_1);
|
||||
}
|
||||
|
||||
this.buttonDownload.Location = new System.Drawing.Point(12, 24);
|
||||
this.buttonDownload.Name = "buttonDownload";
|
||||
this.buttonDownload.Size = new System.Drawing.Size(186, 23);
|
||||
this.buttonDownload.TabIndex = 0;
|
||||
this.buttonDownload.Text = "Download mpv dll";
|
||||
this.buttonDownload.UseVisualStyleBackColor = true;
|
||||
this.buttonDownload.Click += new System.EventHandler(this.buttonDownload_Click_1);
|
||||
|
||||
|
||||
//
|
||||
// comboBoxVideoOutput
|
||||
//
|
||||
this.comboBoxVideoOutput.FormattingEnabled = true;
|
||||
if (Configuration.IsRunningOnLinux())
|
||||
{
|
||||
this.comboBoxVideoOutput.Items.AddRange(new object[] {
|
||||
"sdl",
|
||||
"vaapi",
|
||||
"vdpau"});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.comboBoxVideoOutput.Items.AddRange(new object[] {
|
||||
"direct3d_shaders",
|
||||
"direct3d ",
|
||||
"sdl",
|
||||
"vaapi",
|
||||
"vdpau"});
|
||||
}
|
||||
this.comboBoxVideoOutput.Items.AddRange(new object[] {
|
||||
"direct3d_shaders",
|
||||
"direct3d ",
|
||||
"sdl",
|
||||
"vaapi",
|
||||
"vdpau"});
|
||||
|
||||
this.comboBoxVideoOutput.Location = new System.Drawing.Point(12, 109);
|
||||
this.comboBoxVideoOutput.Name = "comboBoxVideoOutput";
|
||||
|
@ -9,19 +9,29 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
public sealed partial class SettingsMpv : Form
|
||||
{
|
||||
|
||||
public SettingsMpv()
|
||||
{
|
||||
|
||||
|
||||
InitializeComponent();
|
||||
labelPleaseWait.Text = string.Empty;
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
comboBoxVideoOutput.Text = Configuration.Settings.General.MpvVideoOutput;
|
||||
else
|
||||
if (Configuration.IsRunningOnLinux() && (Configuration.Settings.General.MpvVideoOutput == "direct3d_shaders"))
|
||||
comboBoxVideoOutput.Text = "vaapi";
|
||||
|
||||
else
|
||||
comboBoxVideoOutput.Text = Configuration.Settings.General.MpvVideoOutput;
|
||||
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
|
||||
buttonOK.Text = Configuration.Settings.Language.General.Ok;
|
||||
Text = Configuration.Settings.Language.SettingsMpv.Title;
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
buttonDownload.Text = Configuration.Settings.Language.SettingsMpv.DownloadMpv;
|
||||
|
||||
if (Configuration.IsRunningOnLinux())
|
||||
{
|
||||
comboBoxVideoOutput.Items.Clear();
|
||||
comboBoxVideoOutput.Items.AddRange(new object[] { "direct3d ", "sdl", "vaapi", "vdpau" });
|
||||
}
|
||||
}
|
||||
|
||||
private void wc_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e)
|
||||
@ -33,6 +43,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
buttonOK.Enabled = true;
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
buttonDownload.Enabled = true;
|
||||
else
|
||||
buttonDownload.Enabled = false;
|
||||
Cursor = Cursors.Default;
|
||||
return;
|
||||
}
|
||||
@ -60,6 +72,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
buttonOK.Enabled = true;
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
buttonDownload.Enabled = true;
|
||||
else
|
||||
buttonDownload.Enabled = false;
|
||||
MessageBox.Show(Configuration.Settings.Language.SettingsMpv.DownloadMpvOk);
|
||||
}
|
||||
|
||||
@ -69,8 +83,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
labelPleaseWait.Text = Configuration.Settings.Language.General.PleaseWait;
|
||||
buttonOK.Enabled = false;
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
buttonDownload.Enabled = false;
|
||||
buttonDownload.Enabled = false;
|
||||
Refresh();
|
||||
Cursor = Cursors.WaitCursor;
|
||||
|
||||
@ -89,6 +102,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
buttonOK.Enabled = true;
|
||||
if (!Configuration.IsRunningOnLinux())
|
||||
buttonDownload.Enabled = true;
|
||||
else
|
||||
buttonDownload.Enabled = false;
|
||||
Cursor = Cursors.Default;
|
||||
MessageBox.Show(exception.Message + Environment.NewLine + Environment.NewLine + exception.StackTrace);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
GeneralSettings gs = Configuration.Settings.General;
|
||||
|
||||
if (Configuration.IsRunningOnLinux())
|
||||
return new LibMpvMono();
|
||||
return new LibMpvMono();
|
||||
|
||||
// Mono on OS X is 32 bit and thus requires 32 bit VLC. Place VLC in the same
|
||||
// folder as Subtitle Edit and add this to the app.config inside the
|
||||
|
@ -378,7 +378,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
{
|
||||
_mpvInitialize.Invoke(_mpvHandle);
|
||||
|
||||
string videoOutput = "vaapi";
|
||||
string videoOutput = "direct3d_shaders";
|
||||
if (!string.IsNullOrWhiteSpace(Configuration.Settings.General.MpvVideoOutput))
|
||||
videoOutput = Configuration.Settings.General.MpvVideoOutput;
|
||||
_mpvSetOptionString(_mpvHandle, GetUtf8Bytes("vo"), GetUtf8Bytes(videoOutput)); // "direct3d_shaders" is default, "direct3d" could be used for compabality with old systems
|
||||
|
Loading…
Reference in New Issue
Block a user