package com.tencent.mm.plugin.mmsight.segment;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.mmsight.segment.VideoSegmentUI.b;
import com.tencent.mm.plugin.mmsight.segment.a.a.d;
import com.tencent.mm.sdk.platformtools.ab;

class VideoSegmentUI$4 implements d {
    final /* synthetic */ VideoSegmentUI ozN;

    VideoSegmentUI$4(VideoSegmentUI videoSegmentUI) {
        this.ozN = videoSegmentUI;
    }

    public final void aa(int i, int i2, int i3) {
        AppMethodBeat.i(55033);
        if (i <= 0 || i2 <= 0) {
            ab.e("MicroMsg.VideoSegmentUI", "VideoSegmentUI.onVideoSizeChanged wrong size (%d, %d) invoked = %b", new Object[]{Integer.valueOf(i), Integer.valueOf(i2), Boolean.valueOf(VideoSegmentUI.q(this.ozN))});
            AppMethodBeat.o(55033);
        } else if (VideoSegmentUI.q(this.ozN)) {
            ab.e("MicroMsg.VideoSegmentUI", "VideoSegmentUI.onVideoSizeChanged surface has invoked");
            AppMethodBeat.o(55033);
        } else {
            ab.i("MicroMsg.VideoSegmentUI", "VideoSegmentUI.onVideoSizeChanged (%d, %d)", new Object[]{Integer.valueOf(i), Integer.valueOf(i2)});
            VideoSegmentUI.r(this.ozN);
            if (i2 <= 0 || i <= 0) {
                ab.e("MicroMsg.VideoSegmentUI", "This video has wrong size (%dx%d)", new Object[]{Integer.valueOf(i), Integer.valueOf(i2)});
                VideoSegmentUI.m(this.ozN);
                this.ozN.finish();
                VideoSegmentUI.b(this.ozN);
                AppMethodBeat.o(55033);
                return;
            }
            VideoSegmentUI$a videoSegmentUI$a = new VideoSegmentUI$a(this.ozN, VideoSegmentUI.s(this.ozN), i2, i, i3, new b(this.ozN, (byte) 0));
            if (VideoSegmentUI.s(this.ozN).getWidth() <= 0 || VideoSegmentUI.s(this.ozN).getHeight() <= 0) {
                ab.i("MicroMsg.VideoSegmentUI", "post init surface task after root measured.");
                VideoSegmentUI.s(this.ozN).post(videoSegmentUI$a);
                AppMethodBeat.o(55033);
                return;
            }
            videoSegmentUI$a.run();
            AppMethodBeat.o(55033);
        }
    }
}
