/frameworks/av/media/libmediatranscoding/transcoder/tests/ |
D | MediaSampleReaderNDKTests.cpp | 93 for (int trackIndex = 0; trackIndex < mTrackCount; trackIndex++) { in SampleAccessTester() local 94 EXPECT_EQ(mSampleReader->selectTrack(trackIndex), AMEDIA_OK); in SampleAccessTester() 101 void getSampleInfo(int trackIndex) { in getSampleInfo() argument 103 media_status_t status = mSampleReader->getSampleInfoForTrack(trackIndex, &info); in getSampleInfo() 107 void readSamplesAsync(int trackIndex, int sampleCount) { in readSamplesAsync() argument 108 mTrackThreads[trackIndex] = std::thread{[this, trackIndex, sampleCount] { in readSamplesAsync() 112 media_status_t status = mSampleReader->getSampleInfoForTrack(trackIndex, &info); in readSamplesAsync() 121 status = mSampleReader->readSampleDataForTrack(trackIndex, buffer.get(), info.size); in readSamplesAsync() 126 mSamples[trackIndex].emplace_back(info.flags, info.presentationTimeUs, info.size, in readSamplesAsync() 135 for (int trackIndex = 0; trackIndex < mTrackCount; trackIndex++) { in readSamplesAsync() local [all …]
|
D | MediaSampleWriterTests.cpp | 48 media_status_t writeSampleData(size_t trackIndex, const uint8_t* data, in writeSampleData() argument 50 mEventQueue.push_back(WriteSample(trackIndex, data, info)); in writeSampleData() 62 size_t trackIndex = 0; member 76 static Event WriteSample(size_t trackIndex, const uint8_t* data, in WriteSample() argument 78 return {.type = Event::WriteSample, .trackIndex = trackIndex, .data = data, .info = *info}; in WriteSample() 81 static Event WriteSampleWithPts(size_t trackIndex, int64_t pts) { in WriteSampleWithPts() argument 82 return {.type = Event::WriteSample, .trackIndex = trackIndex, .info = {0, 0, pts, 0}}; in WriteSampleWithPts() 122 lhs.trackIndex == rhs.trackIndex && lhs.data == rhs.data && lhs.info == rhs.info; in operator ==() 147 for (size_t trackIndex = 0; trackIndex < mTrackCount; trackIndex++) { in init() local 148 AMediaFormat* trackFormat = AMediaExtractor_getTrackFormat(mExtractor, trackIndex); in init() [all …]
|
D | VideoTrackTranscoderTests.cpp | 58 for (size_t trackIndex = 0; trackIndex < mMediaSampleReader->getTrackCount(); in SetUp() local 59 ++trackIndex) { in SetUp() 60 AMediaFormat* trackFormat = mMediaSampleReader->getTrackFormat(trackIndex); in SetUp() 68 mTrackIndex = trackIndex; in SetUp()
|
D | PassthroughTrackTranscoderTests.cpp | 60 for (size_t trackIndex = 0; trackIndex < trackCount; trackIndex++) { in initSourceAndExtractor() local 61 AMediaFormat* trackFormat = AMediaExtractor_getTrackFormat(mExtractor, trackIndex); in initSourceAndExtractor() 69 mTrackIndex = trackIndex; in initSourceAndExtractor() 70 AMediaExtractor_selectTrack(mExtractor, trackIndex); in initSourceAndExtractor()
|
D | MediaTrackTranscoderTests.cpp | 78 for (size_t trackIndex = 0; trackIndex < mMediaSampleReader->getTrackCount(); in initSampleReader() local 79 ++trackIndex) { in initSampleReader() 80 AMediaFormat* trackFormat = mMediaSampleReader->getTrackFormat(trackIndex); in initSampleReader() 88 mTrackIndex = trackIndex; in initSampleReader() 99 mTrackIndex = trackIndex; in initSampleReader()
|
/frameworks/av/media/libmediatranscoding/transcoder/ |
D | MediaSampleReaderNDK.cpp | 65 void MediaSampleReaderNDK::advanceTrack_l(int trackIndex) { in advanceTrack_l() argument 70 (void)moveToTrack_l(trackIndex); in advanceTrack_l() 73 SampleCursor& cursor = mTrackCursors[trackIndex]; in advanceTrack_l() 78 if (mEnforceSequentialAccess && trackIndex == mExtractorTrackIndex) { in advanceTrack_l() 82 if (mExtractorTrackIndex != trackIndex) { in advanceTrack_l() 159 media_status_t MediaSampleReaderNDK::moveToSample_l(SamplePosition& pos, int trackIndex) { in moveToSample_l() argument 162 media_status_t status = seekExtractorBackwards_l(pos.timeStampUs, trackIndex, pos.index); in moveToSample_l() 176 media_status_t MediaSampleReaderNDK::moveToTrack_l(int trackIndex) { in moveToTrack_l() argument 177 return moveToSample_l(mTrackCursors[trackIndex].current, trackIndex); in moveToTrack_l() 180 media_status_t MediaSampleReaderNDK::waitForTrack_l(int trackIndex, in waitForTrack_l() argument [all …]
|
D | MediaTranscoder.cpp | 271 for (size_t trackIndex = 0; trackIndex < trackCount; ++trackIndex) { in configureSource() local 272 AMediaFormat* trackFormat = mSampleReader->getTrackFormat(static_cast<int>(trackIndex)); in configureSource() 274 LOG(ERROR) << "Track #" << trackIndex << " has no format"; in configureSource() 295 media_status_t MediaTranscoder::configureTrackFormat(size_t trackIndex, in configureTrackFormat() argument 300 } else if (trackIndex >= mSourceTrackFormats.size()) { in configureTrackFormat() 301 LOG(ERROR) << "Track index " << trackIndex in configureTrackFormat() 312 AMediaFormat* srcTrackFormat = mSourceTrackFormats[trackIndex].get(); in configureTrackFormat() 316 LOG(ERROR) << "Source track #" << trackIndex << " has no mime type"; in configureTrackFormat() 323 << trackIndex << " with mime " << srcMime; in configureTrackFormat() 330 LOG(ERROR) << "Unable to convert media types for track #" << trackIndex << ", from " in configureTrackFormat() [all …]
|
D | MediaSampleWriter.cpp | 48 media_status_t writeSampleData(size_t trackIndex, const uint8_t* data, in writeSampleData() argument 50 return AMediaMuxer_writeSampleData(mMuxer, trackIndex, data, info); in writeSampleData() 143 const size_t trackIndex = static_cast<size_t>(trackIndexOrError); in addTrack() local 150 mTracks.emplace(trackIndex, durationUs); in addTrack() 153 return [self = shared_from_this(), trackIndex](const std::shared_ptr<MediaSample>& sample) { in addTrack() 154 self->addSampleToTrack(trackIndex, sample); in addTrack() 158 void MediaSampleWriter::addSampleToTrack(size_t trackIndex, in addSampleToTrack() argument 166 mSampleQueue.push(std::make_pair(trackIndex, sample)); in addSampleToTrack() 262 size_t trackIndex; in runWriterLoop() local 290 trackIndex = topEntry.first; in runWriterLoop() [all …]
|
D | MediaTrackTranscoder.cpp | 28 const std::shared_ptr<MediaSampleReader>& mediaSampleReader, int trackIndex, in configure() argument 41 if (trackIndex < 0 || trackIndex >= mediaSampleReader->getTrackCount()) { in configure() 42 LOG(ERROR) << "TrackIndex is invalid " << trackIndex; in configure() 47 mTrackIndex = trackIndex; in configure()
|
/frameworks/av/media/libmediatranscoding/transcoder/include/media/ |
D | MediaSampleReaderNDK.h | 49 AMediaFormat* getTrackFormat(int trackIndex) override; 50 media_status_t selectTrack(int trackIndex) override; 51 media_status_t unselectTrack(int trackIndex) override; 53 media_status_t getEstimatedBitrateForTrack(int trackIndex, int32_t* bitrate) override; 54 media_status_t getSampleInfoForTrack(int trackIndex, MediaSampleInfo* info) override; 55 media_status_t readSampleDataForTrack(int trackIndex, uint8_t* buffer, 57 void advanceTrack(int trackIndex) override; 100 void advanceTrack_l(int trackIndex); 110 media_status_t moveToSample_l(SamplePosition& pos, int trackIndex); 113 media_status_t moveToTrack_l(int trackIndex); [all …]
|
D | MediaSampleReader.h | 60 virtual AMediaFormat* getTrackFormat(int trackIndex) = 0; 69 virtual media_status_t selectTrack(int trackIndex) = 0; 76 virtual media_status_t unselectTrack(int trackIndex) = 0; 95 virtual media_status_t getEstimatedBitrateForTrack(int trackIndex, int32_t* bitrate); 107 virtual media_status_t getSampleInfoForTrack(int trackIndex, MediaSampleInfo* info) = 0; 122 virtual media_status_t readSampleDataForTrack(int trackIndex, uint8_t* buffer, 131 virtual void advanceTrack(int trackIndex) = 0;
|
/frameworks/av/media/libstagefright/writer_fuzzers/ |
D | WriterFuzzerBase.cpp | 48 ConfigFormat WriterFuzzerBase::BufferSource::getConfigFormat(int32_t trackIndex) { in getConfigFormat() argument 49 return mParams[trackIndex]; in getConfigFormat() 52 int32_t WriterFuzzerBase::BufferSource::getNumCsds(int32_t trackIndex) { in getNumCsds() argument 53 return mNumCsds[trackIndex]; in getNumCsds() 56 vector<FrameData> &WriterFuzzerBase::BufferSource::getFrameList(int32_t trackIndex) { in getFrameList() argument 57 return mFrameList[trackIndex]; in getFrameList() 77 uint8_t trackIndex = framePtr[0] % kMaxTrackCount; in getFrameInfo() local 84 ++mNumCsds[trackIndex]; in getFrameInfo() 95 mFrameList[trackIndex].insert(mFrameList[trackIndex].begin(), in getFrameInfo() 110 bool WriterFuzzerBase::BufferSource::getTrackInfo(int32_t trackIndex) { in getTrackInfo() argument [all …]
|
/frameworks/av/media/libmediatranscoding/transcoder/benchmark/ |
D | MediaSampleReaderBenchmark.cpp | 69 for (int trackIndex = 0; trackIndex < sampleReader->getTrackCount(); ++trackIndex) { in ReadMediaSamples() local 72 AMediaFormat* trackFormat = sampleReader->getTrackFormat(trackIndex); in ReadMediaSamples() 85 trackIndices.push_back(trackIndex); in ReadMediaSamples() 86 sampleReader->selectTrack(trackIndex); in ReadMediaSamples() 91 for (auto trackIndex : trackIndices) { in ReadMediaSamples() local 92 trackThreads.emplace_back([trackIndex, sampleReader, &state] { in ReadMediaSamples() 93 LOG(INFO) << "Track " << trackIndex << " started"; in ReadMediaSamples() 100 media_status_t status = sampleReader->getSampleInfoForTrack(trackIndex, &info); in ReadMediaSamples() 110 status = sampleReader->readSampleDataForTrack(trackIndex, buffer.get(), in ReadMediaSamples() 118 LOG(INFO) << "Track " << trackIndex << " finished"; in ReadMediaSamples()
|
D | MediaTrackTranscoderBenchmark.cpp | 114 AMediaFormat* getTrackFormat(int trackIndex) override { in getTrackFormat() argument 115 return AMediaExtractor_getTrackFormat(mExtractor, trackIndex); in getTrackFormat() 118 media_status_t selectTrack(int trackIndex) override { in selectTrack() argument 120 mSelectedTrack = trackIndex; in selectTrack() 122 media_status_t status = AMediaExtractor_selectTrack(mExtractor, trackIndex); in selectTrack() 126 AMediaFormat* format = getTrackFormat(trackIndex); in selectTrack() 170 media_status_t unselectTrack(int trackIndex __unused) override { in unselectTrack() 176 media_status_t getEstimatedBitrateForTrack(int trackIndex __unused, in getEstimatedBitrateForTrack() 181 media_status_t getSampleInfoForTrack(int trackIndex, MediaSampleInfo* info) override { in getSampleInfoForTrack() argument 182 if (trackIndex != mSelectedTrack) return AMEDIA_ERROR_INVALID_PARAMETER; in getSampleInfoForTrack() [all …]
|
/frameworks/av/media/extractors/fuzzers/ |
D | ExtractorFuzzerBase.cpp | 60 for (size_t trackIndex = 0; trackIndex < trackCount; ++trackIndex) { in extractTracks() local 61 MediaTrackHelper* track = mExtractor->getTrack(trackIndex); in extractTracks() 100 for (size_t trackIndex = 0; trackIndex < trackCount; ++trackIndex) { in getTracksMetadata() local 101 mExtractor->getTrackMetaData(format, trackIndex, flags); in getTracksMetadata() 123 for (size_t trackIndex = 0; trackIndex < trackCount; ++trackIndex) { in seekAndExtractTracks() local 124 MediaTrackHelper* track = mExtractor->getTrack(trackIndex); in seekAndExtractTracks() 132 mExtractor->getTrackMetaData(trackMetaData, trackIndex, flags); in seekAndExtractTracks()
|
/frameworks/base/media/java/android/media/ |
D | MediaMuxer.java | 303 long nativeObject, int trackIndex, @NonNull ByteBuffer byteBuf, in nativeWriteSampleData() argument 645 int trackIndex = -1; in addTrack() local 661 trackIndex = nativeAddTrack(mNativeObject, keys, values); in addTrack() 668 if (mLastTrackIndex >= trackIndex) { in addTrack() 671 mLastTrackIndex = trackIndex; in addTrack() 672 return trackIndex; in addTrack() 696 public void writeSampleData(int trackIndex, @NonNull ByteBuffer byteBuf, in writeSampleData() argument 698 if (trackIndex < 0 || trackIndex > mLastTrackIndex) { in writeSampleData() 723 nativeWriteSampleData(mNativeObject, trackIndex, byteBuf, in writeSampleData()
|
D | SubtitleData.java | 91 public SubtitleData(int trackIndex, long startTimeUs, long durationUs, @NonNull byte[] data) { in SubtitleData() argument 95 mTrackIndex = trackIndex; in SubtitleData()
|
/frameworks/av/media/libstagefright/rtsp/ |
D | MyHandler.h | 677 size_t trackIndex; in onMessageReceived() local 678 if (msg->findSize("track-index", &trackIndex)) { in onMessageReceived() 679 track = &mTracks.editItemAt(trackIndex); in onMessageReceived() 738 notify->setSize("track-index", trackIndex); in onMessageReceived() 782 mTracks.removeItemsAt(trackIndex); in onMessageReceived() 1017 size_t trackIndex; in onMessageReceived() local 1018 CHECK(msg->findSize("track-index", &trackIndex)); in onMessageReceived() 1025 onTimeUpdate(trackIndex, rtpTime, ntpTime); in onMessageReceived() 1048 size_t trackIndex; in onMessageReceived() local 1049 CHECK(msg->findSize("track-index", &trackIndex)); in onMessageReceived() [all …]
|
/frameworks/av/media/libstagefright/writer_fuzzers/include/ |
D | WriterFuzzerBase.h | 144 void addWriterSource(int32_t trackIndex); 148 void sendBuffersToWriter(sp<MediaAdapter>& currentTrack, int32_t trackIndex, 168 bool getTrackInfo(int32_t trackIndex); 170 ConfigFormat getConfigFormat(int32_t trackIndex); 171 int32_t getNumCsds(int32_t trackIndex); 172 vector<FrameData>& getFrameList(int32_t trackIndex);
|
/frameworks/av/media/tests/benchmark/MediaBenchmarkTest/src/main/java/com/android/media/benchmark/library/ |
D | Muxer.java | 44 int trackIndex = mMuxer.addTrack(trackFormat); in setUpMuxer() local 49 return trackIndex; in setUpMuxer() 64 public int mux(int trackIndex, ArrayList<ByteBuffer> inputExtractedBuffer, in mux() argument 69 mMuxer.writeSampleData(trackIndex, inputExtractedBuffer.get(sampleCount), in mux()
|
/frameworks/av/media/libmediaplayerservice/nuplayer/ |
D | RTSPSource.cpp | 590 size_t trackIndex; in onMessageReceived() local 591 CHECK(msg->findSize("trackIndex", &trackIndex)); in onMessageReceived() 594 CHECK_LT(trackIndex, mTracks.size()); in onMessageReceived() 596 CHECK_EQ(trackIndex, 0u); in onMessageReceived() 634 TrackInfo *info = &mTracks.editItemAt(trackIndex); in onMessageReceived() 672 size_t trackIndex; in onMessageReceived() local 673 CHECK(msg->findSize("trackIndex", &trackIndex)); in onMessageReceived() 674 CHECK_LT(trackIndex, mTracks.size()); in onMessageReceived() 676 TrackInfo *info = &mTracks.editItemAt(trackIndex); in onMessageReceived() 687 size_t trackIndex; in onMessageReceived() local [all …]
|
D | RTPSource.cpp | 389 size_t trackIndex; in onMessageReceived() local 390 CHECK(msg->findSize("trackIndex", &trackIndex)); in onMessageReceived() 397 onTimeUpdate(trackIndex, rtpTime, ntpTime); in onMessageReceived() 416 size_t trackIndex; in onMessageReceived() local 417 CHECK(msg->findSize("trackIndex", &trackIndex)); in onMessageReceived() 433 TrackInfo *info = &mTracks.editItemAt(trackIndex); in onMessageReceived() 513 void NuPlayer::RTPSource::onTimeUpdate(int32_t trackIndex, uint32_t rtpTime, uint64_t ntpTime) { in onTimeUpdate() argument 515 trackIndex, rtpTime, (long long)ntpTime); in onTimeUpdate() 521 TrackInfo *track = &mTracks.editItemAt(trackIndex); in onTimeUpdate() 562 int32_t trackIndex, const TrackInfo *track, in addMediaTimestamp() argument [all …]
|
D | RTPSource.h | 190 void onTimeUpdate(int32_t trackIndex, uint32_t rtpTime, uint64_t ntpTime); 191 bool addMediaTimestamp(int32_t trackIndex, const TrackInfo *track, 194 void postQueueAccessUnit(size_t trackIndex, const sp<ABuffer> &accessUnit); 195 void postQueueEOS(size_t trackIndex, status_t finalResult);
|
/frameworks/base/media/jni/ |
D | android_media_MediaMuxer.cpp | 66 jint trackIndex = muxer->addTrack(trackformat); in android_media_MediaMuxer_addTrack() local 68 if (trackIndex < 0) { in android_media_MediaMuxer_addTrack() 73 return trackIndex; in android_media_MediaMuxer_addTrack() 77 JNIEnv *env, jclass /* clazz */, jlong nativeObject, jint trackIndex, in android_media_MediaMuxer_writeSampleData() argument 124 status_t err = muxer->writeSampleData(buffer, trackIndex, timeUs, flags); in android_media_MediaMuxer_writeSampleData()
|
D | android_media_JetPlayer.cpp | 344 for (jint trackIndex=0; trackIndex<maxTracks; trackIndex++) { in android_media_JetPlayer_queueSegmentMuteArray() local 345 if (muteTracks[maxTracks-1-trackIndex]==JNI_TRUE) in android_media_JetPlayer_queueSegmentMuteArray() 415 for (jint trackIndex=0; trackIndex<maxTracks; trackIndex++) { in android_media_JetPlayer_setMuteArray() local 416 if (muteTracks[maxTracks-1-trackIndex]==JNI_TRUE) in android_media_JetPlayer_setMuteArray()
|