summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-07-18 14:36:18 -0700
committerAndreas Huber <andih@google.com>2013-07-18 15:11:50 -0700
commit8060060217ff16cd67c8f6a15c649f44c343acf0 (patch)
treefa0d2d4f680f2303a88e3bcfba2b897fc435e76f /media/libmediaplayerservice
parent9d7376a7a4910a61ee4e9b1ad94b125d157882cc (diff)
downloadframeworks_av-8060060217ff16cd67c8f6a15c649f44c343acf0.zip
frameworks_av-8060060217ff16cd67c8f6a15c649f44c343acf0.tar.gz
frameworks_av-8060060217ff16cd67c8f6a15c649f44c343acf0.tar.bz2
ANetworkSession and ParsedMessage are now part of stagefright foundation.
Also fixes some bugs in ParseMessage and adds "WebSocket" mode to ANetworkSession, something that's opt-in and should not affect existing clients of the API. Change-Id: I86d5748e0d818231d85d3590d86c2b41d4f8b1f1
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r--media/libmediaplayerservice/RemoteDisplay.cpp13
-rw-r--r--media/libmediaplayerservice/RemoteDisplay.h5
2 files changed, 13 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/RemoteDisplay.cpp b/media/libmediaplayerservice/RemoteDisplay.cpp
index 20e6513..eb959b4 100644
--- a/media/libmediaplayerservice/RemoteDisplay.cpp
+++ b/media/libmediaplayerservice/RemoteDisplay.cpp
@@ -16,19 +16,23 @@
#include "RemoteDisplay.h"
-#include "ANetworkSession.h"
#include "source/WifiDisplaySource.h"
#include <media/IRemoteDisplayClient.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/foundation/ANetworkSession.h>
namespace android {
RemoteDisplay::RemoteDisplay(
- const sp<IRemoteDisplayClient> &client, const char *iface)
+ const sp<IRemoteDisplayClient> &client,
+ const char *iface)
: mLooper(new ALooper),
- mNetSession(new ANetworkSession),
- mSource(new WifiDisplaySource(mNetSession, client)) {
+ mNetSession(new ANetworkSession) {
mLooper->setName("wfd_looper");
+
+ mSource = new WifiDisplaySource(mNetSession, client);
mLooper->registerHandler(mSource);
mNetSession->start();
@@ -50,6 +54,7 @@ status_t RemoteDisplay::resume() {
status_t RemoteDisplay::dispose() {
mSource->stop();
+ mSource.clear();
mLooper->stop();
mNetSession->stop();
diff --git a/media/libmediaplayerservice/RemoteDisplay.h b/media/libmediaplayerservice/RemoteDisplay.h
index bd8b684..82a0116 100644
--- a/media/libmediaplayerservice/RemoteDisplay.h
+++ b/media/libmediaplayerservice/RemoteDisplay.h
@@ -18,6 +18,7 @@
#define REMOTE_DISPLAY_H_
+#include <media/IMediaPlayerService.h>
#include <media/IRemoteDisplay.h>
#include <media/stagefright/foundation/ABase.h>
#include <utils/Errors.h>
@@ -31,7 +32,9 @@ struct IRemoteDisplayClient;
struct WifiDisplaySource;
struct RemoteDisplay : public BnRemoteDisplay {
- RemoteDisplay(const sp<IRemoteDisplayClient> &client, const char *iface);
+ RemoteDisplay(
+ const sp<IRemoteDisplayClient> &client,
+ const char *iface);
virtual status_t pause();
virtual status_t resume();