-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
156 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
packages/camera/camera_platform_interface/lib/src/types/media_settings.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// ignore_for_file: avoid_equals_and_hash_code_on_mutable_classes | ||
|
||
import 'resolution_preset.dart'; | ||
|
||
/// recording media settings. | ||
class MediaSettings { | ||
/// constructor | ||
const MediaSettings({ | ||
this.resolutionPreset, | ||
this.fps, | ||
this.videoBitrate, | ||
this.audioBitrate, | ||
this.enableAudio = false, | ||
}); | ||
|
||
/// resolution preset | ||
final ResolutionPreset? resolutionPreset; | ||
|
||
/// camera fps | ||
final int? fps; | ||
|
||
/// recording video bitrate | ||
final int? videoBitrate; | ||
|
||
/// recording audio bitrate | ||
final int? audioBitrate; | ||
|
||
/// enable audio | ||
final bool enableAudio; | ||
|
||
@override | ||
bool operator ==(Object other) => | ||
identical(this, other) || | ||
other is MediaSettings && | ||
runtimeType == other.runtimeType && | ||
resolutionPreset == other.resolutionPreset && | ||
fps == other.fps && | ||
videoBitrate == other.videoBitrate && | ||
audioBitrate == other.audioBitrate && | ||
enableAudio == other.enableAudio; | ||
|
||
@override | ||
int get hashCode => | ||
resolutionPreset.hashCode ^ | ||
fps.hashCode ^ | ||
videoBitrate.hashCode ^ | ||
audioBitrate.hashCode ^ | ||
enableAudio.hashCode; | ||
|
||
@override | ||
String toString() => | ||
'MediaSettings{resolutionPreset: $resolutionPreset, fps: $fps, videoBitrate: $videoBitrate, audioBitrate: $audioBitrate, enableAudio: $enableAudio}'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters