private void btStart_Click(object sender, EventArgs e) { MediaPlayer1.FilenamesOrURL.Add(edFilename.Text); MediaPlayer1.Loop = cbLoop.Checked; MediaPlayer1.Audio_PlayAudio = true; MediaPlayer1.Audio_OutputDevice = "Default DirectSound Device"; if (MediaPlayer1.Filter_Supported_EVR()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.EVR; } else if (MediaPlayer1.Filter_Supported_VMR9()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VMR9; } else { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VideoRenderer; } MediaPlayer1.MultiScreen_Enabled = true; MediaPlayer1.MultiScreen_Clear(); MediaPlayer1.MultiScreen_AddScreen(form2.Screen.Handle, form2.Screen.Width, form2.Screen.Height); MediaPlayer1.Play(); // set audio volume for each stream MediaPlayer1.Audio_OutputDevice_Balance_Set(0, tbBalance1.Value); MediaPlayer1.Audio_OutputDevice_Volume_Set(0, tbVolume1.Value); timer1.Enabled = true; }
private async void btStart_Click(object sender, EventArgs e) { mmError.Clear(); MediaPlayer1.FilenamesOrURL.Add(edFilename.Text); MediaPlayer1.Loop = cbLoop.Checked; MediaPlayer1.Audio_PlayAudio = true; MediaPlayer1.Source_Mode = VFMediaPlayerSource.DVD_DS; // read DVD info cbDVDControlTitle.Items.Clear(); cbDVDControlChapter.Items.Clear(); cbDVDControlAudio.Items.Clear(); cbDVDControlSubtitles.Items.Clear(); MediaInfo.Filename = edFilename.Text; MediaInfo.ReadDVDInfo(); for (int i = 0; i < MediaInfo.DVD_Disc_NumOfTitles; i++) { cbDVDControlTitle.Items.Add("Title " + (i + 1)); } MediaPlayer1.Audio_OutputDevice = "Default DirectSound Device"; if (VideoCapture.Filter_Supported_EVR()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.EVR; } else if (VideoCapture.Filter_Supported_VMR9()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VMR9; } else { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VideoRenderer; } MediaPlayer1.Debug_Mode = cbDebugMode.Checked; await MediaPlayer1.PlayAsync(); // DVD // select and play first title if (cbDVDControlTitle.Items.Count > 0) { cbDVDControlTitle.SelectedIndex = 0; cbDVDControlTitle_SelectedIndexChanged(null, null); } // show title menu MediaPlayer1.DVD_Menu_Show(VFDVDMenu.Title); MediaPlayer1.Audio_OutputDevice_Balance_Set(0, tbBalance1.Value); MediaPlayer1.Audio_OutputDevice_Volume_Set(0, tbVolume1.Value); timer1.Enabled = true; }
private void btStart_Click(object sender, EventArgs e) { mmError.Clear(); switch (cbSourceMode.SelectedIndex) { case 0: MediaPlayer1.Source_Mode = VFMediaPlayerSource.LAV; break; case 1: MediaPlayer1.Source_Mode = VFMediaPlayerSource.File_DS; break; case 2: MediaPlayer1.Source_Mode = VFMediaPlayerSource.File_FFMPEG; break; case 3: MediaPlayer1.Source_Mode = VFMediaPlayerSource.File_VLC; break; } MediaPlayer1.FilenamesOrURL.Add(edFilename.Text); MediaPlayer1.Loop = cbLoop.Checked; MediaPlayer1.Audio_PlayAudio = true; MediaPlayer1.Audio_OutputDevice = "Default DirectSound Device"; if (MediaPlayer1.Filter_Supported_EVR()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.EVR; } else if (MediaPlayer1.Filter_Supported_VMR9()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VMR9; } else { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VideoRenderer; } MediaPlayer1.Debug_Mode = cbDebugMode.Checked; MediaPlayer1.Play(); // set audio volume for each stream MediaPlayer1.Audio_OutputDevice_Balance_Set(0, tbBalance1.Value); MediaPlayer1.Audio_OutputDevice_Volume_Set(0, tbVolume1.Value); timer1.Enabled = true; }
private async void btStart_Click(object sender, EventArgs e) { mmError.Clear(); MediaPlayer1.Source_Mode = VFMediaPlayerSource.LAV; MediaPlayer1.FilenamesOrURL.Add(edFilename.Text); MediaPlayer1.Audio_PlayAudio = true; MediaPlayer1.Info_UseLibMediaInfo = true; MediaPlayer1.Audio_OutputDevice = "Default DirectSound Device"; if (MediaPlayer1.Filter_Supported_EVR()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.EVR; } else if (MediaPlayer1.Filter_Supported_VMR9()) { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VMR9; } else { MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VideoRenderer; } MediaPlayer1.Debug_Mode = cbDebugMode.Checked; MediaPlayer1.Video_Effects_GPU_Enabled = true; MediaPlayer1.Video_Effects_GPU_Clear(); if (rbVRCubemap.Checked) { vr = new VFGPUVideoEffectEquiangularCubemap360(true, 0, 0, 0, 80, "VR"); } else { vr = new VFGPUVideoEffectEquirectangular360(true, 0, 0, 0, 80, "VR"); } MediaPlayer1.Video_Effects_GPU_Add(vr); // MediaPlayer1.Video_Effects_GPU_Add(new VFGPUVideoEffectEquirectangular360(true)); await MediaPlayer1.PlayAsync(); // set audio volume for each stream MediaPlayer1.Audio_OutputDevice_Balance_Set(0, tbBalance1.Value); MediaPlayer1.Audio_OutputDevice_Volume_Set(0, tbVolume1.Value); timer1.Enabled = true; }
private void btStart_Click(object sender, EventArgs e) { mmError.Clear(); MediaPlayer1.FilenamesOrURL.Add(edFilename.Text); MediaPlayer1.Audio_PlayAudio = true; MediaPlayer1.Source_Mode = VFMediaPlayerSource.File_DS; MediaPlayer1.Audio_OutputDevice = "Default DirectSound Device"; MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.None; MediaPlayer1.Debug_Mode = cbDebugMode.Checked; MediaPlayer1.Play(); MediaPlayer1.Audio_OutputDevice_Balance_Set(0, tbBalance1.Value); MediaPlayer1.Audio_OutputDevice_Volume_Set(0, tbVolume1.Value); timer1.Enabled = true; }
private void tbVolume1_Scroll(object sender, EventArgs e) { MediaPlayer1.Audio_OutputDevice_Volume_Set(0, tbVolume1.Value); }