so not working... urgently need help
private void menuItem6_Click(object sender, EventArgs e)
{
CleanUp();
listBox1.Items.Clear();
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Multiselect = true;
if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
files = openFileDialog.SafeFileNames;
paths = openFileDialog.FileNames;
for (int i = 0; i < files.Length; i++)
listBox1.Items.Add(files[i]);
}
for (int i = 0; i < openFileDialog.FileNames.Length; i++)
{
m_objFilterGraph = new FilgraphManager();
m_objFilterGraph.RenderFile(paths[i]);
m_objBasicAudio = m_objFilterGraph as IBasicAudio;
// Построение интерфейса(разделение аудио и видео)
try
{
m_objVideoWindow = m_objFilterGraph as IVideoWindow;
m_objVideoWindow.Owner = (int)panel1.Handle;
m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;
m_objVideoWindow.SetWindowPosition(panel1.ClientRectangle.Left,
panel1.ClientRectangle.Top,
panel1.ClientRectangle.Width,
panel1.ClientRectangle.Height);
}
catch (Exception)
{
m_objVideoWindow = null;
}
m_objMediaEvent = m_objFilterGraph as IMediaEvent;
m_objMediaEventEx = m_objFilterGraph as IMediaEventEx;
m_objMediaEventEx.SetNotifyWindow((int)this.Handle, WM_GRAPHNOTIFY, 0);
m_objMediaPosition = m_objFilterGraph as IMediaPosition;
m_objMediaControl = m_objFilterGraph as IMediaControl;
this.Text = "DirectShow - [" + openFileDialog.FileName + "]";
m_objMediaControl.Run();
m_CurrentStatus = MediaStatus.Running;
UpdateStatusBar();
UpdateToolBar();
}
}