diff options
-rw-r--r-- | include/media/MediaPlayerInterface.h | 1 | ||||
-rw-r--r-- | include/media/mediaplayer.h | 10 | ||||
-rw-r--r-- | media/libavextensions/mediaplayerservice/AVMediaServiceExtensions.h | 4 | ||||
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerFactory.cpp | 8 | ||||
-rw-r--r-- | media/libstagefright/rtsp/Android.mk | 5 |
5 files changed, 20 insertions, 8 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h index df10577..745151b 100644 --- a/include/media/MediaPlayerInterface.h +++ b/include/media/MediaPlayerInterface.h @@ -51,6 +51,7 @@ enum player_type { // The shared library with the test player is passed passed as an // argument to the 'test:' url in the setDataSource call. TEST_PLAYER = 5, + DASH_PLAYER = 6, }; diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index 3fe749c..c55e56c 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -54,6 +54,7 @@ enum media_event_type { MEDIA_INFO = 200, MEDIA_SUBTITLE_DATA = 201, MEDIA_META_DATA = 202, + MEDIA_QOE = 300, }; // Generic error codes for the media player framework. Errors are fatal, the @@ -209,7 +210,7 @@ public: void died(); void disconnect(); - status_t setDataSource( + virtual status_t setDataSource( const sp<IMediaHTTPService> &httpService, const char *url, const KeyedVector<String8, String8> *headers); @@ -224,7 +225,7 @@ public: status_t prepareAsync(); status_t start(); status_t stop(); - status_t pause(); + virtual status_t pause(); bool isPlaying(); status_t setPlaybackSettings(const AudioPlaybackRate& rate); status_t getPlaybackSettings(AudioPlaybackRate* rate /* nonnull */); @@ -234,7 +235,7 @@ public: float* videoFps /* nonnull */); status_t getVideoWidth(int *w); status_t getVideoHeight(int *h); - status_t seekTo(int msec); + virtual status_t seekTo(int msec); status_t getCurrentPosition(int *msec); status_t getDuration(int *msec); status_t reset(); @@ -243,7 +244,7 @@ public: status_t setLooping(int loop); bool isLooping(); status_t setVolume(float leftVolume, float rightVolume); - void notify(int msg, int ext1, int ext2, const Parcel *obj = NULL); + virtual void notify(int msg, int ext1, int ext2, const Parcel *obj = NULL); status_t invoke(const Parcel& request, Parcel *reply); status_t setMetadataFilter(const Parcel& filter); status_t getMetadata(bool update_only, bool apply_filter, Parcel *metadata); @@ -289,6 +290,7 @@ private: float mSendLevel; struct sockaddr_in mRetransmitEndpoint; bool mRetransmitEndpointValid; + friend class QCMediaPlayer; }; }; // namespace android diff --git a/media/libavextensions/mediaplayerservice/AVMediaServiceExtensions.h b/media/libavextensions/mediaplayerservice/AVMediaServiceExtensions.h index 5c31fad..d84344e 100644 --- a/media/libavextensions/mediaplayerservice/AVMediaServiceExtensions.h +++ b/media/libavextensions/mediaplayerservice/AVMediaServiceExtensions.h @@ -30,7 +30,7 @@ #define _AV_MEDIA_SERVICE_EXTENSIONS_H_ #include <common/AVExtensionsCommon.h> - +#include <MediaPlayerFactory.h> #include <utils/RefBase.h> #include <utils/String16.h> @@ -60,7 +60,7 @@ struct AVMediaServiceFactory { * Common delegate to the classes in libmediaplayerservice */ struct AVMediaServiceUtils { - + virtual void getDashPlayerFactory(MediaPlayerFactory::IFactory *&, player_type ) {} // RTSP IPV6 utils virtual bool pokeAHole(sp<MyHandler> handler, int rtpSocket, int rtcpSocket, const AString &transport, const AString &sessionHost); diff --git a/media/libmediaplayerservice/MediaPlayerFactory.cpp b/media/libmediaplayerservice/MediaPlayerFactory.cpp index 1be86d0..f0afc5a 100644 --- a/media/libmediaplayerservice/MediaPlayerFactory.cpp +++ b/media/libmediaplayerservice/MediaPlayerFactory.cpp @@ -32,6 +32,7 @@ #include "TestPlayerStub.h" #include "nuplayer/NuPlayerDriver.h" +#include <mediaplayerservice/AVMediaServiceExtensions.h> namespace android { @@ -241,6 +242,8 @@ class TestPlayerFactory : public MediaPlayerFactory::IFactory { }; void MediaPlayerFactory::registerBuiltinFactories() { + + MediaPlayerFactory::IFactory* pCustomFactory = NULL; Mutex::Autolock lock_(&sLock); if (sInitComplete) @@ -248,6 +251,11 @@ void MediaPlayerFactory::registerBuiltinFactories() { registerFactory_l(new NuPlayerFactory(), NU_PLAYER); registerFactory_l(new TestPlayerFactory(), TEST_PLAYER); + AVMediaServiceUtils::get()->getDashPlayerFactory(pCustomFactory, DASH_PLAYER); + if(pCustomFactory != NULL) { + ALOGV("Registering DASH_PLAYER"); + registerFactory_l(pCustomFactory, DASH_PLAYER); + } sInitComplete = true; } diff --git a/media/libstagefright/rtsp/Android.mk b/media/libstagefright/rtsp/Android.mk index 28c6fb6..8bc4295 100644 --- a/media/libstagefright/rtsp/Android.mk +++ b/media/libstagefright/rtsp/Android.mk @@ -22,9 +22,10 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES += libcrypto LOCAL_C_INCLUDES:= \ - $(TOP)/frameworks/av/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright \ $(TOP)/frameworks/av/media/libavextensions \ - $(TOP)/frameworks/native/include/media/openmax + $(TOP)/frameworks/native/include/media/openmax \ + $(TOP)/frameworks/av/media/libmediaplayerservice \ LOCAL_MODULE:= libstagefright_rtsp |