1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- class CameraRecordOption {
- int videoWidth;
- int videoHeight;
- int fps;
- VideoCodecs videoCodecs;
- int crf; // only use in android
- int encoderFps; // only use in android
- VideoQuality quality;
- int videoBitrate;
- int gop;
- CameraRecordOption(
- {this.videoWidth,
- this.videoHeight,
- this.fps,
- this.videoCodecs,
- this.crf,
- this.encoderFps,
- this.quality,
- this.videoBitrate,
- this.gop});
- Map toMap() {
- Map data = {
- "videoWidth": videoWidth,
- "videoHeight": videoHeight,
- "fps": fps,
- "videoCodecs": videoCodecs?.index,
- "crf": crf,
- "encoderFps": encoderFps,
- "quality": quality?.index,
- "videoBitrate": videoBitrate,
- "gop": gop,
- };
- data.removeWhere((key, value) => value == null);
- return data;
- }
- }
- class CameraComposeOption {
- int outputWidth;
- int outputHeight;
- int frameRate;
- int crf; // only use in android
- int gop;
- int bitrate;
- double scaleRate;
- VideoCodecs videoCodecs;
- VideoQuality quality;
- VideoDisplayMode scaleMode;
- CameraComposeOption(
- {this.outputWidth,
- this.outputHeight,
- this.frameRate,
- this.crf,
- this.gop,
- this.bitrate,
- this.scaleRate,
- this.videoCodecs,
- this.quality,
- this.scaleMode});
- Map toMap() {
- Map data = {
- "outputWidth": outputWidth,
- "outputHeight": outputHeight,
- "frameRate": frameRate,
- "crf": crf,
- "gop": gop,
- "bitrate": bitrate,
- "scaleRate": scaleRate,
- "videoCodecs": videoCodecs?.index,
- "quality": quality?.index,
- "scaleMode": scaleMode?.index,
- };
- data.removeWhere((key, value) => value == null);
- return data;
- }
- }
- enum VideoCodecs { H264_HARDWARE, H264_SOFT_OPENH264, H264_SOFT_FFMPEG }
- enum VideoQuality { SSD, HD, SD, LD, PD, EPD }
- enum VideoDisplayMode { SCALE, FILL }
|