libmediaplayerservice: get isStreaming info from source.

Bug: 19061436
Change-Id: I0fc0d6207b0d3297d64aadab3e81448e3f3fa1de
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index a79858c..8760cbb 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -834,7 +834,7 @@
                 audio_stream_type_t streamType = mAudioSink->getAudioStreamType();
                 const bool hasVideo = (videoFormat != NULL);
                 const bool canOffload = canOffloadStream(
-                        audioMeta, hasVideo, true /* is_streaming */, streamType);
+                        audioMeta, hasVideo, mSource->isStreaming(), streamType);
                 if (canOffload) {
                     if (!mOffloadAudio) {
                         mRenderer->signalEnableOffloadAudio();
@@ -1107,7 +1107,7 @@
                     audio_stream_type_t streamType = mAudioSink->getAudioStreamType();
                     const bool hasVideo = (videoFormat != NULL);
                     const bool canOffload = canOffloadStream(
-                            audioMeta, hasVideo, true /* is_streaming */, streamType);
+                            audioMeta, hasVideo, mSource->isStreaming(), streamType);
                     if (canOffload) {
                         mRenderer->signalEnableOffloadAudio();
                         sp<AMessage> format = mSource->getFormat(true /*audio*/);
@@ -1288,8 +1288,7 @@
     sp<AMessage> videoFormat = mSource->getFormat(false /* audio */);
 
     mOffloadAudio =
-        canOffloadStream(audioMeta, (videoFormat != NULL),
-                         true /* is_streaming */, streamType);
+        canOffloadStream(audioMeta, (videoFormat != NULL), mSource->isStreaming(), streamType);
     if (mOffloadAudio) {
         flags |= Renderer::FLAG_OFFLOAD_AUDIO;
     }