public OverlayHTMLWindow(Object _objOverlayHTML, Object _source, M_VID_PROPS _vProps) { m_bStateOk = false; InitializeComponent(); m_vProps = _vProps; try { m_objOverlayHTML = (MFOverlayHTMLClass)_objOverlayHTML; m_object = _source; } catch (Exception ex) { return; } if (m_vProps.nHeight == 0 || m_vProps.nWidth == 0) { return; } m_objPreview = new MFPreviewClass(); m_objPreview.PreviewWindowSet("", panelPreview.Handle.ToInt32()); m_objPreview.PreviewEnable("", 0, 1); m_objPreview.PropsSet("preview.downscale", "0"); m_objPreview.PropsSet("deinterlace", "false"); panelPreview.MouseWheel += new MouseEventHandler(panelPreview_MouseWheel); panelPreview.KeyDown += new KeyEventHandler(panelPreview_KeyDown); panelPreview.KeyPress += new KeyPressEventHandler(panelPreview_KeyPress); panelPreview.KeyUp += new KeyEventHandler(panelPreview_KeyUp); mfAttributesList.SetControlledObject((IMProps)m_objOverlayHTML); mfAttributesListPresets1.SetControlledObject(m_objOverlayHTML); mfAttributesListPresets1.OnPropsUpdated += new EventHandler(mfAttributesListPresets1_OnPropsUpdated); m_objOverlayHTML.OnEventSafe += new IMEventsEvent_OnEventSafeEventHandler(m_objOverlayHTML_OnEventSafe); string strCurrURL; m_objOverlayHTML.PropsGet("current_url", out strCurrURL); textBoxPathOrURL.Text = strCurrURL; m_bStateOk = true; }
public MediaPlayer() { State = MediaPlayerState.None; mavProps.vidProps.eVideoFormat = eMVideoFormat.eMVF_Custom; mfPreview.PreviewEnable("", 0, 1); mfPreview.PropsSet("maintain_ar", "false"); }
private void Grid_Loaded(object sender, RoutedEventArgs e) { m_objPreview = new MFPreviewClass(); m_objLive = new MFLiveClass(); m_objReader = new MFReaderClass(); m_objPreview.PropsSet("wpf_preview", "true"); previewSource = new D3DImage(); m_objPreview.PreviewEnable("", 1, 1); m_objPreview.OnEventSafe += M_objPreview_OnEventSafe; GetNoSignalFrame(); cancelSource = new CancellationTokenSource(); m_threadWorker = new Thread(() => thread_DoWork(cancelSource.Token)); m_threadWorker.Name = "thread_DoWork"; m_threadWorker.Start(); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { m_objPreview.PropsSet("audio_renderer", comboBoxAudioRenderers.SelectedItem.ToString()); }
private void checkBoxAR_CheckedChanged(object sender, EventArgs e) { m_objPreview.PropsSet("maintain_ar", Convert.ToString(checkBoxAR.Checked)); }