import { DefaultPreviewProfileSelector, DefaultVideoProfileSelector } from '@normalized:N&&&harmonyCameraLib/src/main/ets/camerax/CameraProfileSelector&1.2.1'; import hilog from '@ohos:hilog'; export class OutPutHolder { constructor(w11) { this.output = w11; } } export class PreviewOutputFactory { constructor(v11) { this.profileSelector = new DefaultPreviewProfileSelector(); this.sysCameraManager = v11; } getSysOutput(g11, h11, i11, j11) { let k11 = j11.getSysSupportPreviewProfiles(i11); let l11 = this.profileSelector.selector(h11, k11); let m11 = this.sysCameraManager.createPreviewOutput(l11, g11); m11.on("frameStart", (t11, u11) => hilog.debug(0x0000, "CameraX", "PreviewOutput frameStart")); m11.on("frameEnd", (r11, s11) => hilog.debug(0x0000, "CameraX", "PreviewOutput frameEnd")); m11.on("error", (q11) => hilog.debug(0x0000, "CameraX", "PreviewOutput frameEnd")); return new OutPutHolder(m11); } static createDefaultPreviewOutputFactory(f11) { return new PreviewOutputFactory(f11); } } export class VideoOutputFactory { constructor(e11) { this.profileSelector = new DefaultVideoProfileSelector(); this.sysCameraManager = e11; } getSysOutput(p10, q10, r10, s10) { if (this.videoOutput == undefined) { let t10 = s10.getSysSupportVideoProfiles(r10); let u10 = this.profileSelector.selector(q10, t10); let v10 = this.sysCameraManager.createVideoOutput(u10, p10); v10.on("frameStart", (c11, d11) => hilog.debug(0x0000, "CameraX", "VideoOutput frameStart")); v10.on("frameEnd", (a11, b11) => hilog.debug(0x0000, "CameraX", "VideoOutput frameEnd")); v10.on("error", (z10) => hilog.debug(0x0000, "CameraX", "VideoOutput frameEnd")); this.videoOutput = v10; } return new OutPutHolder(this.videoOutput); } getCreatedVideoOutput() { return this.videoOutput; } static createDefaultVideoOutputFactory(o10) { return new VideoOutputFactory(o10); } } 