summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp
diff options
context:
space:
mode:
authorLi Sun <sunli@codeaurora.org>2015-08-31 22:39:13 +0800
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:24:59 -0600
commit562092cd2ad4cadc6555d582945c78465f613a12 (patch)
tree92afd2649f0d81e0aa71a7c2d4865af8cb3b2d6e /media/libstagefright/rtsp
parentbda215ba50dd406845bf4c3842d6d5f3c4380d6c (diff)
downloadframeworks_av-562092cd2ad4cadc6555d582945c78465f613a12.zip
frameworks_av-562092cd2ad4cadc6555d582945c78465f613a12.tar.gz
frameworks_av-562092cd2ad4cadc6555d582945c78465f613a12.tar.bz2
rtsp: notify the client when receiving BYE message in RTCP
RTSP stack would parse "BYE" message from RTCP packets and notify NuPlayer which will send the notification to the client. Change-Id: I461960f28610f998b71a6e1322fe79f9856c7a92
Diffstat (limited to 'media/libstagefright/rtsp')
-rw-r--r--media/libstagefright/rtsp/MyHandler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index 3b74ffe..7290ee2 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -110,6 +110,7 @@ struct MyHandler : public AHandler {
kWhatSeekDiscontinuity = 'seeD',
kWhatNormalPlayTimeMapping = 'nptM',
kWhatCancelCheck = 'canC',
+ kWhatByeReceived = 'byeR',
};
MyHandler(
@@ -1053,6 +1054,13 @@ struct MyHandler : public AHandler {
int32_t eos;
if (msg->findInt32("eos", &eos)) {
ALOGI("received BYE on track index %zu", trackIndex);
+ char value[PROPERTY_VALUE_MAX] = {0};
+ if (property_get("rtcp.bye.notify", value, "false")
+ && !strcasecmp(value, "true")) {
+ sp<AMessage> msg = mNotify->dup();
+ msg->setInt32("what", kWhatByeReceived);
+ msg->post();
+ }
if (!mAllTracksHaveTime && dataReceivedOnAllChannels()) {
ALOGI("No time established => fake existing data");