frameworks/av/media/libmediaplayerservice/MediaPlayerService.h
MediaPlayerService 类的继承关系如下:
Client 和 AudioOutput 是 MediaPlayerService的内部类
IMediaPlayerService是对为提供的接口类, 定义如下:
frameworks/av/include/media/IMediaPlayerService.h
43class IMediaPlayerService: public IInterface
44{
45public:
46 DECLARE_META_INTERFACE(MediaPlayerService);
47
48 virtual sp<IMediaRecorder> createMediaRecorder(const String16 &opPackageName) = 0;
49 virtual sp<IMediaMetadataRetriever> createMetadataRetriever() = 0;
50 virtual sp<IMediaPlayer> create(const sp<IMediaPlayerClient>& client,
51 audio_session_t audioSessionId = AUDIO_SESSION_ALLOCATE) = 0;
52 virtual sp<IOMX> getOMX() = 0;
53 virtual sp<IHDCP> makeHDCP(bool createEncryptionModule) = 0;
54 virtual sp<IMediaCodecList> getCodecList() const = 0;
55
56 // Connects to a remote display.
57 // 'iface' specifies the address of the local interface on which to listen for
58 // a connection from the remote display as an ip address and port number
59 // of the form "x.x.x.x:y". The media server should call back into the provided remote
60 // display client when display connection, disconnection or errors occur.
61 // The assumption is that at most one remote display will be connected to the
62 // provided interface at a time.
63 virtual sp<IRemoteDisplay> listenForRemoteDisplay(