[Android] Client->NuPlayer

复制代码
@startuml

left to right direction

package libmediaplayerservice{

    class Client{
        <font color="#cc00cc" size=20> 1 </font>void MediaPlayerService::Client::disconnect()<font color="brown" size=20> 1 </font>
        <font color="#cc00cc" size=20> 2 </font>status_t MediaPlayerService::Client::reset()<font color="brown" size=20> 1 </font>
    }

    class NuPlayerDriver{
        <font color="brown" size=20> 1 </font>status_t NuPlayerDriver::reset()<font color="blue" size=20> 1 </font>
    }

    class NuPlayer{
        <font color="blue" size=20> 1 </font>void NuPlayer::resetAsync()<font color="blue" size=20> 2,4 </font>
        <font color="blue" size=20> 2 </font>void NuPlayer::performDecoderFlush(FlushCommand audio, FlushCommand video)<font color="blue" size=20> 3 </font>
        <font color="blue" size=20> 3 </font>void NuPlayer::flushDecoder(bool audio, bool needShutdown=FLUSH_CMD_SHUTDOWN)<font color="green" size=20> 1 </font>
        <font color="blue" size=20> 4 </font>void NuPlayer::performReset()
        <font color="blue" size=20> 5 </font>void NuPlayer::handleFlushComplete(bool audio, bool isDecoder)<font color="green" size=20> 2 </font>
    }

    class AudioSink{
        <font color="green"> responsible for audio output, if use DecoderPassThrough as audio decoder
        <font color="green"> this will use audiotrack passthrough mode, otherwise , this will used to output pcm
    }

    class Source{
        <font color="cyan"> NuPlayerSource.h
    }

    class HTTPLiveSource{
        <font color="cyan"> gui/Surface.h
        <font color="green"> hls use this , eg.NuPlayer: setDataSourceAsync HTTPLiveSource http://127.0.0.1:4455/src7/vod_0.m3u8

    }

    class Surface{
        <font color="cyan"> gui/Surface.h
    }

    class DecoderPassThrough{
       <font color="cyan"> NuPlayerDecoderPassThrough.h
    }

    class Decoder{
        <font color="cyan"> NuPlayerDecoder.h
        <font color="green" size=20> 1 </font>void NuPlayer::Decoder::onFlush()<font color="blue" size=20> 5 </font>
        <font color="green" size=20> 2 </font>void NuPlayer::Decoder::onShutdown(bool notifyComplete)<font color="red" size=20> 1 </font>
    }

    class CCDecoder{
        <font color="cyan"> NuPlayerCCDecoder.h
        <font color="green">responsible for codec info parse
    }

    class Renderer{
        <font color="cyan"> NuPlayerRenderer.h
        <font color="green"> responsible for A/V sync
    }

}

package libaudioclient{
    class AudioTrack{
    }
}

package libstagefright{
    class MediaCodec{
        <font color="green">responsible for hardware codec
        <font color="red" size=20> 1 </font>status_t MediaCodec::release()<font color="purple" size=20> 1 </font>
    }
}

package mediaserver{
    class mediaserverMediaCodec{
        <font color="purple" size=20> 1 </font>status_t MediaCodec::OnShutdown(const Message& msg)<font color="purple" size=20> 2 </font>
        <font color="purple" size=20> 2 </font>status_t MediaCodec::Stop(bool keepComponentAllocated, bool byDisposing)<font color="cyan" size=20> 1 </font>
    }
    class ResourceCenter{
        <font color="cyan" size=20> 1 </font>void ResourceCenter::DeallocateAll()
    }
}

NuPlayerDriver --> NuPlayer
AudioSink --> AudioTrack
NuPlayer --> NuPlayerDriver
NuPlayer --> AudioSink
Client --> NuPlayerDriver
NuPlayer -->  Source
NuPlayer -->  Surface
NuPlayer --> "video/audio" Decoder
NuPlayer --> "audio" DecoderPassThrough
Decoder -->  CCDecoder
Decoder -->  MediaCodec
Decoder --> "notify" NuPlayer
NuPlayer --> Renderer
MediaCodec --> mediaserverMediaCodec
mediaserverMediaCodec --> ResourceCenter
Source <|.. HTTPLiveSource


@enduml
相关推荐
Aileen_0v012 小时前
【Gemini3.0的国内use教程】
android·人工智能·算法·开源·mariadb
浩浩的代码花园12 小时前
自研端侧推理模型实测效果展示
android·深度学习·计算机视觉·端智能
踢球的打工仔19 小时前
PHP面向对象(7)
android·开发语言·php
安卓理事人19 小时前
安卓socket
android
安卓理事人1 天前
安卓LinkedBlockingQueue消息队列
android
万能的小裴同学1 天前
Android M3U8视频播放器
android·音视频
q***57741 天前
MySql的慢查询(慢日志)
android·mysql·adb
JavaNoober1 天前
Android 前台服务 "Bad Notification" 崩溃机制分析文档
android
城东米粉儿1 天前
关于ObjectAnimator
android
zhangphil1 天前
Android渲染线程Render Thread的RenderNode与DisplayList,引用Bitmap及Open GL纹理上传GPU
android