得物.apk(点击下载) / VideoNFTARExportService.java


package com.shizhuang.duapp.media.editvideo.service;

import a.f;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.libs.bpm.BM;
import com.shizhuang.duapp.media.publish.activity.TotalPublishProcessActivity;
import com.shizhuang.duapp.modules.du_community_common.dialog.PublishLoadProgressDialogFragment;
import com.shizhuang.duapp.modules.du_community_common.interfaces.ITotalPublish;
import com.shizhuang.duapp.modules.du_community_common.model.BandInfo;
import com.shizhuang.duapp.stream.model.StreamModel;
import com.shizhuang.duapp.vesdk.IVEContainer;
import com.shizhuang.duapp.vesdk.service.editor.EditorCoreService;
import com.shizhuang.duapp.vesdk.service.editor.Effect;
import com.shizhuang.duapp.vesdk.service.editor.IEditorCoreService;
import com.shizhuang.duapp.vesdk.service.editor.IMediaClipWrapper;
import com.shizhuang.duapp.vesdk.service.editor.OnClipOperationResultListener;
import com.shizhuang.duapp.vesdk.service.editor.Sticker;
import com.shizhuang.duapp.vesdk.service.editor.StickerEffect;
import com.shizhuang.duapp.vesdk.service.editor.VideoExportObserver;
import com.shizhuang.model.video.TempVideo;
import com.tencent.mars.xlog.Log;
import df.o0;
import df.q;
import io.reactivex.functions.Consumer;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.internal.Intrinsics;
import nd.e;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import t20.n;

@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0005"}, d2 = {"Lcom/shizhuang/duapp/media/editvideo/service/VideoNFTARExportService;", "Lcom/shizhuang/duapp/media/editvideo/service/IVideoNFTARExportService;", "Lcom/shizhuang/duapp/vesdk/service/editor/VideoExportObserver;", "<init>", "()V", "du_media_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: VideoNFTARExportService.kt */
public final class VideoNFTARExportService implements IVideoNFTARExportService, VideoExportObserver {
    public static ChangeQuickRedirect changeQuickRedirect;
    public IVEContainer b;

    /* renamed from: c  reason: collision with root package name */
    public IEditorCoreService f9979c;
    public IDuEditorService d;
    public StreamModel e;
    public TempVideo f;

    /* renamed from: g  reason: collision with root package name */
    public final Lazy f9980g = LazyKt__LazyJVMKt.lazy(VideoNFTARExportService$composeDisposable$2.INSTANCE);

    /* renamed from: h  reason: collision with root package name */
    public final ArrayList<IVideoNFTARExportObserver> f9981h = new ArrayList<>();

    /* compiled from: VideoNFTARExportService.kt */
    public static final class a<T> implements Consumer<List<? extends String>> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ VideoNFTARExportService b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ StreamModel f9982c;

