How to flip a video frame/source?
Posted: Thu Jan 04, 2018 10:52 pm
What's the best way to flip (vertically, for example) my video source?
Specifically, in the CapturePreviewCSharp project, I'd like to flip the video feed that's rendered to the PreviewWindow. It wasn't immediately obvious where I can apply this transform. I tried applying the transform to the m_d3DDevice using the below, but it never made an impact:
Inside PreviewWindow.cs: Render()
or
Neither throw an error, but neither flip the image either.
I also looked at flipping the incoming IDeckLinkVideoFrame inside IDeckLinkScreenPreviewCallback.DrawFrame, but it wasn't clear how to flip a video frame.
Any guidance is greatly appreciated!
Specifically, in the CapturePreviewCSharp project, I'd like to flip the video feed that's rendered to the PreviewWindow. It wasn't immediately obvious where I can apply this transform. I tried applying the transform to the m_d3DDevice using the below, but it never made an impact:
Inside PreviewWindow.cs: Render()
- Code: Select all
m_d3DDevice.SetTransform(Direct3D.TransformType.Projection, Matrix.RotationX(180));
or
- Code: Select all
m_d3DDevice.Transform.World.RotateX(180);
Neither throw an error, but neither flip the image either.
I also looked at flipping the incoming IDeckLinkVideoFrame inside IDeckLinkScreenPreviewCallback.DrawFrame, but it wasn't clear how to flip a video frame.
Any guidance is greatly appreciated!