void ChangeProp() { m_objMPFile.PropsGet("file::start_timecode", out props); m_objMPFile.PropsSet("file::start_timecode", ParseAndChange(props)); label1.Text = props; }
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 button1_Click(object sender, EventArgs e) { string test_file = @"M:\MEDIA_TEST\!1080p 60fpsOri and the Will of the Wisps.mp4"; m_objFile.FileNameSet(test_file, ""); m_objFile.PreviewWindowSet("", panel1.Handle.ToInt64()); m_objFile.PreviewEnable("", 1, 1); m_objFile.OnEventSafe += File_OnEventSafe; m_objFile.FilePlayStart(); m_objFile.PropsSet("preview.type", "dx9"); }
private void Button2_Click(object sender, EventArgs e) { // call the method GetFileInfo(""); string count1; m_objFile.PropsGet("file::info::ts_programs", out count1); //listBox1.Items.Add(count); m_objFile.PropsSet("file::ts_program", "4"); }
private void ChangeTC_btn_Click(object sender, EventArgs e) { string TCvalue; m_objMFile.PropsGet("file::start_timecode", out TCvalue); m_objMFile.PropsSet("file::start_timecode", ParseAndChange(TCvalue)); M_TIMECODE timeCodeIn; M_TIMECODE timeCodeOut; int outSpec; m_objMFile.FileInOutGetTC(out timeCodeIn, out timeCodeOut, out outSpec); newTC_lbl.Text = string.Format("{0:D2}: {1:D2}: {2:D2}. {3:D3}", timeCodeIn.nHours, timeCodeIn.nMinutes, timeCodeIn.nSeconds, timeCodeIn.nFrames); }
private void Start_btn_Click(object sender, EventArgs e) { //int nIndex = -1; //MItem pFile; //m_objPlaylist.PropsSet("loop", "false"); //m_objPlaylist.PropsSet("active_frc", "false"); //m_objPlaylist.PropsSet("preview.drop_frames", "true"); //m_objPlaylist.PlaylistAdd(null, openFile_txb.Text, "external_process=false experimental.mfcodecs=true experimental.out_video_packets=true", ref nIndex, out pFile); // //m_objPlaylist.FilePlayStart(); int index; string name; M_AUD_PROPS propsA; m_objFile.FormatAudioGet(eMFormatType.eMFT_Input, out propsA, out index, out name); propsA.nChannels = 8; m_objFile.PropsSet("active_frc", "false"); m_objFile.PropsSet("preview.drop_frames", "true"); m_objFile.FileNameSet(openFile_txb.Text, "");//"external_process=false experimental.mfcodecs=true experimental.out_video_packets=true"); //m_objFile.FileNameSet(openFile_txb.Text, ""); //(m_objFile as IMProps).PropsSet("object::audio_channels", "0,1,2,3,4,5,6,7"); m_objFile.FormatAudioSet(eMFormatType.eMFT_Convert, ref propsA); m_objFile.FilePlayStart(); m_objWriter.PropsSet("external_process", "false"); m_objWriter.PropsSet("rate_control", "true"); m_objWriter.PropsSet("pull_mode", "false"); m_objWriter.FormatAudioSet(eMFormatType.eMFT_Convert, ref propsA); //m_objWriter.WriterNameSet(savePath_txb.Text, "format='mp4' video::codec='packets' audio::codec='audio_packets'"); m_objWriter.WriterNameSet(savePath_txb.Text, "format='mp4' video::codec='n264' audio::codec='aac'"); m_objWriter.ObjectStart(m_objFile); }
void SetMatrix(double[] value) { matrix = null; for (int i = 0; i < customMatrix.Length; i++) { customMatrix[i] = value[i]; matrix += value[i].ToString(CultureInfo.InvariantCulture) + ","; } matrix = matrix.Substring(0, matrix.LastIndexOf(",")); if (m_objMFile != null) { m_objMFile.PropsSet("object::gpu.rgb_transform_matrix", matrix); } Debug.WriteLine("We are setting matix with value: " + matrix + "\n"); CurrentMatrix_txb.Text = matrix; UpdateVisualData(ColorLevel_cmb.SelectedItem.ToString()); }
private void PropsSet_btn_Click(object sender, EventArgs e) { m_objMPFile.PropsSet("object::vfilter", VFvalue_txb.Text.ToString()); }
private void ChangePreviewType_btn_Click(object sender, EventArgs e) { m_objFile.PropsSet("preview.type", arr[i]); ChangePreviewType_btn.Text = arr[i]; i = ++i == arr.Length ? 0 : i; }