Home
last modified time | relevance | path

Searched refs:accessUnit (Results 1 – 25 of 34) sorted by relevance

12

/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayerDecoderPassThrough.cpp129 status_t NuPlayer::DecoderPassThrough::dequeueAccessUnit(sp<ABuffer> *accessUnit) { in dequeueAccessUnit() argument
134 *accessUnit = mPendingAudioAccessUnit; in dequeueAccessUnit()
139 err = mSource->dequeueAccessUnit(true /* audio */, accessUnit); in dequeueAccessUnit()
146 mPendingAudioAccessUnit = *accessUnit; in dequeueAccessUnit()
147 (*accessUnit).clear(); in dequeueAccessUnit()
157 const sp<ABuffer> &accessUnit) { in aggregateBuffer() argument
160 if (accessUnit == NULL) { in aggregateBuffer()
168 size_t smallSize = accessUnit->size(); in aggregateBuffer()
180 bool smallTimestampValid = accessUnit->meta()->findInt64("timeUs", &timeUs); in aggregateBuffer()
191 mPendingAudioAccessUnit = accessUnit; in aggregateBuffer()
[all …]
DNuPlayerCCDecoder.cpp224 bool NuPlayer::CCDecoder::extractFromSEI(const sp<ABuffer> &accessUnit) { in extractFromSEI() argument
226 if (!accessUnit->meta()->findBuffer("sei", &sei) || sei == NULL) { in extractFromSEI()
231 CHECK(accessUnit->meta()->findInt64("timeUs", &timeUs)); in extractFromSEI()
239 timeUs, accessUnit->data() + nal->nalOffset, nal->nalSize); in extractFromSEI()
316 bool NuPlayer::CCDecoder::extractFromMPEGUserData(const sp<ABuffer> &accessUnit) { in extractFromMPEGUserData() argument
318 if (!accessUnit->meta()->findBuffer("mpeg-user-data", &mpegUserData) in extractFromMPEGUserData()
324 CHECK(accessUnit->meta()->findInt64("timeUs", &timeUs)); in extractFromMPEGUserData()
331 if (accessUnit->size() < userData[i]) { in extractFromMPEGUserData()
337 timeUs, accessUnit->data() + userData[i], accessUnit->size() - userData[i]); in extractFromMPEGUserData()
531 void NuPlayer::CCDecoder::decode(const sp<ABuffer> &accessUnit) { in decode() argument
[all …]
DNuPlayerCCDecoder.h43 void decode(const sp<ABuffer> &accessUnit);
82 bool extractFromSEI(const sp<ABuffer> &accessUnit);
86 bool extractFromMPEGUserData(const sp<ABuffer> &accessUnit);
DRTSPSource.cpp205 bool audio, sp<ABuffer> *accessUnit) { in dequeueAccessUnit() argument
253 return source->dequeueAccessUnit(accessUnit); in dequeueAccessUnit()
591 sp<ABuffer> accessUnit; in onMessageReceived() local
592 CHECK(msg->findBuffer("accessUnit", &accessUnit)); in onMessageReceived()
595 if (accessUnit->meta()->findInt32("damaged", &damaged) in onMessageReceived()
604 while (offset + 188 <= accessUnit->size()) { in onMessageReceived()
606 accessUnit->data() + offset, 188); in onMessageReceived()
614 if (offset < accessUnit->size()) { in onMessageReceived()
631 CHECK(accessUnit->meta()->findInt32("rtp-time", (int32_t *)&rtpTime)); in onMessageReceived()
636 source->queueAccessUnit(accessUnit); in onMessageReceived()
[all …]
DNuPlayerDecoderPassThrough.h72 status_t dequeueAccessUnit(sp<ABuffer> *accessUnit);
73 sp<ABuffer> aggregateBuffer(const sp<ABuffer> &accessUnit);
DStreamingSource.cpp258 bool audio, sp<ABuffer> *accessUnit) { in dequeueAccessUnit() argument
274 status_t err = source->dequeueAccessUnit(accessUnit); in dequeueAccessUnit()
279 CHECK((*accessUnit)->meta()->findInt64("timeUs", &timeUs)); in dequeueAccessUnit()
DNuPlayerDecoder.cpp866 sp<ABuffer> accessUnit; in fetchInputData() local
869 status_t err = mSource->dequeueAccessUnit(mIsAudio, &accessUnit); in fetchInputData()
876 CHECK(accessUnit->meta()->findInt32("discontinuity", &type)); in fetchInputData()
941 bool haveLayerId = accessUnit->meta()->findInt32("temporal-layer-id", &layerId); in fetchInputData()
944 && !IsAVCReferenceFrame(accessUnit)) { in fetchInputData()
957 && IsIDR(accessUnit->data(), accessUnit->size())) { in fetchInputData()
973 CHECK(accessUnit->meta()->findInt64("timeUs", &mediaTimeUs)); in fetchInputData()
980 mCCDecoder->decode(accessUnit); in fetchInputData()
983 reply->setBuffer("buffer", accessUnit); in fetchInputData()
DStreamingSource.h44 virtual status_t dequeueAccessUnit(bool audio, sp<ABuffer> *accessUnit);
/frameworks/av/media/libstagefright/rtsp/
DARTPSession.cpp148 sp<ABuffer> accessUnit; in onMessageReceived() local
149 CHECK(msg->findBuffer("access-unit", &accessUnit)); in onMessageReceived()
152 CHECK(accessUnit->meta()->findInt64( in onMessageReceived()
158 accessUnit->size(), ntpTime); in onMessageReceived()
161 accessUnit->size(), ntpTime); in onMessageReceived()
162 hexdump(accessUnit->data(), accessUnit->size()); in onMessageReceived()
167 CHECK_GE(accessUnit->size(), 5u); in onMessageReceived()
168 CHECK(!memcmp("\x00\x00\x00\x01", accessUnit->data(), 4)); in onMessageReceived()
169 unsigned x = accessUnit->data()[4]; in onMessageReceived()
175 accessUnit->meta()->setInt64("ntp-time", ntpTime); in onMessageReceived()
[all …]
DARTPAssembler.cpp84 sp<ABuffer> accessUnit = new ABuffer(totalSize); in MakeADTSCompoundFromAACFrames() local
89 uint8_t *dst = accessUnit->data() + offset; in MakeADTSCompoundFromAACFrames()
116 CopyTimes(accessUnit, *frames.begin()); in MakeADTSCompoundFromAACFrames()
118 return accessUnit; in MakeADTSCompoundFromAACFrames()
130 sp<ABuffer> accessUnit = new ABuffer(totalSize); in MakeCompoundFromPackets() local
135 memcpy(accessUnit->data() + offset, nal->data(), nal->size()); in MakeCompoundFromPackets()
139 CopyTimes(accessUnit, *packets.begin()); in MakeCompoundFromPackets()
141 return accessUnit; in MakeCompoundFromPackets()
DAMPEG4ElementaryAssembler.cpp365 sp<ABuffer> accessUnit = new ABuffer(header.mSize); in addPacket() local
366 memcpy(accessUnit->data(), buffer->data() + offset, header.mSize); in addPacket()
370 CopyTimes(accessUnit, buffer); in addPacket()
371 mPackets.push_back(accessUnit); in addPacket()
391 sp<ABuffer> accessUnit; in submitAccessUnit() local
394 accessUnit = MakeADTSCompoundFromAACFrames( in submitAccessUnit()
400 accessUnit = MakeCompoundFromPackets(mPackets); in submitAccessUnit()
409 accessUnit->meta()->setInt32("damaged", true); in submitAccessUnit()
416 msg->setBuffer("access-unit", accessUnit); in submitAccessUnit()
DAH263Assembler.cpp168 sp<ABuffer> accessUnit = new ABuffer(totalSize); in submitAccessUnit() local
174 memcpy((uint8_t *)accessUnit->data() + offset, in submitAccessUnit()
182 CopyTimes(accessUnit, *mPackets.begin()); in submitAccessUnit()
190 accessUnit->meta()->setInt32("damaged", true); in submitAccessUnit()
197 msg->setBuffer("access-unit", accessUnit); in submitAccessUnit()
DAAMRAssembler.cpp186 sp<ABuffer> accessUnit = new ABuffer(totalSize); in addPacket() local
187 CopyTimes(accessUnit, buffer); in addPacket()
204 accessUnit->data()[dstOffset++] = toc; in addPacket()
205 memcpy(accessUnit->data() + dstOffset, in addPacket()
213 msg->setBuffer("access-unit", accessUnit); in addPacket()
DAAVCAssembler.cpp328 sp<ABuffer> accessUnit = new ABuffer(totalSize); in submitAccessUnit() local
332 memcpy(accessUnit->data() + offset, "\x00\x00\x00\x01", 4); in submitAccessUnit()
336 memcpy(accessUnit->data() + offset, nal->data(), nal->size()); in submitAccessUnit()
340 CopyTimes(accessUnit, *mNALUnits.begin()); in submitAccessUnit()
348 accessUnit->meta()->setInt32("damaged", true); in submitAccessUnit()
355 msg->setBuffer("access-unit", accessUnit); in submitAccessUnit()
DAMPEG4AudioAssembler.cpp553 sp<ABuffer> accessUnit = MakeCompoundFromPackets(mPackets); in submitAccessUnit() local
554 accessUnit = removeLATMFraming(accessUnit); in submitAccessUnit()
555 CopyTimes(accessUnit, *mPackets.begin()); in submitAccessUnit()
563 accessUnit->meta()->setInt32("damaged", true); in submitAccessUnit()
570 msg->setBuffer("access-unit", accessUnit); in submitAccessUnit()
DMyHandler.h1065 sp<ABuffer> accessUnit; in onMessageReceived() local
1066 CHECK(msg->findBuffer("access-unit", &accessUnit)); in onMessageReceived()
1067 onAccessUnitComplete(trackIndex, accessUnit); in onMessageReceived()
1823 sp<ABuffer> accessUnit = *track->mPackets.begin(); in processAccessUnitQueue() local
1826 uint32_t seqNum = (uint32_t)accessUnit->int32Data(); in processAccessUnitQueue()
1868 if (addMediaTimestamp(trackIndex, track, accessUnit)) { in processAccessUnitQueue()
1869 postQueueAccessUnit(trackIndex, accessUnit); in processAccessUnitQueue()
1876 int32_t trackIndex, const sp<ABuffer> &accessUnit) { in onAccessUnitComplete()
1878 track->mPackets.push_back(accessUnit); in onAccessUnitComplete()
1880 uint32_t seqNum = (uint32_t)accessUnit->int32Data(); in onAccessUnitComplete()
[all …]
/frameworks/av/media/libstagefright/mpeg2ts/
DESQueue.cpp893 sp<ABuffer> accessUnit = new ABuffer(info.mLength); in dequeueAccessUnit() local
894 memcpy(accessUnit->data(), mBuffer->data(), info.mLength); in dequeueAccessUnit()
895 accessUnit->meta()->setInt64("timeUs", info.mTimestampUs); in dequeueAccessUnit()
905 if (!MakeAVCCodecSpecificData(*mFormat, accessUnit->data(), accessUnit->size())) { in dequeueAccessUnit()
910 return accessUnit; in dequeueAccessUnit()
996 sp<ABuffer> accessUnit = new ABuffer(syncStartPos + payloadSize); in dequeueAccessUnitEAC3() local
997 memcpy(accessUnit->data(), mBuffer->data(), syncStartPos + payloadSize); in dequeueAccessUnitEAC3()
999 accessUnit->meta()->setInt64("timeUs", timeUs); in dequeueAccessUnitEAC3()
1000 accessUnit->meta()->setInt32("isSync", 1); in dequeueAccessUnitEAC3()
1009 return accessUnit; in dequeueAccessUnitEAC3()
[all …]
/frameworks/av/media/libstagefright/foundation/tests/AVCUtils/
DAVCUtilsUnitTest.cpp285 sp<ABuffer> accessUnit = new ABuffer(accessUnitLength); in TEST_P() local
286 ASSERT_NE(accessUnit, nullptr) in TEST_P()
289 memcpy(accessUnit->data(), accessUnitData, accessUnitLength); in TEST_P()
290 sp<ABuffer> csdDataBuffer = MakeAVCCodecSpecificData(accessUnit, &avcWidth, &avcHeight); in TEST_P()
310 accessUnit.clear(); in TEST_P()
338 sp<ABuffer> accessUnit = new ABuffer(chunkLength); in TEST_P() local
339 ASSERT_NE(accessUnit, nullptr) << "Unable to create access Unit"; in TEST_P()
341 memcpy(accessUnit->data(), data, chunkLength); in TEST_P()
342 bool isReferenceFrame = IsAVCReferenceFrame(accessUnit); in TEST_P()
345 accessUnit.clear(); in TEST_P()
/frameworks/av/media/libstagefright/
DMPEG2TSWriter.cpp56 void setLastAccessUnit(const sp<ABuffer> &accessUnit);
421 const sp<ABuffer> &accessUnit) { in setLastAccessUnit() argument
422 mLastAccessUnit = accessUnit; in setLastAccessUnit()
793 int32_t sourceIndex, const sp<ABuffer> &accessUnit) { in writeAccessUnit() argument
843 CHECK(accessUnit->meta()->findInt64("timeUs", &timeUs)); in writeAccessUnit()
847 size_t PES_packet_length = accessUnit->size() + 8; in writeAccessUnit()
848 bool padding = (accessUnit->size() < (188 - 18)); in writeAccessUnit()
864 int paddingSize = 188 - accessUnit->size() - 18; in writeAccessUnit()
887 size_t copy = accessUnit->size(); in writeAccessUnit()
892 memcpy(ptr, accessUnit->data(), copy); in writeAccessUnit()
[all …]
DMetaDataUtils.cpp41 sp<ABuffer> accessUnit = new ABuffer((void*)data, size); in MakeAVCCodecSpecificData() local
42 sp<ABuffer> csd = MakeAVCCodecSpecificData(accessUnit, &width, &height, &sarWidth, &sarHeight); in MakeAVCCodecSpecificData()
67 sp<ABuffer> accessUnit = new ABuffer((void*)data, size); in MakeAVCCodecSpecificData() local
68 sp<ABuffer> csd = MakeAVCCodecSpecificData(accessUnit, &width, &height, &sarWidth, &sarHeight); in MakeAVCCodecSpecificData()
/frameworks/av/media/libstagefright/foundation/
Davc_utils.cpp387 const sp<ABuffer> &accessUnit, int32_t *width, int32_t *height, in MakeAVCCodecSpecificData() argument
389 const uint8_t *data = accessUnit->data(); in MakeAVCCodecSpecificData()
390 size_t size = accessUnit->size(); in MakeAVCCodecSpecificData()
489 bool IsAVCReferenceFrame(const sp<ABuffer> &accessUnit) { in IsAVCReferenceFrame() argument
490 const uint8_t *data = accessUnit->data(); in IsAVCReferenceFrame()
491 size_t size = accessUnit->size(); in IsAVCReferenceFrame()
493 ALOGE("IsAVCReferenceFrame: called on NULL data (%p, %zu)", accessUnit.get(), size); in IsAVCReferenceFrame()
501 ALOGE("IsAVCReferenceFrame: invalid nalSize: 0 (%p, %zu)", accessUnit.get(), size); in IsAVCReferenceFrame()
/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/
Davc_utils.h84 const sp<ABuffer> &accessUnit, int32_t *width, int32_t *height,
88 bool IsAVCReferenceFrame(const sp<ABuffer> &accessUnit);
/frameworks/av/media/libstagefright/httplive/
DPlaylistFetcher.cpp1671 const sp<ABuffer> &accessUnit, const sp<AnotherPacketSource> &source, bool discard) { in setAccessUnitProperties() argument
1675 accessUnit->meta()->setObject("format", format); in setAccessUnitProperties()
1679 accessUnit->meta()->setInt32("discard", discard); in setAccessUnitProperties()
1682 accessUnit->meta()->setInt32("discontinuitySeq", mDiscontinuitySeq); in setAccessUnitProperties()
1683 accessUnit->meta()->setInt64("segmentStartTimeUs", getSegmentStartTimeUs(mSeqNumber)); in setAccessUnitProperties()
1684 accessUnit->meta()->setInt64("segmentFirstTimeUs", mSegmentFirstPTS); in setAccessUnitProperties()
1685 accessUnit->meta()->setInt64("segmentDurationUs", getSegmentDurationUs(mSeqNumber)); in setAccessUnitProperties()
1687 accessUnit->meta()->setInt64("playlistTimeUs", mPlaylistTimeUs); in setAccessUnitProperties()
1689 return accessUnit; in setAccessUnitProperties()
1839 sp<ABuffer> accessUnit; in extractAndQueueAccessUnitsFromTs() local
[all …]
DLiveSession.cpp340 StreamType stream, sp<ABuffer> *accessUnit) { in dequeueAccessUnit() argument
369 status_t err = packetSource->dequeueAccessUnit(accessUnit); in dequeueAccessUnit()
374 CHECK((*accessUnit)->meta()->findInt32("discontinuity", &type)); in dequeueAccessUnit()
377 if (!(*accessUnit)->meta()->findMessage("extra", &extra)) { in dequeueAccessUnit()
391 CHECK((*accessUnit)->meta()->findInt64("timeUs", &timeUs)); in dequeueAccessUnit()
393 (*accessUnit)->meta()->findInt32("discontinuitySeq", &discontinuitySeq); in dequeueAccessUnit()
427 } else if ((*accessUnit)->meta()->findInt32("discard", &discard) && discard) { in dequeueAccessUnit()
439 (*accessUnit)->meta()->setInt64("timeUs", timeUs); in dequeueAccessUnit()
444 if ((*accessUnit)->meta()->findInt32("subtitleGeneration", &subtitleGeneration) in dequeueAccessUnit()
448 (*accessUnit)->meta()->setInt32( in dequeueAccessUnit()
[all …]
/frameworks/av/media/extractors/mpeg2/
DMPEG2PSExtractor.cpp770 sp<ABuffer> accessUnit; in appendPESData() local
771 while ((accessUnit = mQueue->dequeueAccessUnit()) != NULL) { in appendPESData()
779 mSource->queueAccessUnit(accessUnit); in appendPESData()
782 mSource->queueAccessUnit(accessUnit); in appendPESData()

12