|
@@ -1 +1,95 @@
|
|
|
+class LoadVidResult {
|
|
|
+ LoadVidResult({
|
|
|
+ this.isSuccess = false,
|
|
|
+ this.probeBase64,
|
|
|
+ });
|
|
|
|
|
|
+ String? probeBase64;
|
|
|
+ bool isSuccess;
|
|
|
+
|
|
|
+ factory LoadVidResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return LoadVidResult(
|
|
|
+ isSuccess: map['IsSuccess'],
|
|
|
+ probeBase64: map["ProbeBase64"],
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+abstract class VidFrameProcessorBase {
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ return <String, dynamic>{};
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class VidFrameBrightnessProcessor extends VidFrameProcessorBase {
|
|
|
+ VidFrameBrightnessProcessor(this.brightness);
|
|
|
+ int brightness;
|
|
|
+
|
|
|
+ factory VidFrameBrightnessProcessor.fromJson(Map<String, dynamic> map) {
|
|
|
+ return VidFrameBrightnessProcessor(map['Brightness']);
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ map["Brightness"] = brightness;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class VidFrameContrastProcessor extends VidFrameProcessorBase {
|
|
|
+ VidFrameContrastProcessor(this.contrast);
|
|
|
+ int contrast;
|
|
|
+
|
|
|
+ factory VidFrameContrastProcessor.fromJson(Map<String, dynamic> map) {
|
|
|
+ return VidFrameContrastProcessor(map['Contrast']);
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ map["Contrast"] = contrast;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class GetVidFrameRequest {
|
|
|
+ /// 获取Vid帧请求
|
|
|
+ ///
|
|
|
+ /// [name] Vid缓存文件名
|
|
|
+ ///
|
|
|
+ /// [index] 帧索引
|
|
|
+ ///
|
|
|
+ /// [processors] 图像处理器集合
|
|
|
+ GetVidFrameRequest({
|
|
|
+ required this.index,
|
|
|
+ this.processors,
|
|
|
+ });
|
|
|
+
|
|
|
+ int index;
|
|
|
+ List<VidFrameProcessorBase>? processors;
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = <String, dynamic>{};
|
|
|
+ map['Index'] = index;
|
|
|
+ if (processors != null) {
|
|
|
+ map['Processors'] = processors!.map((e) => e.toJson());
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class GetVidFrameResult {
|
|
|
+ GetVidFrameResult({
|
|
|
+ this.isSuccess = false,
|
|
|
+ this.frameBase64,
|
|
|
+ });
|
|
|
+
|
|
|
+ String? frameBase64;
|
|
|
+ bool isSuccess;
|
|
|
+
|
|
|
+ factory GetVidFrameResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return GetVidFrameResult(
|
|
|
+ isSuccess: map['IsSuccess'],
|
|
|
+ frameBase64: map["FrameBase64"],
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|