I am developing a camera application for tablet PC running Windows 8.1 using wpf mediakit. I am using VideoCapture
for this,
<Controls:VideoCaptureElement
FPS="30"
x:Name="videoElement" Stretch="UniformToFill"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Height="Auto"
Width="Auto"
Margin="0, 0, 0, 0"
EnableSampleGrabbing="True"
Visibility="Visible"
UseYuv="False"
UseStillPin="False"
UnloadedBehavior="Close" >
<Controls:VideoCaptureElement.LayoutTransform>
<RotateTransform Angle="0" />
</Controls:VideoCaptureElement.LayoutTransform>
</Controls:VideoCaptureElement>
The problem is that, when I change the orientation, the camera is not changing accordingly.
ie, If I am in a portrait view, the camera preview will be flipped.
How can I rotate the preview whenever the user changes the orientation ?
Aucun commentaire:
Enregistrer un commentaire