        public a(VideoNFTARExportService videoNFTARExportService, StreamModel streamModel) {
            this.b = videoNFTARExportService;
            this.f9982c = streamModel;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(List<? extends String> list) {
            ArrayList arrayList;
            if (!PatchProxy.proxy(new Object[]{list}, this, changeQuickRedirect, false, 44484, new Class[]{List.class}, Void.TYPE).isSupported) {
                VideoNFTARExportService videoNFTARExportService = this.b;
                if (!PatchProxy.proxy(new Object[0], videoNFTARExportService, VideoNFTARExportService.changeQuickRedirect, false, 44474, new Class[0], Void.TYPE).isSupported) {
                    PublishLoadProgressDialogFragment.a.e(PublishLoadProgressDialogFragment.R, videoNFTARExportService.b(), "努力导出中", "请不要退出得物", false, false, 24);
                    o0.b("community_content_release_block_exposure", VideoNFTARExportService$showLoadDialog$1.INSTANCE);
                }
                ArrayList arrayList2 = new ArrayList();
                StringBuilder h12 = f.h("{\"effect\":[{\"type\":\"background\",\"backgroundType\":");
                IVEContainer iVEContainer = this.b.b;
                if (iVEContainer == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
                }
                h12.append(iVEContainer.getEffectService().getBackgroundType().getType());
                h12.append(",\"blur\":");
                IVEContainer iVEContainer2 = this.b.b;
                if (iVEContainer2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
                }
                h12.append(iVEContainer2.getEffectService().getBackgroundBlur());
                h12.append("}]}");
                String sb2 = h12.toString();
                IEditorCoreService iEditorCoreService = this.b.f9979c;
                arrayList2.add(new Effect(sb2, 1, null, 0, iEditorCoreService != null ? (int) iEditorCoreService.getDuration() : 0, 4, null));
                ku.a aVar = ku.a.f34913a;
                String g3 = aVar.g("https://cdn.poizon.com/node-common/7e680b3a-e78b-d468-3dac-c7baab876c90-246-66.png");
                VideoNFTARExportService videoNFTARExportService2 = this.b;
                int width = this.f9982c.getWidth();
                int height = this.f9982c.getHeight();
                Object[] objArr = {g3, new Integer(width), new Integer(height)};
                ChangeQuickRedirect changeQuickRedirect2 = VideoNFTARExportService.changeQuickRedirect;
                Class cls = Integer.TYPE;
                PatchProxyResult proxy = PatchProxy.proxy(objArr, videoNFTARExportService2, changeQuickRedirect2, false, 44468, new Class[]{String.class, cls, cls}, ArrayList.class);
                if (proxy.isSupported) {
                    arrayList = (ArrayList) proxy.result;
                } else {
                    ArrayList arrayList3 = new ArrayList();
                    IVEContainer iVEContainer3 = videoNFTARExportService2.b;
                    if (iVEContainer3 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
                    }
                    int videoWidth = iVEContainer3.getRenderService().getVideoWidth();
                    IVEContainer iVEContainer4 = videoNFTARExportService2.b;
                    if (iVEContainer4 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
                    }
                    int videoHeight = iVEContainer4.getRenderService().getVideoHeight();
                    if (videoWidth > 0 && videoHeight > 0) {
                        int a5 = n.a(80);
                        int a12 = n.a(20);
                        float f = (float) width;
                        float f12 = (float) videoWidth;
                        float f13 = 1.0f * ((f * 1.0f) / f12);
                        float a13 = (((((((float) a5) / 2.0f) + ((float) n.a(20))) / f12) * f) - ((float) (a5 / 2))) / f;
                        float f14 = (float) height;
                        float a14 = (((((((float) a12) / 2.0f) + ((float) ((videoHeight - n.a(20)) - a12))) / ((float) videoHeight)) * f14) - ((float) (a12 / 2))) / f14;
                        IEditorCoreService iEditorCoreService2 = videoNFTARExportService2.f9979c;
                        long duration = iEditorCoreService2 != null ? iEditorCoreService2.getDuration() : 0;
                        if (!(g3.length() == 0)) {
                            arrayList3.add(new Sticker("infoSticker", a13, a14, g3, f13, 0, 0, (int) duration));
                        }
                    }
                    arrayList = arrayList3;
                }
                StickerEffect stickerEffect = new StickerEffect(arrayList);
                if (!stickerEffect.getEffect().isEmpty()) {
                    String n = e.n(stickerEffect);
                    if (n == null) {
                        n = "";
                    }
                    arrayList2.add(new Effect(n, 1, null, -1, -1, 4, null));
                }
                jf1.b bVar = new jf1.b(aVar.g("https://cdn.poizon.com/node-common/005b02c1-aca6-95d7-2a11-e6ae53c1753b-900-1599.png"));
                bVar.f(0);
                bVar.a(5000);
                IEditorCoreService iEditorCoreService3 = this.b.f9979c;
                if (iEditorCoreService3 != null) {
                    List<IMediaClipWrapper> addedMediaClips = iEditorCoreService3.getAddedMediaClips();
                    iEditorCoreService3.insertClip(addedMediaClips != null ? addedMediaClips.size() : 0, bVar, new a(this, arrayList2));
                }
            }
        }
    }

    /* compiled from: VideoNFTARExportService.kt */
    public static final class b<T> implements Consumer<Throwable> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ VideoNFTARExportService b;

        public b(VideoNFTARExportService videoNFTARExportService) {
            this.b = videoNFTARExportService;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(Throwable th2) {
            if (!PatchProxy.proxy(new Object[]{th2}, this, changeQuickRedirect, false, 44487, new Class[]{Throwable.class}, Void.TYPE).isSupported) {
                this.b.onExportFailed(-1);
            }
        }
    }

    /* compiled from: VideoNFTARExportService.kt */
    public static final class c implements OnClipOperationResultListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ VideoNFTARExportService f9983a;

        /* compiled from: VideoNFTARExportService.kt */
        public static final class a implements OnClipOperationResultListener {
            public static ChangeQuickRedirect changeQuickRedirect;

