当前位置:   article > 正文

[Android] Client->NuPlayer

[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
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/89038
推荐阅读
相关标签
  

闽ICP备14008679号