MediaCapture with multiple video sources RRS feed

  • Question

  • Hello,

    I am working with a modified version of the grayscale sample (in C++).  What I would like is create dual streaming/recording where one stream is superimposed (smaller size) on the other stream. 

    I don't think I'll have trouble creating the MFT for this, but what I don't know how to create the two video sources in the context of a store app like the grayscale sample.  Should I add two video devices to a single MediaCapture object?  Or create two MediaCapture objects and somehow join them later?  Or something else?


    Tuesday, December 4, 2012 10:22 PM

All replies

  • Hi,

    I think we need use Media Foundation to combine the two video stream into one Media Capture control as a source.

    Best regards,

    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 7, 2012 7:57 AM
  • Thanks for the reply.  I have been reviewing this subject and I can see how to combine multiple sources in a desktop app.  However, my question only applies to metro app.  So I'll assume this is not possible in a metro app.
    Tuesday, December 11, 2012 9:30 PM
  • Yes, you can use two MediaCapture object and initialize them with different device ID. The code looks like:

    auto settings = ref new Windows::Media::Capture::MediaCaptureInitializationSettings();
    settings->StreamingCaptureMode = Windows::Media::Capture::StreamingCaptureMode::Video;
    settings->VideoDeviceId = L"XXX"

    You can use Windows::Devices::Enumeration::DeviceInformation::FindAllAsync to enumerate all capture and get the device ID.
    Wednesday, December 12, 2012 2:18 PM
  • Hi,

    Yes, I can create multiple MediaCapture objects and render them in separate windows.  But what I want is to channel these streams into a single MFT.  And I don't think this is possible in metro app.

    Wednesday, December 12, 2012 6:00 PM
  • Hi,

        What's your needs? Combine two video stream to one(one video stream from another MFT)? or just present it together(superimpose one on another)?

    Thursday, December 13, 2012 6:11 AM
  • Hi,

    I want to superimpose one on the other.  I was hoping to do this in an MFT with two video input streams.

    Thursday, December 13, 2012 5:19 PM
  • Hi,

    You would need to use two custom sinks, one for each of the mediacapture objects. Each of your custom sinks will receive samples from their respective mediacapture objects. You can then combine these samples in any way you like.

    Wednesday, January 9, 2013 6:56 PM
  • Hi

    Thanks for your reply.

    How would you combine the samples?  Is there an example of this online anywhere?  Does this work with Media Extensions in a store app?  Also, once combined, can there be further stream processing downstream?  Seems to me the idea of a sink is that this is the end of the pipeline.


    Thursday, February 21, 2013 8:48 PM