From eeb97d91b97f1fc0b26815f098515e9c06d219b8 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 27 Aug 2010 13:29:08 -0700 Subject: 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 --- media/libstagefright/rtsp/AAVCAssembler.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'media/libstagefright/rtsp/AAVCAssembler.cpp') 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 &buffer) { sp 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 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 >::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" : "."); -- cgit v1.1