Windows 10 빌드 10.1607.14393.10 (기념일 에디션)에서 더 이상 MJPG 캡처 스트림을 가져올 수 없습니다. MJPG와 YUY2 해상도로 사용되었지만 이제 IBaseFilter 소스가 연결되기 전에 DirectShow (Kernel Streaming) 및 Media Foundation MJPG에서 YUY2 만 NV12 방식으로 변환했습니다. 카메라가 다른 여러 시스템에서 시도했습니다. 어떤 아이디어가 잘못된 것일까 요? MMF에서웹캠 MJPG 캡처 스트림을 Windows 10에서 사용할 수 없습니다.
640x480 @30 YUY2
...
640x480 @30 MJPG <- gone
...
DirectShow:
com_t<IAMStreamConfig> sc;
if_failed_return_result(camera_output_pin->QueryInterface(&sc));
int number_of_capabilities = 0;
int capability_size = 0;
if_failed_return(sc->GetNumberOfCapabilities(&number_of_capabilities, &capability_size), -1);
for (int i = 0; i < number_of_capabilities && k < count; i++) {
VIDEO_STREAM_CONFIG_CAPS scc;
assert(sizeof(scc) == capability_size);
AM_MEDIA_TYPE* mt = null;
if_failed_return(sc->GetStreamCaps(i, &mt, (BYTE*)&scc), -1);
...
:
640x480 @30 YUY2
...
640x480 @30 NV12 // camera reports MJPG 4cc in USBView and KsStudio
for (int i = 0; k < count; i++) {
com_t<IMFMediaType> type;
if (d->reader->GetNativeMediaType(VIDEO_STREAM, i, &type) != 0) {
break;
}
GUID guid_major_type = {0};
if_failed_return_result(type->GetMajorType(&guid_major_type));
if (guid_major_type == MFMediaType_Video) {
GUID guid_subtype = {0};
if_failed_return_result(type->GetGUID(MF_MT_SUBTYPE, &guid_subtype));
AM_MEDIA_TYPE* amMediaType = null;
if_failed_return_result(type->GetRepresentation(FORMAT_MFVideoFormat, (void**)&amMediaType));
assert(amMediaType->cbFormat == sizeof(MFVIDEOFORMAT));
const MFVIDEOFORMAT* mi = (const MFVIDEOFORMAT*)amMediaType->pbFormat;
Windows 업데이트. 같은 [MSDN 포럼에 Q] 참조 (https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/cdac5a0c-dfb4-4928-9ca9-2a63ec1496de/directshow-mjpeg-frame-type-in-usb-cameras-after-working-windows-10-anniversary-update-1607 포럼 : windowsdirectshow 개발) –
나는 초기 개발자로서 몇 달 동안이나 보냈다. 도움이되지 않는다. 해결 방법이 필요하다. – Leo
다음은이를 증명하는 코드이다 (msvc2012 명령 줄) https://github.com/leok7v/ uvc_mjpg_win10 – Leo