summaryrefslogtreecommitdiff
authorshipeng.sun <shipeng.sun@amlogic.com>2019-06-28 02:29:22 (GMT)
committer shipeng.sun <shipeng.sun@amlogic.com>2019-06-28 03:42:01 (GMT)
commit2a1b512d567931633ff9badc63d973219ab608bd (patch)
treee444e69f0502fedca3fc7e2fb1f1f66b42213db5
parent75f362f5947ecd1f11d8d98d991e69fb21ccad36 (diff)
downloadav-2a1b512d567931633ff9badc63d973219ab608bd.zip
av-2a1b512d567931633ff9badc63d973219ab608bd.tar.gz
av-2a1b512d567931633ff9badc63d973219ab608bd.tar.bz2
wifi-display: Add for wfd_audio_codecs to support aac [1/1]
PD#SWPL-10372 Problem: Optinize wifi-display code for reduce decoder time Add for wfd_audio_codecs to support aac Solution: 1. Add for wfd_audio_codecs to support aac to deduce audio data transport from source to sink. Verify: marconi Change-Id: I2276696f1dab04e6291cb80b2200215384040725 Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
Diffstat
-rw-r--r--libstagefright/wifi-display/sink/TunnelRenderer.cpp1
-rw-r--r--libstagefright/wifi-display/sink/WifiDisplaySink.cpp14
2 files changed, 11 insertions, 4 deletions
diff --git a/libstagefright/wifi-display/sink/TunnelRenderer.cpp b/libstagefright/wifi-display/sink/TunnelRenderer.cpp
index 15948f2..a9faf94 100644
--- a/libstagefright/wifi-display/sink/TunnelRenderer.cpp
+++ b/libstagefright/wifi-display/sink/TunnelRenderer.cpp
@@ -418,6 +418,7 @@ namespace android
//For miracast, we shuold send request IDR to request a I Frame asap
sp<AMessage> msgNotify = mMsgNotify->dup();
msgNotify->setInt32("msg", kWahtLostPacketMsg);
+ msgNotify->setInt32("isLoop", 0);
msgNotify->post();
mRequestedRetry = true;
mRequestedRetransmission = true;
diff --git a/libstagefright/wifi-display/sink/WifiDisplaySink.cpp b/libstagefright/wifi-display/sink/WifiDisplaySink.cpp
index c58cf6e..dbed7ce 100644
--- a/libstagefright/wifi-display/sink/WifiDisplaySink.cpp
+++ b/libstagefright/wifi-display/sink/WifiDisplaySink.cpp
@@ -492,9 +492,14 @@ namespace android
ALOGI("requesting IDR frame");
sendIDRFrameRequest(mSessionID);
}
- sp<AMessage> msg = new AMessage(kWhatNoPacket, this);
- msg->setInt32("msg", kWahtLostPacketMsg);
- msg->post(5000000);
+ int32_t isLoop = 0;
+ CHECK(msg->findInt32("isLoop", &isLoop));
+ if (isLoop) {
+ sp<AMessage> msg = new AMessage(kWhatNoPacket, this);
+ msg->setInt32("msg", kWahtLostPacketMsg);
+ msg->setInt32("isLoop", 1);
+ msg->post(5000000);
+ }
break;
}
default:
@@ -750,6 +755,7 @@ namespace android
mState = PLAYING;
sp<AMessage> requestIdrMsg = new AMessage(kWhatNoPacket, this);
requestIdrMsg->setInt32("msg", kWahtLostPacketMsg);
+ requestIdrMsg->setInt32("isLoop", 1);
requestIdrMsg->post();
return OK;
}
@@ -1074,7 +1080,7 @@ namespace android
mHH.c_str());
if (mNeedAudioCodecs)
- snprintf(body + strlen(body), sizeof(body) - strlen(body), "wfd_audio_codecs: LPCM 00000003 00\r\n");
+ snprintf(body + strlen(body), sizeof(body) - strlen(body), "wfd_audio_codecs: LPCM 00000003 00, AAC 00000001 00\r\n");
if (mNeed3dVideoFormats)
snprintf(body + strlen(body), sizeof(body) - strlen(body), "wfd_3d_video_formats: none\r\n");