locked
CameraCaptureUI or MediaCapture API, Which can be customized?

    Question

  • Hi, Dears:

    I need to do some customization in Webcam capturing and recording in Metro style:Add some customized function to enhance video for webcam. But I found neither CameraCaptureUI nor MediaCapture can do this.

    1. We can't customize the UI of CameraCaptureUI to attach our UI, and we can't add our pipeline to the MF topology, CameraCaptureUI just provide a simple Capture/Record function;

    2. If we choose Media Capture API:

    1). How to enumerate the resolution list for a selected webcam device?

    2). How to set the resolution for the selected webcam device to preview?

    4). How to adjust the framerate and device output colorspace for webcam preview?

    3). If we add a customized pipeline by MediaCapture::AddEffectAsync(), how to get the control of this pipeline?For example, how can we adjust some parameters for this pipeline dynamic in our main Metro app?

    The Media Capture API just only open the selected wecam device with default parameters(resolution, color space, framerate, etc). We need more advance controls for webcam to develop a gread webcam application in metro style.

    Any suggestion?

     

     

    Monday, November 7, 2011 1:32 AM

Answers

  • You are right that the CameraCaptureUI API provides a pre-defined UI for you to capture pictures or videos.  You cannot customize this UI.

    MediaCaptureUI may be more suitable for your task.  There are a bunch of properties in the MediaCapture runtime class that you may find interesting:

    • MediaCaptureSettings (of the type Windows.Media.Capture.MediaCaptureSettings)
    • VideoDeviceController (of the type Windows.Media.Devices.VideoDeviceController)

    Thanks


    Raman Sharma | Program Manager, Visual C++ | @rasharm_msft

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)
    • Marked as answer by ytshe Tuesday, November 8, 2011 10:08 AM
    Monday, November 7, 2011 6:36 AM

All replies

  • You are right that the CameraCaptureUI API provides a pre-defined UI for you to capture pictures or videos.  You cannot customize this UI.

    MediaCaptureUI may be more suitable for your task.  There are a bunch of properties in the MediaCapture runtime class that you may find interesting:

    • MediaCaptureSettings (of the type Windows.Media.Capture.MediaCaptureSettings)
    • VideoDeviceController (of the type Windows.Media.Devices.VideoDeviceController)

    Thanks


    Raman Sharma | Program Manager, Visual C++ | @rasharm_msft

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)
    • Marked as answer by ytshe Tuesday, November 8, 2011 10:08 AM
    Monday, November 7, 2011 6:36 AM
  • Thank  you, Raman.

    Yes, we can accss the properties via VideoDeviceController. How to get the attribute which I'm interested from MediaPropertySet ? For example, I want to query the frame size by MediaPropertySet::Lookup(...), where can I find the GUID definition for each property? How the process the result from Lookup function?

     

    Thank you.

     

     

     

     

     

     

     

     

     

     

    Tuesday, November 8, 2011 8:26 AM
  • Here is a sample for MediaCapture in C++:

    http://code.msdn.microsoft.com/Media-Capture-Sample-in-CPP-d78ef2a9

    Thanks


    Raman Sharma | Program Manager, Visual C++ | @rasharm_msft

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)
    Saturday, November 19, 2011 3:12 AM
  • Hi,

    have u get solution for this if yes then please share it with me.I want to select camera resolution with MediaCapture managment class 

    thanks in advance


    Tuesday, December 18, 2012 6:58 AM