diff options
author | Andreas Huber <andih@google.com> | 2010-01-28 11:19:57 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-01-28 11:52:43 -0800 |
commit | 2db8455d8f4468a637109d31f319ce02d9d743ec (patch) | |
tree | 7f3418b24ec0779af3ab25202eb5063e860610d5 /media/libmedia/mediaplayer.cpp | |
parent | 8566a635aa4bf6d2e908f0bc64d4fb8917025b58 (diff) | |
download | frameworks_av-2db8455d8f4468a637109d31f319ce02d9d743ec.zip frameworks_av-2db8455d8f4468a637109d31f319ce02d9d743ec.tar.gz frameworks_av-2db8455d8f4468a637109d31f319ce02d9d743ec.tar.bz2 |
API Extension: Support for optionally specifying a map of extra request headers when specifying the uri of media data to be played.
related-to-bug: 2393577
Original change by Andrei Popescu <andreip@google.com>
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r-- | media/libmedia/mediaplayer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index c0664f3..cb5ee4b 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -32,6 +32,9 @@ #include <binder/MemoryBase.h> +#include <utils/KeyedVector.h> +#include <utils/String8.h> + namespace android { MediaPlayer::MediaPlayer() @@ -122,14 +125,16 @@ status_t MediaPlayer::setDataSource(const sp<IMediaPlayer>& player) return err; } -status_t MediaPlayer::setDataSource(const char *url) +status_t MediaPlayer::setDataSource( + const char *url, const KeyedVector<String8, String8> *headers) { LOGV("setDataSource(%s)", url); status_t err = BAD_VALUE; if (url != NULL) { const sp<IMediaPlayerService>& service(getMediaPlayerService()); if (service != 0) { - sp<IMediaPlayer> player(service->create(getpid(), this, url)); + sp<IMediaPlayer> player( + service->create(getpid(), this, url, headers)); err = setDataSource(player); } } |