Page 2 of 2

Re: Webcam capture with Microsoft Media Foundation (Win10)

Posted: 06 Jan 2020, 16:33
by rommmcek
Cam alone o.k., with audio:
IMFSourceReader_SetCurrentMediaType error: -1072875852
ErrorLevel: 0

Re: Webcam capture with Microsoft Media Foundation (Win10)

Posted: 06 Jan 2020, 19:58
by guest3456
malcev wrote:
06 Jan 2020, 15:18
What value shows this code?
https://pastebin.com/eeBJF2ub
one messagebox with 0x3 for me

malcev wrote:
06 Jan 2020, 13:46
guest3456, rommmcek please test now.
I tested on 2 notebooks, HP and Asus - it works.
running the latest code in the top post, now i get:

IMFSourceReader_SetCurrentMediaType error: -1072875852
ErrorLevel: 0

on a Lenovo Thinkpad

Re: Webcam capture with Microsoft Media Foundation (Win10)

Posted: 07 Jan 2020, 10:35
by malcev
I updated source code.
Now it enumerates all streams from camcorder, enumerates each type of each stream and choose the best for h.264 and aac encoding (not 100% shure about this).

Re: Webcam capture with Microsoft Media Foundation (Win10)

Posted: 07 Jan 2020, 10:56
by rommmcek
On Lenovo IdeaPad Y580 works flawless! Great work!

Re: Webcam capture with Microsoft Media Foundation (Win10)

Posted: 07 Jan 2020, 12:06
by guest3456
malcev wrote:
07 Jan 2020, 10:35
I updated source code.
Now it enumerates all streams from camcorder, enumerates each type of each stream and choose the best for h.264 and aac encoding (not 100% shure about this).
now it works for me too, both audio and video. great work

Re: Webcam capture with Microsoft Media Foundation

Posted: 21 Jan 2020, 05:34
by malcev
Add support for Windows 7.

Re: Webcam capture with Microsoft Media Foundation

Posted: 25 Jan 2020, 19:50
by malcev
Add support for preview window with Direct2D help.

Re: Webcam capture with Microsoft Media Foundation

Posted: 09 Feb 2020, 15:41
by rommmcek
Couple of tests for version from 08. Feb. 2020: Recordings of 5, 10 and 60 sec with preview width 400 and full (commented), all were correct on Win10.

Great job continues!!!

Re: Webcam capture with Microsoft Media Foundation

Posted: 15 Feb 2020, 07:39
by malcev
Thanks for test.
I update code
1) add quotes when show all devices, because it can be devices with space at the end of name.
2) add support for enumerating devices with the same name.
3) add support for different Video Input Types with Color Converter DSP help.
https://docs.microsoft.com/en-us/windows/win32/medfound/colorconverter

Re: Webcam capture with Microsoft Media Foundation

Posted: 15 Feb 2020, 08:25
by robodesign
This is lovely.

Can this be adapted to acquire images from a scanner?

Best regards, Marius

Re: Webcam capture with Microsoft Media Foundation

Posted: 15 Feb 2020, 08:30
by malcev

Re: Webcam capture with Microsoft Media Foundation

Posted: 15 Feb 2020, 09:06
by rommmcek
robodesign wrote:
15 Feb 2020, 08:25
Can this be adapted to acquire images from a scanner?
Take a look in this thread!