Hi, What is the difference between the create methods of player and recorder?
virtual sp<IMediaRecorder> createMediaRecorder(pid_t pid) = 0; and virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client, const char* url) = 0; Both return an instance of the interface requested. But, the create of MediaPlayerService takes in the reference of the client as well. Is this for the notifications back from the mediaplayerservice to the client? Or, for something else? -Ravi On Feb 16, 12:26 pm, Dave Sparks <[email protected]> wrote: > We needed a static object to allocate new clients. It happened to be > convenient. It may get renamed in the future. > > On Feb 16, 9:27 am, hanchao3c <[email protected]> wrote: > > > In this code: > > base/include/media/IMediaPlayerService.h > > > class IMediaPlayerService: public IInterface > > { > > public: > > DECLARE_META_INTERFACE(MediaPlayerService); > > > virtual sp<IMediaRecorder> createMediaRecorder(pid_t pid) = 0; > > virtual sp<IMediaMetadataRetriever> createMetadataRetriever(pid_t > > pid) = 0; > > > virtual sp<IMediaPlayer> create(pid_t pid, const > > sp<IMediaPlayerClient>& client, const char* url) = 0; > > virtual sp<IMediaPlayer> create(pid_t pid, const > > sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t > > length) = 0; > > virtual sp<IMemory> decode(const char* url, uint32_t > > *pSampleRate, int* pNumChannels, int* pFormat) = 0; > > virtual sp<IMemory> decode(int fd, int64_t offset, int64_t > > length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;}; > > > ================================================================================ > > > 1. It seems there should a IMediaRedorderService , but there isn't! > > 2. If use it like this , why still call it "IMediaPlayerService" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
