I am building an app with fixed portrait orientation, and I need to implement video capture feature within the app.
I understand there is no video capture task similar to the photo capture task explained here (if there is, please advise!) , so I decided to make my own page that acts like it. I used this sample code as a guide, and I was able to capture video. However, the only problem is that the resulting video is always of landscape orientation. I couldn't see any method or property on the capture device class to alter the orientation. I tried changing "DesiredFormat" on VideoCaptureDevice instance, but it throws ArgumentException.
My code for trying to set DesiredFormat if this is even a way to do it.
videoCaptureDevice.DesiredFormat = new VideoFormat(PixelFormatType.Format32bppArgb, 480, 720, 30);
This line gives me ArgumentException.
I did apply the rotation transform on the viewFinderBrush, so when a user is recording, the video is in the correct orientation. However the result is always landscape.
Is what I'm trying to accomplish impossible? Any help would be greatly appreciated!