No deriving default on enums
@@ -41,16 +41,14 @@ pub struct VideoOrientationExtension {
pub rotation: VideoRotation,
}
-#[derive(PartialEq, Eq, Debug, Default, Copy, Clone)]
+#[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub enum CameraDirection {
- #[default]
Front = 0,
Back = 1,
}
-#[derive(PartialEq, Eq, Debug, Default, Copy, Clone)]
+#[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub enum VideoRotation {
- #[default]
Degree0 = 0,
Degree90 = 1,
Degree180 = 2,
@@ -130,3 +128,15 @@ impl TryFrom<u8> for VideoRotation {
}
}
}
+
+impl Default for CameraDirection {
+ fn default() -> Self {
+ CameraDirection::Front
+ }
+}
+
+impl Default for VideoRotation {
+ fn default() -> Self {
+ VideoRotation::Degree0
+ }
+}
