Merge "Enable audio streaming to a wifi display. Remove startup delay hack." into jb-mr1-dev
diff --git a/media/libstagefright/wifi-display/source/PlaybackSession.cpp b/media/libstagefright/wifi-display/source/PlaybackSession.cpp
index a6aae56..ab16407 100644
--- a/media/libstagefright/wifi-display/source/PlaybackSession.cpp
+++ b/media/libstagefright/wifi-display/source/PlaybackSession.cpp
@@ -647,11 +647,10 @@
service->connectDisplay(mBufferQueue);
}
-#if 0
sp<AudioSource> audioSource = new AudioSource(
- AUDIO_SOURCE_MIC,
+ AUDIO_SOURCE_REMOTE_SUBMIX,
48000 /* sampleRate */,
- 2 /* channelCount */); // XXX AUDIO_CHANNEL_IN_STEREO?
+ 2 /* channelCount */);
if (audioSource->initCheck() == OK) {
audioSource->setUseLooperTime(true);
@@ -670,11 +669,12 @@
looper()->registerHandler(converter);
mTracks.add(index, new Track(converter));
+
+ ALOGI("Successfully instantiated audio source.");
} else {
ALOGW("Unable to instantiate audio source");
}
#endif
-#endif
return OK;
}
diff --git a/media/libstagefright/wifi-display/source/Serializer.cpp b/media/libstagefright/wifi-display/source/Serializer.cpp
index bd53fc8..0c54bf7 100644
--- a/media/libstagefright/wifi-display/source/Serializer.cpp
+++ b/media/libstagefright/wifi-display/source/Serializer.cpp
@@ -275,14 +275,7 @@
}
if (err == OK) {
-#if 0
schedulePoll();
-#else
- // XXX the dongle doesn't appear to have setup the RTP connection
- // fully at the time PLAY is called. We have to delay sending data
- // for a little bit.
- schedulePoll(500000ll);
-#endif
}
return err;