private void Form1_Load(object sender, EventArgs e) { m_objMPFile = new MFileClass(); m_objMPFile.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objMPFile.PreviewEnable("", 1, 1); }
public void Dispose() { if (_mfileObj != null) { Marshal.ReleaseComObject(_mfileObj); _mfileObj = null; } }
private void Form1_Load(object sender, EventArgs e) { m_objPlaylist = new MPlaylistClass(); m_objWriter = new MWriterClass(); m_objFile = new MFileClass(); m_objFile.PreviewWindowSet("", panelPrev.Handle.ToInt32()); m_objFile.PreviewEnable("", 0, 1); }
public override void Dispose() { base.Dispose(); if (_mfileObj != null) { Marshal.ReleaseComObject(_mfileObj); _mfileObj = null; } }
void StartMFile() { m_objFile = new MFileClass(); m_objFile.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objFile.PreviewEnable("", 0, 1); m_objFile.FileNameSet(@"\\MLDiskStation\MLFiles\MediaTest\MP4\!1080p 60fpsOri and the Will of the Wisps.mp4", ""); m_objFile.FilePlayStart(); }
private void Form1_Load(object sender, EventArgs e) { m_objMFile = new MFileClass(); m_objMFile.OnFrameSafe += M_objMFile_OnFrameSafe; m_objPreview = new MPreviewClass(); m_objPreview.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objPreview.PreviewEnable("", 1, 1); }
private void Form1_Load(object sender, EventArgs e) { m_objMPlaylist = new MPlaylistClass(); m_objMFile = new MFileClass(); m_objMPlaylist.PreviewWindowSet("", PlaylistPrev.Handle.ToInt32()); m_objMPlaylist.PreviewEnable("", 1, 1); m_objMFile.PreviewWindowSet("", FilePrev.Handle.ToInt32()); m_objMFile.PreviewEnable("", 1, 1); }
private void Form1_Load(object sender, EventArgs e) { m_objWriter = new MWriterClass(); m_objLive = new MLiveClass(); m_objFile = new MFileClass(); m_objPlaylist = new MPlaylistClass(); m_objPlaylist.PreviewWindowSet("", panelPlaylist.Handle.ToInt32()); m_objPlaylist.PreviewEnable("", 0, 1); m_objFile.PreviewWindowSet("", panelFile.Handle.ToInt32()); m_objFile.PreviewEnable("", 0, 1); m_objLive.PreviewWindowSet("", livePanel.Handle.ToInt32()); m_objLive.PreviewEnable("", 0, 1); m_objLive.OnFrameSafe += M_objLive_OnFrameSafe; m_objFile.OnEventSafe += M_objFile_OnEventSafe; m_objPlaylist.OnFrameSafe += M_objPlaylist_OnFrameSafe; m_objWriter.PropsSet("embed_scte35", "true"); m_objFile.PropsSet("object::on_event.sync", "true"); m_objPlaylist.PropsSet("object::on_frame.sync", "true"); m_objLive.PropsSet("object::on_event.sync", "true"); int count = 0; m_objLive.DeviceGetCount(0, "video", out count); string[] arr = new string[count]; string name; string xml; for (int i = 0; i < count; i++) { m_objLive.DeviceGetByIndex(0, "video", i, out name, out xml); arr[i] = name; } m_objLive.DeviceSet("video", arr[5], ""); m_objLive.ObjectStart(null); MItem item; //m_objPlaylist.PlaylistBackgroundSet(m_objLive, "live", "live", out item); //m_objPlaylist.FilePlayStart(); m_objWriter.WriterNameSet(streamPath_txb.Text, " format='mpegts' protocol='udp://' video::codec='mpeg2video' video::b='5M' audio::codec='mp2'"); m_objWriter.ObjectStart(m_objLive); }
private void Form1_Load(object sender, EventArgs e) { m_objMPFile = new MFileClass(); //m_objMPFile.OnFrameSafe += M_objMPFile_OnFrameSafe; //di = new DriveInfo(@"M:\"); m_objMPFile.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objMPFile.PreviewEnable("", 1, 1); }
private void Form1_Load(object sender, EventArgs e) { m_objWriter = new MWriterClass(); m_objPlaylist = new MPlaylistClass(); m_objFile = new MFileClass(); m_objFile.PreviewWindowSet("", panelPreview_pnl.Handle.ToInt32()); m_objFile.PreviewEnable("", 1, 1); int a = -60 * (6 - -100); string b = ""; }
private void Dispose(bool disposing) { if (disposing) { GC.SuppressFinalize(this); } if (_mfileObj != null) { Marshal.ReleaseComObject(_mfileObj); _mfileObj = null; } }
private void Form1_Load(object sender, EventArgs e) { m_objFile = new MFileClass(); m_objRenderer = new MRendererClass(); m_objFile.PreviewWindowSet("", panelFile.Handle.ToInt32()); m_objFile.PreviewEnable("", 0, 1); FileRenList(); FileFormats(); }
private void Form1_Load(object sender, EventArgs e) { m_objFile1 = new MFileClass(); m_objFile2 = new MFileClass(); HTML5Plugin1 = new MFOverlayHTMLClass(); HTML5Plugin2 = new MFOverlayHTMLClass(); m_objPlaylist = new MPlaylistClass(); m_objPlaylist.PreviewWindowSet("", panelPr.Handle.ToInt32()); m_objPlaylist.PreviewEnable("", 1, 1); SetMFile(); }
private void Form1_Load(object sender, EventArgs e) { m_objLive1 = new MFileClass(); m_objLive2 = new MFileClass(); m_objLive3 = new MFileClass(); m_objLive4 = new MFileClass(); m_objLive5 = new MFileClass(); m_objLive6 = new MFileClass(); m_objLive7 = new MFileClass(); m_objLive8 = new MFileClass(); m_objLive9 = new MFileClass(); m_objLive10 = new MFileClass(); m_objLive1.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objLive1.PreviewEnable("", 0, 1); m_objLive2.PreviewWindowSet("", panel2.Handle.ToInt32()); m_objLive2.PreviewEnable("", 0, 1); m_objLive3.PreviewWindowSet("", panel3.Handle.ToInt32()); m_objLive3.PreviewEnable("", 0, 1); m_objLive4.PreviewWindowSet("", panel4.Handle.ToInt32()); m_objLive4.PreviewEnable("", 0, 1); m_objLive5.PreviewWindowSet("", panel5.Handle.ToInt32()); m_objLive5.PreviewEnable("", 0, 1); m_objLive6.PreviewWindowSet("", panel6.Handle.ToInt32()); m_objLive6.PreviewEnable("", 0, 1); m_objLive7.PreviewWindowSet("", panel7.Handle.ToInt32()); m_objLive7.PreviewEnable("", 0, 1); m_objLive8.PreviewWindowSet("", panel8.Handle.ToInt32()); m_objLive8.PreviewEnable("", 0, 1); m_objLive9.PreviewWindowSet("", panel9.Handle.ToInt32()); m_objLive9.PreviewEnable("", 0, 1); m_objLive10.PreviewWindowSet("", panel10.Handle.ToInt32()); m_objLive10.PreviewEnable("", 0, 1); m_objLive11 = new MFileClass(); m_objLive11.PreviewWindowSet("", panel11.Handle.ToInt32()); m_objLive11.PreviewEnable("", 1, 1); }
private void Form1_Load(object sender, EventArgs e) { m_objMPWriter = new MWriterClass(); m_objMPFile = new MFileClass(); m_objFile = new MFileClass(); m_objMPFile.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objMPFile.PreviewEnable("", 0, 1); m_objMPFile.FileNameSet(@"M:\MEDIA_TEST\!PATAGONIA 1080p.mp4", ""); m_objMPFile.FilePlayStart(); m_objMPWriter.WriterNameSet(pathA, ""); m_objMPWriter.ObjectStart(m_objMPFile); }
private void Form1_Load(object sender, EventArgs e) { //Filing the comboboxes with Matrixes and ColorChannels foreach (var m in Matrixes) { PredifinedMatrix_txb.Items.Add(m.Key); } PredifinedMatrix_txb.SelectedIndex = Matrixes.Count - 1; foreach (var c in colors) { ColorLevel_cmb.Items.Add(c); } ColorLevel_cmb.SelectedIndex = 0; m_objMFile = new MFileClass(); }
void Restart(string quality) { m_objMPFile.ObjectClose(); Marshal.ReleaseComObject(m_objMPFile); Thread.Sleep(500); test = test == "false" ? "true" : "false"; m_objMPFile = new MFileClass(); (m_objMPFile as IMProps).PropsSet("preview.downscale", quality); (m_objMPFile as IMProps).PropsSet("preview.overlay_waveform", "true"); m_objMPFile.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objMPFile.PreviewEnable("", 1, 1); m_objMPFile.FileNameSet(textBox1.Text, ""); m_objMPFile.FilePlayStart(); }
void TurnOnGPU_Pipeline() { if (!gpu_p) { m_objMFFactory = new MFFactoryClass(); m_objMFFactory.PropsSet("gpu_pipeline", "true"); gpu_p = true; GpuPipilineOn_btn.Text = "GPU PIPELINE = ON"; GpuPipilineOn_btn.BackColor = Color.Green; Reset_btn.Enabled = true; PredifinedMatrix_txb.Enabled = true; ColorLevel_cmb.Enabled = true; Red_trb.Enabled = true; Green_trb.Enabled = true; Blue_trb.Enabled = true; Constant_trb.Enabled = true; RedChannel_txb.Enabled = true; GreenChannel_txb.Enabled = true; BlueChannel_txb.Enabled = true; ConstantChannel_txb.Enabled = true; //When we turn on the gpu_pipeline we need to recreate objects. //To continue playback from same position we take current and save it m_objMFile.FilePosGet(out double position); m_objMFile.FilePlayStop(0); Marshal.ReleaseComObject(m_objMFile); m_objMFile = new MFileClass(); m_objMFile.PreviewWindowSet("", panelPreview.Handle.ToInt32()); m_objMFile.PreviewEnable("", 1, 1); if (filePath.Length > 1) { m_objMFile.FileNameSet(filePath, "loop=true"); m_objMFile.FilePosSet(position, 0); m_objMFile.FilePlayStart(); } PredifinedMatrix_txb.SelectedIndex = 0; } }
private void Form1_Load(object sender, EventArgs e) { m_objMFile1 = new MFileClass(); m_objPreview1 = new MPreviewClass(); m_objPreview1.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objPreview1.PreviewEnable("", 0, 1); m_objPreview1.ObjectStart(null); m_objMFile2 = new MFileClass(); m_objPreview2 = new MPreviewClass(); m_objPreview2.PreviewWindowSet("", panel2.Handle.ToInt32()); m_objPreview2.PreviewEnable("", 0, 1); m_objMFile3 = new MFileClass(); m_objPreview3 = new MPreviewClass(); m_objPreview3.PreviewWindowSet("", panel3.Handle.ToInt32()); m_objPreview3.PreviewEnable("", 0, 1); m_objMFile4 = new MFileClass(); m_objPreview4 = new MPreviewClass(); m_objPreview4.PreviewWindowSet("", panel4.Handle.ToInt32()); m_objPreview4.PreviewEnable("", 0, 1); m_objMFile1.OnFrameSafe += M_objMFile1_OnFrameSafe; m_objMFile2.OnFrameSafe += M_objMFile2_OnFrameSafe; m_objMFile3.OnFrameSafe += M_objMFile3_OnFrameSafe; m_objMFile4.OnFrameSafe += M_objMFile4_OnFrameSafe; foreach (var s in sources) { listBox1.Items.Add(s); listBox2.Items.Add(s); listBox3.Items.Add(s); listBox4.Items.Add(s); } }
private void Form1_Load(object sender, EventArgs e) { m_objMFile = new MFileClass(); m_objPlaylist = new MPlaylistClass(); m_objMFile.PreviewWindowSet("", panelPr.Handle.ToInt32()); m_objMFile.PreviewEnable("", 0, 1); m_objMFile.FileNameSet(@"\\192.168.0.100\MLFiles\Trash\Roman\WorkFiles\FilesFromCostumer\2019.03.06Etere31735\MEM001M-20190306Z143546.mp4", "loop=true"); m_objMFile.FilePlayStart(); m_objPlaylist.PreviewWindowSet("", panelPrPl.Handle.ToInt32()); m_objPlaylist.PreviewEnable("", 0, 1); int index = -1; m_objPlaylist.PlaylistAdd(null, @"\\192.168.0.100\MLFiles\Trash\Roman\WorkFiles\FilesFromCostumer\2019.03.06Etere31735\MEM001M-20190306Z143546.mp4", "loop=true", index, out item); m_objPlaylist.FilePlayStart(); }
private void OpenFileMFile_btn_Click(object sender, EventArgs e) { MarshalAll(); m_objMFile = new MFileClass(); if (openFileDialog1.ShowDialog() == DialogResult.OK && openFileDialog1.FileNames.Length != 0) { filePath = openFileDialog1.FileNames[0].ToString(); SendMes("StatMFile"); startTime = DateTime.Now; m_objMFile.FileNameSet(filePath, addParams.Text); endTime = DateTime.Now; CalcTimeSpan(); SendMes("MFile takes: " + duration.TotalMilliseconds.ToString() + " TotalMilliseconds"); SendMes("With this Params : " + addParams.Text); ReInitPr("MFile"); m_objMFile.FilePlayStart(); } }
private void Form1_Load(object sender, EventArgs e) { m_objFile = new MFileClass(); m_objPlaylist = new MPlaylistClass(); m_objFile.PreviewWindowSet("", panelPrFile.Handle.ToInt32()); m_objFile.PreviewEnable("", 1, 1); m_objPlaylist.PreviewWindowSet("", panelPrPlaylist.Handle.ToInt32()); m_objPlaylist.PreviewEnable("", 1, 1); int index = -1; m_objPlaylist.PlaylistAdd(null, path, "", ref index, out item); m_objPlaylist.FilePlayStart(); m_objFile.FileNameSet(path, ""); m_objFile.FilePlayStart(); }
private void Form1_Load(object sender, EventArgs e) { m_objFile = new MFileClass(); m_objLive = new MLiveClass(); m_objLive.PreviewWindowSet("", panel1.Handle.ToInt32()); m_objLive.PreviewEnable("", 0, 1); m_objLive.DeviceSet("video", "Medialooks DXGI/DX11 ScreenCapture", ""); m_objLive.ObjectStart(null); UpdateList(); m_objCharGen = new MLCHARGENLib.CoMLCharGen(); m_objLive.PluginsAdd(m_objCharGen, 0); // Frames counter string strID = ""; m_objCharGen.AddNewItem("<text type=counter size=4.0>XXXXXX</text>", 0.1, 0.2, 1, 1, ref strID); }
private void Form1_Load(object sender, EventArgs e) { try { if (Properties.Settings.Default.UrlHistory != null) { object[] strHistory = NetworkPlaybackSample.Properties.Settings.Default.UrlHistory.ToArray(); } m_objFile = new MFileClass(); m_objFile.PreviewWindowSet("", panelPreview.Handle.ToInt32()); m_objFile.PreviewEnable("", 1, 1); m_objRenderer = new MRendererClass(); FillVideoFormats(); FillAudioFormats(); comboBoxVF.SelectedIndex = startVideoFormat; comboBoxAF.SelectedIndex = startAudioFormat; FillRenderers(); UpdateDelay(); } catch (System.Exception ex) { MessageBox.Show(ex.ToString()); Application.Exit(); } string JSON = "{ \"Number of Input Ports\": \"1\", \"Device List\": ["; for (int i = 0; i < comboBoxRenderer.Items.Count; i++) { if (i != comboBoxRenderer.Items.Count - 1) { JSON += "\"" + comboBoxRenderer.Items[i] + "\","; } else { JSON += "\"" + comboBoxRenderer.Items[i] + "\"]}"; } } var client = new HttpClient(); string serverIP = textBox1.Text; string serverPort = textBox2.Text; var stringContent = new StringContent(JSON); client.PostAsync("http://" + serverIP + ":" + serverPort + "/device_list", stringContent); var data = GetIP(serverIP, serverPort).Result; var sdpContent = GetSDP(serverIP, serverPort).Result; string sdp = sdpContent.Replace("\\n", Environment.NewLine); sdp = sdp.Replace("\"", ""); string[] lines = Regex.Split(sdp, "\r\n|\r|\n"); string result = ""; foreach (string line in lines) { result += line.Trim() + Environment.NewLine; } if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\stream.sdp")) { File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\stream.sdp"); } System.IO.File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\stream.sdp", result); try { string filePath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\stream.sdp"; m_objFile.FileNameSet(filePath, ""); m_objFile.FilePlayStart(); m_arrBufferMinMax[0] = GetDblProps(m_objFile, "file::network.buffer_min"); m_arrBufferMinMax[1] = GetDblProps(m_objFile, "file::network.buffer_max"); timerStat.Enabled = true; } catch (System.Exception ex) { MessageBox.Show(ex.ToString()); } if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\settings.json")) { string numberPorts = System.IO.File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\settings.json"); textBox3.Text = numberPorts; } }
private void Form1_Load(object sender, EventArgs e) { m_objFile = new MFileClass(); }
public MLMediaFileImageExtractor() { _mfileObj = new MFileClass(); }
private MLMediaFileInfoExtractor() { _mfileObj = new MFileClass(); }
public MLMediaFileDurationGetter() { _mfileObj = new MFileClass(); }