summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/AAVCAssembler.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-27 13:29:08 -0700
committerAndreas Huber <andih@google.com>2010-08-27 13:29:08 -0700
commit8d342970108926c4ea355c90d26a2a353ec0fd47 (patch)
tree6ff39167defd677f8a31b3d8887481ad65a88b87 /media/libstagefright/rtsp/AAVCAssembler.cpp
parentcc6adf524c1bb3bfaa5be464b50b8bcca899761c (diff)
downloadframeworks_av-8d342970108926c4ea355c90d26a2a353ec0fd47.zip
frameworks_av-8d342970108926c4ea355c90d26a2a353ec0fd47.tar.gz
frameworks_av-8d342970108926c4ea355c90d26a2a353ec0fd47.tar.bz2
Better support for rtsp (normal play-)time display. Better seek support, timeout if no packets arrive for too long.
Change-Id: Id491541a6ae501604cda815f8e961a3bfe26db7d related-to-bug: 2556656
Diffstat (limited to 'media/libstagefright/rtsp/AAVCAssembler.cpp')
-rw-r--r--media/libstagefright/rtsp/AAVCAssembler.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/media/libstagefright/rtsp/AAVCAssembler.cpp b/media/libstagefright/rtsp/AAVCAssembler.cpp
index b22de2c..6b1e292 100644
--- a/media/libstagefright/rtsp/AAVCAssembler.cpp
+++ b/media/libstagefright/rtsp/AAVCAssembler.cpp
@@ -155,7 +155,7 @@ bool AAVCAssembler::addSingleTimeAggregationPacket(const sp<ABuffer> &buffer) {
sp<ABuffer> unit = new ABuffer(nalSize);
memcpy(unit->data(), &data[2], nalSize);
- PropagateTimes(buffer, unit);
+ CopyTimes(unit, buffer);
addSingleNALUnit(unit);
@@ -287,7 +287,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit(
++totalSize;
sp<ABuffer> unit = new ABuffer(totalSize);
- PropagateTimes(buffer, unit);
+ CopyTimes(unit, *queue->begin());
unit->data()[0] = (nri << 5) | nalType;
@@ -325,10 +325,6 @@ void AAVCAssembler::submitAccessUnit() {
LOG(VERBOSE) << "Access unit complete (" << mNALUnits.size() << " nal units)";
#endif
- uint64_t ntpTime;
- CHECK((*mNALUnits.begin())->meta()->findInt64(
- "ntp-time", (int64_t *)&ntpTime));
-
size_t totalSize = 0;
for (List<sp<ABuffer> >::iterator it = mNALUnits.begin();
it != mNALUnits.end(); ++it) {
@@ -347,7 +343,7 @@ void AAVCAssembler::submitAccessUnit() {
offset += nal->size();
}
- accessUnit->meta()->setInt64("ntp-time", ntpTime);
+ CopyTimes(accessUnit, *mNALUnits.begin());
#if 0
printf(mAccessUnitDamaged ? "X" : ".");