How to change the existing stream?
(New page: There is no way to add/remove streams without re-initialization of Vision Mixer object, but you easily can change the existing one. This feature allows you to operate with streams any way ...) |
|||
(2 intermediate revisions by one user not shown) | |||
Line 3: | Line 3: | ||
Here is a sequence of actions to change stream in Vision Mixer C# sample: | Here is a sequence of actions to change stream in Vision Mixer C# sample: | ||
− | + | * Run sample and add a couple of streams. If can be File streams, Live Source streams, Empty streams (like "bars") or something else. | |
Press "Apply" to initialize Vision Mixer object with your streams. Please note that you can change only existing streams but cannot add/remove them, so if you plan to show one more stream some time later you need to add fake stream ("bars") for it before initialization. | Press "Apply" to initialize Vision Mixer object with your streams. Please note that you can change only existing streams but cannot add/remove them, so if you plan to show one more stream some time later you need to add fake stream ("bars") for it before initialization. | ||
Line 9: | Line 9: | ||
[[Image:ChangeStream1.jpg]] | [[Image:ChangeStream1.jpg]] | ||
− | + | ||
+ | * Double click on a stream you need to change in upper left table. The "change stream" dialog will appear. | ||
[[Image:ChangeStream2.jpg]] | [[Image:ChangeStream2.jpg]] | ||
− | + | ||
+ | * If you need to change stream to file, select "File" radio button, choose needed file and press "Apply". | ||
[[Image:ChangeStream3.jpg]] | [[Image:ChangeStream3.jpg]] | ||
Line 27: | Line 29: | ||
pMixerFiles.ChangeFile(m_nStream, textPath.Text, dblIn, dblOut); | pMixerFiles.ChangeFile(m_nStream, textPath.Text, dblIn, dblOut); | ||
− | + | ||
+ | * If you need to change stream to Live Source, select "Live Source" radio button, choose needed source and it's properties and press "Apply". | ||
[[Image:ChangeStream5.jpg]] | [[Image:ChangeStream5.jpg]] |
Latest revision as of 18:19, 2 April 2010
There is no way to add/remove streams without re-initialization of Vision Mixer object, but you easily can change the existing one. This feature allows you to operate with streams any way you need.
Here is a sequence of actions to change stream in Vision Mixer C# sample:
- Run sample and add a couple of streams. If can be File streams, Live Source streams, Empty streams (like "bars") or something else.
Press "Apply" to initialize Vision Mixer object with your streams. Please note that you can change only existing streams but cannot add/remove them, so if you plan to show one more stream some time later you need to add fake stream ("bars") for it before initialization.
- Double click on a stream you need to change in upper left table. The "change stream" dialog will appear.
- If you need to change stream to file, select "File" radio button, choose needed file and press "Apply".
You'll see that your stream is changed to file stream.
Code sample:
MGVIDEOMIXERLib.IMGMixerFiles pMixerFiles = (MGVIDEOMIXERLib.IMGMixerFiles)m_pMixerConfig;
pMixerFiles.ChangeFile(m_nStream, textPath.Text, dblIn, dblOut);
- If you need to change stream to Live Source, select "Live Source" radio button, choose needed source and it's properties and press "Apply".
You'll see that your stream is changed to Live Source stream.
Code sample:
MGVIDEOMIXERLib.IMLVideoMixerScene pMixerScene = (MGVIDEOMIXERLib.IMLVideoMixerScene)m_pMixerConfig;
m_pMixerConfig.SetTargetStream(m_nStream);
MGVIDEOMIXERLib.IMGDeviceConfig pDeviceConfig = (MGVIDEOMIXERLib.IMGDeviceConfig)m_pMixerConfig;
//Set audio device
pDeviceConfig.SetDevice(comboAudDevice.SelectedItem.ToString(), MGVIDEOMIXERLib.eMGDeviceType.eMGDT_Audio);
//Set video device
pDeviceConfig.SetDevice(comboVidDevice.SelectedItem.ToString(), MGVIDEOMIXERLib.eMGDeviceType.eMGDT_Video);
pDeviceConfig.SetFormat(comboFormatVid.SelectedIndex, MGVIDEOMIXERLib.eMGDeviceType.eMGDT_Video);
m_pMixerConfig.SetPreparedDevice(m_nStream, 1);