mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Optimize VLC cast
This commit is contained in:
parent
c4c0439208
commit
e95c9c88c5
@ -5,6 +5,7 @@ using Nikse.SubtitleEdit.Logic.Enums;
|
||||
using Nikse.SubtitleEdit.Logic.Networking;
|
||||
using Nikse.SubtitleEdit.Logic.SubtitleFormats;
|
||||
using Nikse.SubtitleEdit.Logic.VideoFormats;
|
||||
using Nikse.SubtitleEdit.Logic.VideoPlayers;
|
||||
using Nikse.SubtitleEdit.Logic.VobSub;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -17048,9 +17049,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
setVideoOffsetToolStripMenuItem.Visible = !string.IsNullOrEmpty(_videoFileName) && Configuration.Settings.General.ShowBetaStuff;
|
||||
|
||||
toolStripMenuItemSetAudioTrack.Visible = false;
|
||||
if (mediaPlayer.VideoPlayer != null && mediaPlayer.VideoPlayer is Logic.VideoPlayers.LibVlcDynamic)
|
||||
var libVlc = mediaPlayer.VideoPlayer as LibVlcDynamic;
|
||||
if (libVlc != null)
|
||||
{
|
||||
var libVlc = (Logic.VideoPlayers.LibVlcDynamic)mediaPlayer.VideoPlayer;
|
||||
int numberOfTracks = libVlc.AudioTrackCount;
|
||||
_videoAudioTrackNumber = libVlc.AudioTrackNumber;
|
||||
if (numberOfTracks > 1)
|
||||
@ -17080,9 +17081,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void ChooseAudioTrack(object sender, EventArgs e)
|
||||
{
|
||||
if (mediaPlayer.VideoPlayer != null && mediaPlayer.VideoPlayer is Logic.VideoPlayers.LibVlcDynamic)
|
||||
var libVlc = mediaPlayer.VideoPlayer as LibVlcDynamic;
|
||||
if (libVlc != null)
|
||||
{
|
||||
var libVlc = (Logic.VideoPlayers.LibVlcDynamic)mediaPlayer.VideoPlayer;
|
||||
var item = sender as ToolStripItem;
|
||||
|
||||
int number = int.Parse(item.Text);
|
||||
|
Loading…
Reference in New Issue
Block a user