diff options
author | Li Sun <sunli@codeaurora.org> | 2015-07-13 13:37:07 +0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:40 -0600 |
commit | 45dccc785efbcc470bd4a48a1e16879ff798c5c7 (patch) | |
tree | 9dde855d54dc7f2cae0b89c32104157d606267b5 /media/libstagefright/rtsp | |
parent | cded9aa430953af01098ac2312794ebf5e4f7927 (diff) | |
download | frameworks_av-45dccc785efbcc470bd4a48a1e16879ff798c5c7.zip frameworks_av-45dccc785efbcc470bd4a48a1e16879ff798c5c7.tar.gz frameworks_av-45dccc785efbcc470bd4a48a1e16879ff798c5c7.tar.bz2 |
RTSP: add RTSP extensions for customization support
Add extensions for customization support in rtsp stack.
Provide default implementations in AVMediaServiceUtils.
Change-Id: I67adeb54b35d1f01911625bb9bad27e94ad0caf0
Diffstat (limited to 'media/libstagefright/rtsp')
-rw-r--r-- | media/libstagefright/rtsp/AH263Assembler.cpp | 5 | ||||
-rw-r--r-- | media/libstagefright/rtsp/ASessionDescription.cpp | 5 | ||||
-rw-r--r-- | media/libstagefright/rtsp/MyHandler.h | 6 |
3 files changed, 12 insertions, 4 deletions
diff --git a/media/libstagefright/rtsp/AH263Assembler.cpp b/media/libstagefright/rtsp/AH263Assembler.cpp index 75cd911..28594e2 100644 --- a/media/libstagefright/rtsp/AH263Assembler.cpp +++ b/media/libstagefright/rtsp/AH263Assembler.cpp @@ -27,6 +27,8 @@ #include <media/stagefright/foundation/hexdump.h> #include <media/stagefright/Utils.h> +#include <mediaplayerservice/AVMediaServiceExtensions.h> + namespace android { AH263Assembler::AH263Assembler(const sp<AMessage> ¬ify) @@ -63,7 +65,8 @@ ARTPAssembler::AssemblyStatus AH263Assembler::addPacket( if ((uint32_t)(*it)->int32Data() >= mNextExpectedSeqNo) { break; } - + AVMediaServiceUtils::get()->addH263AdvancedPacket( + *it, &mPackets, mAccessUnitRTPTime); it = queue->erase(it); } diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp index 98498e9..92ad1ec 100644 --- a/media/libstagefright/rtsp/ASessionDescription.cpp +++ b/media/libstagefright/rtsp/ASessionDescription.cpp @@ -22,7 +22,7 @@ #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AString.h> - +#include <mediaplayerservice/AVMediaServiceExtensions.h> #include <stdlib.h> namespace android { @@ -264,7 +264,8 @@ bool ASessionDescription::getDurationUs(int64_t *durationUs) const { } float from, to; - if (!parseNTPRange(value.c_str() + 4, &from, &to)) { + if (!AVMediaServiceUtils::get()->parseNTPRange( + value.c_str() + 4, &from, &to)) { return false; } diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index 2981685..8cf5f7c 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -705,6 +705,7 @@ struct MyHandler : public AHandler { timeoutSecs); } } + AVMediaServiceUtils::get()->setServerTimeoutUs(mKeepAliveTimeoutUs); i = mSessionID.find(";"); if (i >= 0) { @@ -779,6 +780,7 @@ struct MyHandler : public AHandler { request.append(mSessionID); request.append("\r\n"); + AVMediaServiceUtils::get()->appendRange(&request); request.append("\r\n"); sp<AMessage> reply = new AMessage('play', this); @@ -1476,7 +1478,9 @@ struct MyHandler : public AHandler { size_t trackIndex = 0; while (trackIndex < mTracks.size() - && !(val == mTracks.editItemAt(trackIndex).mURL)) { + && !(AVMediaServiceUtils::get()->parseTrackURL( + mTracks.editItemAt(trackIndex).mURL, val) + || val == mTracks.editItemAt(trackIndex).mURL)) { ++trackIndex; } CHECK_LT(trackIndex, mTracks.size()); |