summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-01-28 11:19:57 -0800
committerAndreas Huber <andih@google.com>2010-01-28 11:52:43 -0800
commit2db8455d8f4468a637109d31f319ce02d9d743ec (patch)
tree7f3418b24ec0779af3ab25202eb5063e860610d5 /include
parent8566a635aa4bf6d2e908f0bc64d4fb8917025b58 (diff)
downloadframeworks_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 'include')
-rw-r--r--include/media/IMediaPlayerService.h4
-rw-r--r--include/media/MediaPlayerInterface.h10
-rw-r--r--include/media/PVPlayer.h5
-rw-r--r--include/media/mediaplayer.h9
4 files changed, 23 insertions, 5 deletions
diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h
index d5c1594..31c0991 100644
--- a/include/media/IMediaPlayerService.h
+++ b/include/media/IMediaPlayerService.h
@@ -18,7 +18,9 @@
#define ANDROID_IMEDIAPLAYERSERVICE_H
#include <utils/Errors.h> // for status_t
+#include <utils/KeyedVector.h>
#include <utils/RefBase.h>
+#include <utils/String8.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
@@ -38,7 +40,7 @@ public:
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, const char* url, const KeyedVector<String8, String8> *headers = NULL) = 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;
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index 588c51a..a5a1bb8 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -21,8 +21,10 @@
#include <sys/types.h>
#include <ui/ISurface.h>
-#include <utils/RefBase.h>
#include <utils/Errors.h>
+#include <utils/KeyedVector.h>
+#include <utils/String8.h>
+#include <utils/RefBase.h>
#include <media/mediaplayer.h>
#include <media/AudioSystem.h>
@@ -96,7 +98,11 @@ public:
virtual ~MediaPlayerBase() {}
virtual status_t initCheck() = 0;
virtual bool hardwareOutput() = 0;
- virtual status_t setDataSource(const char *url) = 0;
+
+ virtual status_t setDataSource(
+ const char *url,
+ const KeyedVector<String8, String8> *headers = NULL) = 0;
+
virtual status_t setDataSource(int fd, int64_t offset, int64_t length) = 0;
virtual status_t setVideoSurface(const sp<ISurface>& surface) = 0;
virtual status_t prepare() = 0;
diff --git a/include/media/PVPlayer.h b/include/media/PVPlayer.h
index 8a66152..df50981 100644
--- a/include/media/PVPlayer.h
+++ b/include/media/PVPlayer.h
@@ -38,7 +38,10 @@ public:
virtual ~PVPlayer();
virtual status_t initCheck();
- virtual status_t setDataSource(const char *url);
+
+ virtual status_t setDataSource(
+ const char *url, const KeyedVector<String8, String8> *headers);
+
virtual status_t setDataSource(int fd, int64_t offset, int64_t length);
virtual status_t setVideoSurface(const sp<ISurface>& surface);
virtual status_t prepare();
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h
index 87d23f6..c9198d6 100644
--- a/include/media/mediaplayer.h
+++ b/include/media/mediaplayer.h
@@ -23,6 +23,9 @@
#include <media/IMediaPlayer.h>
#include <media/IMediaDeathNotifier.h>
+#include <utils/KeyedVector.h>
+#include <utils/String8.h>
+
namespace android {
enum media_event_type {
@@ -130,7 +133,11 @@ public:
~MediaPlayer();
void died();
void disconnect();
- status_t setDataSource(const char *url);
+
+ status_t setDataSource(
+ const char *url,
+ const KeyedVector<String8, String8> *headers);
+
status_t setDataSource(int fd, int64_t offset, int64_t length);
status_t setVideoSurface(const sp<Surface>& surface);
status_t setListener(const sp<MediaPlayerListener>& listener);