microsoft / microsoft/Windows-classic-samples
How to Get rotated image from camera with media foundation
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 3.3k
- PR merge metrics
- No merged PRs in 30d
Description
i use the MF_MT_VIDEO_ROTATION attribute,but it does not take effect. The process is as follows:
1、hr = m_pReader->GetNativeMediaType(
(DWORD)MF_SOURCE_READER_FIRST_VIDEO_STREAM,
i,
&pType
);
2、hr = pType->SetUINT32(MF_MT_VIDEO_ROTATION, MFVideoRotationFormat_90);
3、hr = m_pReader->SetCurrentMediaType(
(DWORD)MF_SOURCE_READER_FIRST_VIDEO_STREAM,
NULL,
pType
);
4、hr = m_pReader->ReadSample(
(DWORD)MF_SOURCE_READER_FIRST_VIDEO_STREAM,
0,
NULL,
NULL,
NULL,
NULL
);
What's the problem?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MF_SOURCE_READER_FIRST_VIDEO_STREAM sequence using GetNativeMediaType, SetCurrentMediaType, and ReadSample. Check the Media Foundation requirements for MF_MT_VIDEO_ROTATION and determine why the requested rotation is not reflected in the camera output. Done means the sample produces the expected 90-degree rotation and the working sequence is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100