private void FillVideoFormats() { int nCount = 0; int nIndex; string strFormat; M_VID_PROPS vidProps; comboBoxVF.Items.Clear(); m_objFile.FormatVideoGetCount(eMFormatType.eMFT_Convert, out nCount); comboBoxVF.Enabled = nCount > 0; if (nCount > 0) { for (int i = 0; i < nCount; i++) { m_objFile.FormatVideoGetByIndex(eMFormatType.eMFT_Convert, i, out vidProps, out strFormat); if (vidProps.eVideoFormat == eMVideoFormat.eMVF_HD1080_5994i) { startVideoFormat = i; } comboBoxVF.Items.Add(strFormat); } m_objFile.FormatVideoGet(eMFormatType.eMFT_Convert, out vidProps, out nIndex, out strFormat); if (nIndex > 0) { comboBoxVF.SelectedIndex = nIndex; } else { comboBoxVF.SelectedIndex = 0; } } }
private void button1_Click(object sender, EventArgs e) { if (listBox1.GetSelected(0) || listBox1.GetSelected(1)) { m_objMPFile.FileNameSet(listBox1.SelectedItem.ToString(), ""); } else { m_objMPFile.FileNameSet(textBox1.Text.ToString(), ""); } //m_objMPFile.FileNameSet(@"D:\Firefox\NUEVO Conejos con huron.mp4", ""); m_objMPFile.FilePlayStart(); m_objMPFile.FilePlayPause(0); M_VID_PROPS props; int index; string name; m_objMPFile.FormatVideoGet(eMFormatType.eMFT_Output, out props, out index, out name); double inTime; double outTime; double durTime; m_objMPFile.FileInOutGet(out inTime, out outTime, out durTime); double pos = 0.0; double curPos; double step = 60.0; bool ok = true; while (pos < durTime) { try { m_objMPFile.FilePosSet(pos, 0); Thread.Sleep(500); m_objMPFile.FilePosGet(out curPos); if (pos - curPos > step) { MessageBox.Show("Broken File"); ok = false; break; } } catch (Exception ex) { MessageBox.Show(ex.ToString() + "Broken File"); } pos += step; } if (ok) { MessageBox.Show("File is Ok"); } }
void GetProps() { m_objFile.FormatVideoGet(eMFormatType.eMFT_Input, out props, out index, out name); }