[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
相关推荐
扫地的小何尚4 分钟前
NVIDIA工业设施数字孪生中的机器人模拟
android·java·c++·链表·语言模型·机器人·gpu
顾林海2 小时前
深度解析ArrayList工作原理
android·java·面试
安静的海岸_AI2 小时前
Android端WIFI/流量共存技术方案
android
_一条咸鱼_2 小时前
Android Compose 框架进度指示器深入剖析(五十二)
android
张风捷特烈2 小时前
Flutter 伪 3D 绘制#02 | 地平面与透视
android·flutter
每次的天空2 小时前
Kotlin 作用域函数:apply、let、run、with、also
android·开发语言·kotlin
重生之我在写代码2 小时前
如何进行apk反编译
android·程序员·编译器
树豪2 小时前
跟着官网学 Lynx 之 搭建 Lynx todo-list app
android·前端
孙同学_3 小时前
【Linux篇】自主Shell命令行解释器
android·linux
Taichi呀3 小时前
PHP语言基础
android·开发语言·php