            @Override // com.shizhuang.duapp.vesdk.service.editor.OnClipOperationResultListener
            public void onFailed(int i, @NotNull String str) {
                boolean z = PatchProxy.proxy(new Object[]{new Integer(i), str}, this, changeQuickRedirect, false, 44491, new Class[]{Integer.TYPE, String.class}, Void.TYPE).isSupported;
            }

            @Override // com.shizhuang.duapp.vesdk.service.editor.OnClipOperationResultListener
            public void onSuccess(@Nullable IMediaClipWrapper iMediaClipWrapper) {
                boolean z = PatchProxy.proxy(new Object[]{iMediaClipWrapper}, this, changeQuickRedirect, false, 44490, new Class[]{IMediaClipWrapper.class}, Void.TYPE).isSupported;
            }
        }

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public c(VideoNFTARExportService videoNFTARExportService) {
            this.f9983a = videoNFTARExportService;
        }

        @Override // com.shizhuang.duapp.vesdk.service.editor.OnClipOperationResultListener
        public void onFailed(int i, @NotNull String str) {
            boolean z = PatchProxy.proxy(new Object[]{new Integer(i), str}, this, changeQuickRedirect, false, 44489, new Class[]{Integer.TYPE, String.class}, Void.TYPE).isSupported;
        }

