ms-media-foundation

Using DirectShow filters outside DirectShow?

懵懂的女人 提交于 2019-12-08 03:31:05
问题 I'm currently dealing with Windows Media Foundation. However, due to some problems with the Microsoft H.264 decoder and some missing decoders for custom format, I'd like to know if it would be possible to instantiate a DirectShow Decoder directly using CLSID, and build a proxy around it that exposes IMFTransform to get a decoder for Media Foundation. So here is my question: Can i instantiate a Directshow filter (preferrably decoders) directly and use them for decoding (i.e. put some

Detecting UVC video device disconnection (WM_DEVICECHANGE) works on Windows y but fails on Windows 10

烂漫一生 提交于 2019-12-08 03:15:06
问题 I am using the exact same code as this to handle video device loss. I am testing my app with a Logitech C920 webcam. When the webcam is plugged into a USB2 port on Windows 7 the code works as expected and it detects a camera unplug. However, the same code fails when the camera is connected to a USB3 port under Windows 10. The problem is that the value of pDi->dbcc_name only partially matches that of g_pwszSymbolicLink. I highlight the difference below. L"\\?\USB#VID_046D&PID_082D&MI_00#7

Change h.264 quality when using SinkWriter to encode video

早过忘川 提交于 2019-12-08 02:36:01
问题 I am using Microsoft Media Foundation to encode a H.264 video file. I am using the SinkWriter to create the video file. The input is a buffer ( MFVideoFormat_RGB32 ) where I draw the frames and the output is a MFVideoFormat_H264 . The encoding works and it creates a video file with my frames in it. But I want to set the quality for that video file. More specifically, I want to set the CODECAPI_AVEncCommonQuality property on the H.264 encoder. In order to get a handle to the H.264 encoder, I

Feeding D3D surfaces to Quick Sync encoder MFT does not work

坚强是说给别人听的谎言 提交于 2019-12-07 20:35:29
I want to encode video using the "Intel® Quick Sync Video H.264 Encoder MFT". I'm using the MFT manually, without using a paired decoder MFT, or any other MediaFoundation components. Feeding normal buffers (IMFSamples with buffers created by MFCreateAlignedMemoryBuffer) works well. Now I'm investigating whether I can feed it ID3D11Texture2D surfaces as input (DXGI_FORMAT_NV12, 1280x720) in order to improve performance. I tried to pass IMFSample instances created with MFCreateVideoSampleFromSurface or MFCreateDXGISurfaceBuffer to IMFTransform::ProcessInput and made multiple experiments (trying

Frame loss for above FullHD resolution .Is AVI Decompressor transform filter available in MediaFoundation?

这一生的挚爱 提交于 2019-12-07 12:51:54
问题 I'm developing a multimedia streaming application for Desktop using SourceReader MediaFoundation technique. I'm using USB camera device to show streaming. The camera supports 2-video formats: YUY2 and MJPG . For 1980x1080p YUY2 video resolution, receiving only 48fps for 60fps. I fetched YUY2-RGB32 conversion from MSDN page and using in my application ( Note: I didn't use any transform filter for color conversion). For MJPG video format, I used MJPEG Decoder MFT to convert MJPG - YUY2 - RGB32

media foundation H264 decoder not working properly

a 夏天 提交于 2019-12-07 02:09:27
I'm creating an application for video conferencing using media foundation and I'm having an issue decoding the H264 video frames I receive over the network. The Design Currently my network source queues a token on every request sample, unless there is an available stored sample. If a sample arrives over the network and no token is available the sample is stored in a linked list. Otherwise it is queued with the MEMediaSample event. I also have the decoder set to low latency. My Issue When running the topology using my network source I immediately see the first frame rendered to the screen. I

How to create IMFSample for WindowsMediaFoundation H.264 encoder MFT

折月煮酒 提交于 2019-12-06 17:56:25
I'm learning to use the H.264 encoder in Windows Media Foundation. What I currently have are media samples in YUV420p format, so that's buffers containing YYYYYYYYUUVV data. Since the H.264 encoder MFT requires input in form of IMFSample, I'm not sure how to convert the data in buffer into IMFSample. May I just do like this: IMFMediaBuffer *pBuffer = NULL; MFCreateMemoryBuffer(cbSize, &pBuffer); BYTE *pData = NULL; pBuffer->Lock(&pData, NULL, NULL); memcpy(pData, bufferIhaveinYYYYUV format, buffer size); // is it correct? pBuffer->Unlock(); IMFSample *pSample = NULL; MFCreateSample(&pSample);

How to run/start a thread at a given time using Media Foundation?

微笑、不失礼 提交于 2019-12-06 15:11:54
问题 I am looking for to start a thread at a specified time with Media Foundation. I know that in DirectShow there is a function called by IMediaFilter where tStart is the time value of the reference clock.: Interface::HRESULT Run(REFERENCE_TIME tStart); But in Media Foundation there is no such function that will run or start a thread with a time as a parameter. Is there a solution to do this in Media Foundation? 回答1: Neither DirectShow or Media Foundation have functionality that matches the

Using DirectShow filters outside DirectShow?

巧了我就是萌 提交于 2019-12-06 11:33:43
I'm currently dealing with Windows Media Foundation. However, due to some problems with the Microsoft H.264 decoder and some missing decoders for custom format, I'd like to know if it would be possible to instantiate a DirectShow Decoder directly using CLSID, and build a proxy around it that exposes IMFTransform to get a decoder for Media Foundation. So here is my question: Can i instantiate a Directshow filter (preferrably decoders) directly and use them for decoding (i.e. put some compressed frames and get uncompressed ones) to create a MFT? I know how to instantiate the filter itself using

How to go about debugging in Media Foundation

落花浮王杯 提交于 2019-12-06 09:14:03
问题 The question Which tools or code constructs (like defines) are the ones that should be used in this area and how to get them to work? Is there something I as a new person to media foundation should do before asking my question here to avoid simple mistakes? The question is not "what is your favorite tool, lets fight over who is right" but simply, in regards to this media foundation framework, which options are according your expertise in the area worth considering for debugging and how do I