Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Program is blocked at ProcessOutput method of H264 decoder MFT.

$
0
0

Hello,

We are trying to use MFT to decode H264 stream.

To take advantage of hardware decode, I pass a Direct3DManager pointer to the MFT and set output type with NV12 successfully. An output queue with 3 elements is created to store output data. Every time the output queue gets full, the first element is consumed (send to display) and released. Then new output data is produced and added to output queue.

The mechanism works well in Windows 7, however something goes wrong in Windows 8. After a few output samples were produced using ProcessOutput successfully, program is blocked at ProcessOutput and never return. I suspend that the output samples were not released properly but the program runs well in Windows 7.

What is the difference between Windows 7 and Windows 8 that contributes to the misbehavior described above?

Thanks.

2015-9-6

--------------------------------------------------------------------------------------------------------

I built a small project to test the H264 decoder's (CLSID_Microsoft H264 Video Decoder MFT) behavior. A Direct3DManager pointer is passed to the decoder thus it can perform hardware decode. Output type is set to MFVideoFormat_NV12 successfully. Then I feed the decoder with I and P frames using ProcessInput method. As expected, I get output data with ProcessOutput method successfully. Everytime I get an output sample, I retrieve the surface from it and write the data to a file. Then I release the surface and the sample. All things go well. 

Back to my application, I deleted the display part to narrow down the region bug may reside. When new output sample is produced with ProcessOutput method, I just release it. However, after 6 successful output, program still gets blocked at ProcessOutput method. This is what I do in the trial project described above. I don't understand why it's not working.

Is there anything I missed?

I still suspend that some resource is not released properly. Is it enough to release the output sample? 

2015-9-11

--------------------------------------------------------------------------------------------------------



Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>