Loading include/media/mediaplayer.h +17 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,12 @@ public: void died(); void disconnect(); #ifdef SAMSUNG_CAMERA_LEGACY status_t setDataSource( const char *url, const KeyedVector<String8, String8> *headers); #endif status_t setDataSource( const sp<IMediaHTTPService> &httpService, const char *url, Loading Loading @@ -234,6 +240,17 @@ public: bool isLooping(); status_t setVolume(float leftVolume, float rightVolume); void notify(int msg, int ext1, int ext2, const Parcel *obj = NULL); #ifdef SAMSUNG_CAMERA_LEGACY static status_t decode( const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat, const sp<IMemoryHeap>& heap, size_t *pSize); #endif static status_t decode( const sp<IMediaHTTPService> &httpService, const char* url, Loading media/libmedia/mediaplayer.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include <media/mediaplayer.h> #include <media/AudioSystem.h> #include <media/IMediaHTTPService.h> #include <binder/MemoryBase.h> Loading Loading @@ -142,6 +143,15 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) return err; } #ifdef SAMSUNG_CAMERA_LEGACY status_t MediaPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { sp<IMediaHTTPService> httpService; return setDataSource(httpService, url, headers); } #endif status_t MediaPlayer::setDataSource( const sp<IMediaHTTPService> &httpService, const char *url, const KeyedVector<String8, String8> *headers) Loading Loading @@ -841,6 +851,20 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) } } #ifdef SAMSUNG_CAMERA_LEGACY /*static*/ status_t MediaPlayer::decode( const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat, const sp<IMemoryHeap>& heap, size_t *pSize) { sp<IMediaHTTPService> httpService; return decode(httpService, url, pSampleRate, pNumChannels, pFormat, heap, pSize); } #endif /*static*/ status_t MediaPlayer::decode( const sp<IMediaHTTPService> &httpService, const char* url, Loading Loading
include/media/mediaplayer.h +17 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,12 @@ public: void died(); void disconnect(); #ifdef SAMSUNG_CAMERA_LEGACY status_t setDataSource( const char *url, const KeyedVector<String8, String8> *headers); #endif status_t setDataSource( const sp<IMediaHTTPService> &httpService, const char *url, Loading Loading @@ -234,6 +240,17 @@ public: bool isLooping(); status_t setVolume(float leftVolume, float rightVolume); void notify(int msg, int ext1, int ext2, const Parcel *obj = NULL); #ifdef SAMSUNG_CAMERA_LEGACY static status_t decode( const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat, const sp<IMemoryHeap>& heap, size_t *pSize); #endif static status_t decode( const sp<IMediaHTTPService> &httpService, const char* url, Loading
media/libmedia/mediaplayer.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include <media/mediaplayer.h> #include <media/AudioSystem.h> #include <media/IMediaHTTPService.h> #include <binder/MemoryBase.h> Loading Loading @@ -142,6 +143,15 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) return err; } #ifdef SAMSUNG_CAMERA_LEGACY status_t MediaPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { sp<IMediaHTTPService> httpService; return setDataSource(httpService, url, headers); } #endif status_t MediaPlayer::setDataSource( const sp<IMediaHTTPService> &httpService, const char *url, const KeyedVector<String8, String8> *headers) Loading Loading @@ -841,6 +851,20 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) } } #ifdef SAMSUNG_CAMERA_LEGACY /*static*/ status_t MediaPlayer::decode( const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat, const sp<IMemoryHeap>& heap, size_t *pSize) { sp<IMediaHTTPService> httpService; return decode(httpService, url, pSampleRate, pNumChannels, pFormat, heap, pSize); } #endif /*static*/ status_t MediaPlayer::decode( const sp<IMediaHTTPService> &httpService, const char* url, Loading