        @Override // com.shizhuang.duapp.vesdk.service.editor.OnClipOperationResultListener
        public void onSuccess(@Nullable IMediaClipWrapper iMediaClipWrapper) {
            List<Integer> videoEnd;
            Integer num;
            List<Integer> videoStart;
            Integer num2;
            List<String> videoPath;
            boolean z = true;
            if (!PatchProxy.proxy(new Object[]{iMediaClipWrapper}, this, changeQuickRedirect, false, 44488, new Class[]{IMediaClipWrapper.class}, Void.TYPE).isSupported) {
                StreamModel streamModel = this.f9983a.e;
                String str = (streamModel == null || (videoPath = streamModel.getVideoPath()) == null) ? null : (String) CollectionsKt___CollectionsKt.getOrNull(videoPath, 0);
                if (!(str == null || str.length() == 0)) {
                    z = false;
                }
                if (!z) {
                    jf1.b bVar = new jf1.b(str);
                    StreamModel streamModel2 = this.f9983a.e;
                    bVar.f((streamModel2 == null || (videoStart = streamModel2.getVideoStart()) == null || (num2 = (Integer) CollectionsKt___CollectionsKt.getOrNull(videoStart, 0)) == null) ? 0 : num2.intValue());
                    StreamModel streamModel3 = this.f9983a.e;
                    bVar.a((streamModel3 == null || (videoEnd = streamModel3.getVideoEnd()) == null || (num = (Integer) CollectionsKt___CollectionsKt.getOrNull(videoEnd, 0)) == null) ? df1.e.f31483a.g(str) : num.intValue());
                    IEditorCoreService iEditorCoreService = this.f9983a.f9979c;
                    if (iEditorCoreService != null) {
                        iEditorCoreService.insertClip(0, bVar, new a());
                    }
                }
            }
        }
    }

    public final fj1.a a() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44462, new Class[0], fj1.a.class);
        return (fj1.a) (proxy.isSupported ? proxy.result : this.f9980g.getValue());
    }

    @Override // com.shizhuang.duapp.media.editvideo.service.IVideoNFTARExportService
    public void addVideoNtfARExportObserver(@NotNull IVideoNFTARExportObserver iVideoNFTARExportObserver) {
        if (!PatchProxy.proxy(new Object[]{iVideoNFTARExportObserver}, this, changeQuickRedirect, false, 44477, new Class[]{IVideoNFTARExportObserver.class}, Void.TYPE).isSupported && !this.f9981h.contains(iVideoNFTARExportObserver)) {
            this.f9981h.add(iVideoNFTARExportObserver);
        }
    }

    public final FragmentManager b() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44476, new Class[0], FragmentManager.class);
        if (proxy.isSupported) {
            return (FragmentManager) proxy.result;
        }
        IVEContainer iVEContainer = this.b;
        if (iVEContainer == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
        }
        Context context = iVEContainer.getContext();
        if (!(context instanceof FragmentActivity)) {
            context = null;
        }
        FragmentActivity fragmentActivity = (FragmentActivity) context;
        if (fragmentActivity != null) {
            return fragmentActivity.getSupportFragmentManager();
        }
        return null;
    }

    @Override // com.shizhuang.duapp.vesdk.IVEService
    public void bindVEContainer(@NotNull IVEContainer iVEContainer) {
        if (!PatchProxy.proxy(new Object[]{iVEContainer}, this, changeQuickRedirect, false, 44464, new Class[]{IVEContainer.class}, Void.TYPE).isSupported) {
            this.b = iVEContainer;
            if (iVEContainer == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
            }
            this.f9979c = (IEditorCoreService) iVEContainer.getServiceManager().getService(EditorCoreService.class);
            IVEContainer iVEContainer2 = this.b;
            if (iVEContainer2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
            }
            this.d = (IDuEditorService) iVEContainer2.getServiceManager().getService(DuEditorService.class);
        }
    }

    public final void c() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44475, new Class[0], Void.TYPE).isSupported) {
            PublishLoadProgressDialogFragment.R.a(b());
        }
    }

    public final void d(TempVideo tempVideo, String str) {
        if (!PatchProxy.proxy(new Object[]{tempVideo, str}, this, changeQuickRedirect, false, 44479, new Class[]{TempVideo.class, String.class}, Void.TYPE).isSupported) {
            Iterator<T> it2 = this.f9981h.iterator();
            while (it2.hasNext()) {
                it2.next().onExportComplete(tempVideo, str);
            }
        }
    }

    @Override // com.shizhuang.duapp.media.editvideo.service.IVideoNFTARExportService
    public void export(@NotNull StreamModel streamModel) {
        if (!PatchProxy.proxy(new Object[]{streamModel}, this, changeQuickRedirect, false, 44466, new Class[]{StreamModel.class}, Void.TYPE).isSupported) {
            this.e = streamModel;
            TempVideo tempVideo = this.f;
            if (tempVideo == null) {
                a().add(ku.a.f34913a.a(CollectionsKt__CollectionsKt.listOf((Object[]) new String[]{"https://cdn.poizon.com/node-common/7e680b3a-e78b-d468-3dac-c7baab876c90-246-66.png", "https://cdn.poizon.com/node-common/005b02c1-aca6-95d7-2a11-e6ae53c1753b-900-1599.png"})).subscribe(new a(this, streamModel), new b(this)));
            } else if (tempVideo != null) {
                d(tempVideo, tempVideo.mOutputVideoPath);
            }
        }
    }

    @Override // com.shizhuang.duapp.media.editvideo.service.IVideoNFTARExportService
    public void goToPublishPage(@NotNull StreamModel streamModel) {
        String str;
        BandInfo bandInfo;
        if (!PatchProxy.proxy(new Object[]{streamModel}, this, changeQuickRedirect, false, 44467, new Class[]{StreamModel.class}, Void.TYPE).isSupported) {
            Log.i("media_vide_editor", "VideoEditorFragment  no need export");
            TempVideo tempVideo = new TempVideo();
            List<String> videoPath = streamModel.getVideoPath();
            if (videoPath == null || (str = (String) CollectionsKt___CollectionsKt.getOrNull(videoPath, 0)) == null) {
                str = "";
            }
            tempVideo.mOutputVideoPath = str;
            IEditorCoreService iEditorCoreService = this.f9979c;
            tempVideo.duration = (int) (iEditorCoreService != null ? iEditorCoreService.getDuration() : 0);
            IVEContainer iVEContainer = this.b;
            if (iVEContainer == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
            }
            Context context = iVEContainer.getContext();
            if (!(context instanceof ITotalPublish)) {
                context = null;
            }
            ITotalPublish iTotalPublish = (ITotalPublish) context;
            if (iTotalPublish == null || (bandInfo = iTotalPublish.getBandInfo()) == null) {
                bandInfo = new BandInfo(null, null, 3, null);
            }
            tempVideo.bandInfo = e.n(bandInfo);
            ku.b bVar = ku.b.f34916a;
            IVEContainer iVEContainer2 = this.b;
            if (iVEContainer2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
            }
            TotalPublishProcessActivity f12 = bVar.f(iVEContainer2.getContext());
            if (f12 != null) {
                ITotalPublish.a.b(f12, tempVideo, null, false, 2, null);
            }
        }
    }

    @Override // com.shizhuang.duapp.vesdk.service.editor.VideoExportObserver
    public void onExportCancel() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44472, new Class[0], Void.TYPE).isSupported) {
            Log.i("media_vide_editor", "VideoEditorFragment  export cancel");
            c();
            IDuEditorService iDuEditorService = this.d;
            if (iDuEditorService != null) {
                iDuEditorService.setExporting(false);
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44481, new Class[0], Void.TYPE).isSupported) {
                Iterator<T> it2 = this.f9981h.iterator();
                while (it2.hasNext()) {
                    it2.next().onExportCancel();
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.vesdk.service.editor.VideoExportObserver
    public void onExportComplete(@NotNull String str) {
        int i = 0;
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 44471, new Class[]{String.class}, Void.TYPE).isSupported) {
            Log.i("media_vide_editor", "VideoEditorFragment  export success");
            c();
            IDuEditorService iDuEditorService = this.d;
            if (iDuEditorService != null) {
                iDuEditorService.setExporting(false);
            }
            Intent intent = new Intent("android.intent.action.MEDIA_SCANNER_SCAN_FILE");
            intent.setData(Uri.fromFile(new File(str)));
            IVEContainer iVEContainer = this.b;
            if (iVEContainer == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mVEContainer");
            }
            iVEContainer.getContext().sendBroadcast(intent);
            IEditorCoreService iEditorCoreService = this.f9979c;
            if (iEditorCoreService != null) {
                iEditorCoreService.removeAllClips(true, new c(this));
            }
            TempVideo tempVideo = new TempVideo();
            this.f = tempVideo;
            tempVideo.mOutputVideoPath = str;
            IEditorCoreService iEditorCoreService2 = this.f9979c;
            if (iEditorCoreService2 != null) {
                i = (int) iEditorCoreService2.getDuration();
            }
            tempVideo.duration = i;
            TempVideo tempVideo2 = this.f;
            if (tempVideo2 != null) {
                d(tempVideo2, str);
            }
        }
    }

    @Override // com.shizhuang.duapp.vesdk.service.editor.VideoExportObserver
    public void onExportFailed(int i) {
        Object[] objArr = {new Integer(i)};
        ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
        Class cls = Integer.TYPE;
        if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 44473, new Class[]{cls}, Void.TYPE).isSupported) {
            BM.community().c("publish_tool_video_edit_to_cover_duration", MapsKt__MapsKt.hashMapOf(new Pair("result", String.valueOf(i))));
            Log.i("media_vide_editor", "VideoEditorFragment  export fail" + i);
            q.r("导出失败");
            c();
            IDuEditorService iDuEditorService = this.d;
            if (iDuEditorService != null) {
                iDuEditorService.setExporting(false);
            }
            if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 44480, new Class[]{cls}, Void.TYPE).isSupported) {
                Iterator<T> it2 = this.f9981h.iterator();
                while (it2.hasNext()) {
                    it2.next().onExportFailed(i);
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.vesdk.service.editor.VideoExportObserver
    public void onExportProgress(float f12) {
        PublishLoadProgressDialogFragment b2;
        if (!PatchProxy.proxy(new Object[]{new Float(f12)}, this, changeQuickRedirect, false, 44470, new Class[]{Float.TYPE}, Void.TYPE).isSupported && (b2 = PublishLoadProgressDialogFragment.R.b(b())) != null) {
            b2.i0(f12);
        }
    }

    @Override // com.shizhuang.duapp.vesdk.service.editor.VideoExportObserver
    public void onExportStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44469, new Class[0], Void.TYPE).isSupported) {
            IDuEditorService iDuEditorService = this.d;
            if (iDuEditorService != null) {
                iDuEditorService.setExporting(true);
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44482, new Class[0], Void.TYPE).isSupported) {
                Iterator<T> it2 = this.f9981h.iterator();
                while (it2.hasNext()) {
                    it2.next().onExportStart();
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.vesdk.IVEService
    public void onStart() {
        IEditorCoreService iEditorCoreService;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44463, new Class[0], Void.TYPE).isSupported && (iEditorCoreService = this.f9979c) != null) {
            iEditorCoreService.addVideoExportObserver(this);
        }
    }

    @Override // com.shizhuang.duapp.vesdk.IVEService
    public void onStop() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 44465, new Class[0], Void.TYPE).isSupported) {
            IEditorCoreService iEditorCoreService = this.f9979c;
            if (iEditorCoreService != null) {
                iEditorCoreService.removeVideoExportObserver(this);
            }
            a().a();
        }
    }

    @Override // com.shizhuang.duapp.media.editvideo.service.IVideoNFTARExportService
    public void removeVideoNtfARExportObserver(@NotNull IVideoNFTARExportObserver iVideoNFTARExportObserver) {
        if (!PatchProxy.proxy(new Object[]{iVideoNFTARExportObserver}, this, changeQuickRedirect, false, 44478, new Class[]{IVideoNFTARExportObserver.class}, Void.TYPE).isSupported) {
            this.f9981h.remove(iVideoNFTARExportObserver);
        }
    }
}