【问题标题】:Capture video in any image format in WinRT在 WinRT 中以任何图像格式捕获视频
【发布时间】:2014-03-28 09:20:37
【问题描述】:

我正在研究 Windows 开发中心的 WinRT 媒体捕获示例,该示例使用 MediaCapture 和 MFT: http://code.msdn.microsoft.com/windowsapps/Media-Capture-Sample-adf87622

对于我的应用程序,我需要 MFVideoFormat_NV12 格式的图像。但是 IMFMediaTypegetGUID 方法返回 MFVideoFormat_YUY2 作为 MF_MT_SUBTYPE

我不想在两种格式之间进行转换。有什么方法可以设置截取视频的图像格式吗?

提前致谢!

【问题讨论】:

    标签: video windows-runtime ms-media-foundation


    【解决方案1】:

    您可以通过以下API设置帧捕获类型--

    hr = pHandler->SetCurrentMediaType(pType)

    可在以下微软链接上获得。此外,您还可以查看您的视频采集设备支持的视频采集格式。

    http://msdn.microsoft.com/en-us/library/windows/desktop/ff485858%28v=vs.85%29.aspx

    希望对你有帮助。

    【讨论】:

    • 我找不到任何方法来创建/获取 WinRT 的 IMFMediaSource 实例。 WinRT 似乎不支持此功能。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-21
    • 2013-04-05
    • 1970-01-01
    相关资源
    最近更新 更多