[Android] NuPlayer回调通知直至App

复制代码
@startuml

package App{
    class CallBacks{
        <font color="#999933" size=20> notify </font>mOnPreparedListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnCompletionListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnBufferingUpdateListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnSeekCompleteListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnVideoSizeChangedListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnTimedTextListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mExtSubtitleDataListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnMediaTimeDiscontinuityListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnTimedMetaDataAvailableListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnErrorListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnInfoListener<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnDrmConfigHelper<font color="#999933" size=20> notify-END </font>
        <font color="#999933" size=20> notify </font>mOnDrmInfoHandlerDelegate<font color="#999933" size=20> notify-END </font>
    }
}

package libmedia{
    class JAVA{
        <font color="pink" size=20> notify </font>private static void postEventFromNative(Object mediaplayer_ref,int what, int arg1, int arg2, Object obj)  <font color="brown" size=20> notify </font>
        <font color="brown" size=20> notify </font>public void EventHandler::handleMessage(Message msg)  <font color="#999933" size=20> notify </font>
    }
    class JNI{
        JNIMediaPlayerListener
        <font color="green" size=20> notify </font>void JNIMediaPlayerListener::notify(int msg, int ext1, int ext2, const Parcel *obj) <font color="pink" size=20> notify </font>
    }
    class MediaPlayer{
        <font color="blue" size=20> notify </font> void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) <font color="green" size=20> notify </font>
    }
}

package Interface{
    abstract class IMediaPlayerClient{
        <font color="cyan">IMediaPlayerClient.h
        <font color="green">处理来自Client的回调
        <font color="red" size=20> notify </font> {abstract}  void notify(int msg, int ext1, int ext2, const Parcel *obj) = 0;  <font color="blue" size=20> notify </font>
    }
}

package libmediaplayerservice{
    class NuPlayerDriver{
        <font color="#4f6459" size=20> notify </font> void NuPlayerDriver::notifyListener_l(int msg, int ext1, int ext2, const Parcel *in) <font color="orange" size=20> notify </font>
    }
    class NuPlayer{
        <font color="#4f6459" size=20> notify-START </font> xxx() <font color="#4f6459" size=20> notify </font>
    }
    class Client{
        <font color="orange" size=20> notify </font> void MediaPlayerService::Client::notify(int msg, int ext1, int ext2, const Parcel *obj) <font color="red" size=20> notify </font>
    }
}

NuPlayer --> NuPlayerDriver
NuPlayerDriver --> Client
IMediaPlayerClient --> MediaPlayer
Client --> IMediaPlayerClient
MediaPlayer --> JNI
JNI --> JAVA
JAVA --> CallBacks

@enduml
相关推荐
Vincent(朱志强)1 小时前
设计模式详解(十二):单例模式——Singleton
android·单例模式·设计模式
mmsx1 小时前
android 登录界面编写
android·登录界面
姜毛毛-JYM1 小时前
【JetPack】Navigation知识点总结
android
花生糖@3 小时前
Android XR 应用程序开发 | 从 Unity 6 开发准备到应用程序构建的步骤
android·unity·xr·android xr
是程序喵呀3 小时前
MySQL备份
android·mysql·adb
casual_clover3 小时前
Android 之 List 简述
android·list
锋风Fengfeng4 小时前
安卓15预置第三方apk时签名报错问题解决
android
User_undefined5 小时前
uniapp Native.js原生arr插件服务发送广播到uniapp页面中
android·javascript·uni-app
程序员厉飞雨6 小时前
Android R8 耗时优化
android·java·前端
丘狸尾7 小时前
[cisco 模拟器] ftp服务器配置
android·运维·服务器