ms-media-foundation

Microsoft Media Foundation Webcam Interface

纵然是瞬间 提交于 2020-12-31 13:58:19
问题 I've been working on a c++ interface to capture images from all types of webcams via the Micrsoft Media Foundation. I've already got a bit of code that can connect with several types of webcams and is able to capture images in different resolutions and formats. I know that under WinXP it is possible to change different parameters of the webcam (like white balance, exposure time e.g.) by using the Direct Show library. Unfortunately the interface in the Direct Show library that made it possible

IMFTransform SetInputType()/SetOutputType() fails

一曲冷凌霜 提交于 2020-12-14 06:33:13
问题 I'm trying to playback MP3 (and similar audio files) using WASAPI shared mode and a media foundation IMFSourceReader on Windows 7. From what I understand I have to use an IMFTransform between the IMFSourceReader decoding and the WASAPI playback. Everything seems fine apart from when I call SetInputType()/SetOutputType() on the IMFTransform? The relevant snippets of code are: MFCreateSourceReaderFromURL(...); // Various test mp3 files ... sourceReader->GetCurrentMediaType(MF_SOURCE_READER

IMFTransform SetInputType()/SetOutputType() fails

假装没事ソ 提交于 2020-12-14 06:23:22
问题 I'm trying to playback MP3 (and similar audio files) using WASAPI shared mode and a media foundation IMFSourceReader on Windows 7. From what I understand I have to use an IMFTransform between the IMFSourceReader decoding and the WASAPI playback. Everything seems fine apart from when I call SetInputType()/SetOutputType() on the IMFTransform? The relevant snippets of code are: MFCreateSourceReaderFromURL(...); // Various test mp3 files ... sourceReader->GetCurrentMediaType(MF_SOURCE_READER

How to convert 16Bit byte array to audio clip data correctly?

寵の児 提交于 2020-12-13 03:39:08
问题 I work with Media Foundataion and what I need to do is convert sound sample frame from byte to audio float data. In order to do it I use such method (that I found somewhere at google): private static float[] Convert16BitByteArrayToAudioClipData(byte[] source, int headerOffset, int dataSize) { int wavSize = BitConverter.ToInt32(source, headerOffset); headerOffset += sizeof(int); Debug.AssertFormat(wavSize > 0 && wavSize == dataSize, "Failed to get valid 16-bit wav size: {0} from data bytes: {1

How to convert 16Bit byte array to audio clip data correctly?

為{幸葍}努か 提交于 2020-12-13 03:35:05
问题 I work with Media Foundataion and what I need to do is convert sound sample frame from byte to audio float data. In order to do it I use such method (that I found somewhere at google): private static float[] Convert16BitByteArrayToAudioClipData(byte[] source, int headerOffset, int dataSize) { int wavSize = BitConverter.ToInt32(source, headerOffset); headerOffset += sizeof(int); Debug.AssertFormat(wavSize > 0 && wavSize == dataSize, "Failed to get valid 16-bit wav size: {0} from data bytes: {1

DirectShow, Media Foundation, DXVA, what?

久未见 提交于 2020-12-01 10:08:49
问题 I'm tasked with revising an application which uses DirectShow for video rendering. The old application works fine, but it's starting to show age. As I have a gaming background, I figured I should just approach this as such. After having made a bunch of prototypes using different techniques, I was pretty sure I could pull of video-to-texture rendering and use DirectX to fulfill all the clients his requests. However, I'm now at the point I have to pick a technique to go with and I couldn't be

DirectShow, Media Foundation, DXVA, what?

雨燕双飞 提交于 2020-12-01 10:05:45
问题 I'm tasked with revising an application which uses DirectShow for video rendering. The old application works fine, but it's starting to show age. As I have a gaming background, I figured I should just approach this as such. After having made a bunch of prototypes using different techniques, I was pretty sure I could pull of video-to-texture rendering and use DirectX to fulfill all the clients his requests. However, I'm now at the point I have to pick a technique to go with and I couldn't be

DirectShow, Media Foundation, DXVA, what?

假如想象 提交于 2020-12-01 10:05:30
问题 I'm tasked with revising an application which uses DirectShow for video rendering. The old application works fine, but it's starting to show age. As I have a gaming background, I figured I should just approach this as such. After having made a bunch of prototypes using different techniques, I was pretty sure I could pull of video-to-texture rendering and use DirectX to fulfill all the clients his requests. However, I'm now at the point I have to pick a technique to go with and I couldn't be

MediaFoundation HEVC H265 encoding

霸气de小男生 提交于 2020-06-25 05:35:26
问题 I'm able to successfully encode H264 video using MediaFoundation. Now I want to export HEVC which is, according to official documentation, is supported. I am doing everything as described there but whenever I want to set input media type to the writer it ends up with an error: No suitable transform was found to encode or decode the content. Here is a short code of what i do: /* Set output media type */ IMFMediaType* pMediaTypeOut = nullptr; MFCreateMediaType(&pMediaTypeOut); pMediaTypeOut-