diff --git a/tv/tuner/1.0/default/Demux.cpp b/tv/tuner/1.0/default/Demux.cpp index 95b4ebc7a6..4e5ae4b626 100644 --- a/tv/tuner/1.0/default/Demux.cpp +++ b/tv/tuner/1.0/default/Demux.cpp @@ -71,7 +71,7 @@ Return Demux::openFilter(const DemuxFilterType& type, uint32_t bufferSize, mUsedFilterIds.insert(filterId); if (cb == nullptr) { - ALOGW("callback can't be null"); + ALOGW("[Demux] callback can't be null"); _hidl_cb(Result::INVALID_ARGUMENT, new Filter()); return Void(); } @@ -82,9 +82,14 @@ Return Demux::openFilter(const DemuxFilterType& type, uint32_t bufferSize, _hidl_cb(Result::UNKNOWN_ERROR, filter); return Void(); } - mFilters[filterId] = filter; - _hidl_cb(Result::SUCCESS, filter); + mFilters[filterId] = filter; + bool result = true; + if (mDvr != nullptr && mDvr->getType() == DvrType::PLAYBACK) { + result = mDvr->addPlaybackFilter(filter); + } + + _hidl_cb(result ? Result::SUCCESS : Result::INVALID_ARGUMENT, filter); return Void(); } @@ -130,7 +135,7 @@ Return Demux::openDvr(DvrType type, uint32_t bufferSize, const sp data) { set::iterator it; + uint16_t pid = ((data[1] & 0x1f) << 8) | ((data[2] & 0xff)); + if (DEBUG_DEMUX) { + ALOGW("[Demux] start ts filter pid: %d", pid); + } for (it = mUsedFilterIds.begin(); it != mUsedFilterIds.end(); it++) { - uint16_t pid = ((data[1] & 0x1f) << 8) | ((data[2] & 0xff)); - if (DEBUG_FILTER) { - ALOGW("start ts filter pid: %d", pid); - } if (pid == mFilters[*it]->getTpid()) { mFilters[*it]->updateFilterOutput(data); } @@ -187,10 +192,10 @@ void Demux::startBroadcastTsFilter(vector data) { void Demux::sendFrontendInputToRecord(vector data) { set::iterator it; + if (DEBUG_DEMUX) { + ALOGW("[Demux] update record filter output"); + } for (it = mRecordFilterIds.begin(); it != mRecordFilterIds.end(); it++) { - if (DEBUG_FILTER) { - ALOGW("update record filter output"); - } mFilters[*it]->updateRecordOutput(data); } } diff --git a/tv/tuner/1.0/default/Demux.h b/tv/tuner/1.0/default/Demux.h index 759e348d93..3c91dafbd1 100644 --- a/tv/tuner/1.0/default/Demux.h +++ b/tv/tuner/1.0/default/Demux.h @@ -188,7 +188,7 @@ class Demux : public IDemux { int mPesSizeLeft = 0; vector mPesOutput; - const bool DEBUG_FILTER = false; + const bool DEBUG_DEMUX = false; }; } // namespace implementation diff --git a/tv/tuner/1.0/default/Dvr.cpp b/tv/tuner/1.0/default/Dvr.cpp index 3088a9d73b..adb263553e 100644 --- a/tv/tuner/1.0/default/Dvr.cpp +++ b/tv/tuner/1.0/default/Dvr.cpp @@ -71,13 +71,10 @@ Return Dvr::attachFilter(const sp& filter) { } // check if the attached filter is a record filter - mFilters[filterId] = filter; - mIsRecordFilterAttached = true; if (!mDemux->attachRecordFilter(filterId)) { return Result::INVALID_ARGUMENT; } - mDemux->setIsRecording(mIsRecordStarted | mIsRecordFilterAttached); return Result::SUCCESS; } @@ -110,7 +107,6 @@ Return Dvr::detachFilter(const sp& filter) { // If all the filters are detached, record can't be started if (mFilters.empty()) { mIsRecordFilterAttached = false; - mDemux->setIsRecording(mIsRecordStarted | mIsRecordFilterAttached); } return Result::SUCCESS; @@ -132,8 +128,7 @@ Return Dvr::start() { pthread_setname_np(mDvrThread, "playback_waiting_loop"); } else if (mType == DvrType::RECORD) { mRecordStatus = RecordStatus::DATA_READY; - mIsRecordStarted = true; - mDemux->setIsRecording(mIsRecordStarted | mIsRecordFilterAttached); + mDemux->setIsRecording(mType == DvrType::RECORD); } // TODO start another thread to send filter status callback to the framework @@ -149,7 +144,7 @@ Return Dvr::stop() { std::lock_guard lock(mDvrThreadLock); mIsRecordStarted = false; - mDemux->setIsRecording(mIsRecordStarted | mIsRecordFilterAttached); + mDemux->setIsRecording(false); return Result::SUCCESS; } @@ -175,7 +170,7 @@ bool Dvr::createDvrMQ() { std::unique_ptr tmpDvrMQ = std::unique_ptr(new (std::nothrow) DvrMQ(mBufferSize, true)); if (!tmpDvrMQ->isValid()) { - ALOGW("Failed to create FMQ of DVR"); + ALOGW("[Dvr] Failed to create FMQ of DVR"); return false; } @@ -256,7 +251,6 @@ bool Dvr::readPlaybackFMQ() { int playbackPacketSize = mDvrSettings.playback().packetSize; vector dataOutputBuffer; dataOutputBuffer.resize(playbackPacketSize); - // Dispatch the packet to the PID matching filter output buffer for (int i = 0; i < size / playbackPacketSize; i++) { if (!mDvrMQ->read(dataOutputBuffer.data(), playbackPacketSize)) { @@ -283,7 +277,6 @@ void Dvr::startTpidFilter(vector data) { bool Dvr::startFilterDispatcher() { std::map>::iterator it; - // Handle the output data per filter type for (it = mFilters.begin(); it != mFilters.end(); it++) { if (mDemux->startFilterHandler(it->first) != Result::SUCCESS) { @@ -296,7 +289,10 @@ bool Dvr::startFilterDispatcher() { bool Dvr::writeRecordFMQ(const std::vector& data) { std::lock_guard lock(mWriteLock); - ALOGW("[Dvr] write record FMQ"); + if (mRecordStatus == RecordStatus::OVERFLOW) { + ALOGW("[Dvr] stops writing and wait for the client side flushing."); + return true; + } if (mDvrMQ->write(data.data(), data.size())) { mDvrEventFlag->wake(static_cast(DemuxQueueNotifyBits::DATA_READY)); maySendRecordStatusCallback(); @@ -333,6 +329,27 @@ RecordStatus Dvr::checkRecordStatusChange(uint32_t availableToWrite, uint32_t av return mRecordStatus; } +bool Dvr::addPlaybackFilter(sp filter) { + uint32_t filterId; + Result status; + + filter->getId([&](Result result, uint32_t id) { + filterId = id; + status = result; + }); + + if (status != Result::SUCCESS) { + return false; + } + + mFilters[filterId] = filter; + return true; +} + +DvrType Dvr::getType() { + return mType; +} + } // namespace implementation } // namespace V1_0 } // namespace tuner diff --git a/tv/tuner/1.0/default/Dvr.h b/tv/tuner/1.0/default/Dvr.h index f39d8db152..08afd5dc83 100644 --- a/tv/tuner/1.0/default/Dvr.h +++ b/tv/tuner/1.0/default/Dvr.h @@ -81,6 +81,8 @@ class Dvr : public IDvr { bool createDvrMQ(); void sendBroadcastInputToDvrRecord(vector byteBuffer); bool writeRecordFMQ(const std::vector& data); + DvrType getType(); + bool addPlaybackFilter(sp filter); private: // Demux service diff --git a/tv/tuner/1.0/default/Filter.cpp b/tv/tuner/1.0/default/Filter.cpp index dab3c177a5..fef7a3599c 100644 --- a/tv/tuner/1.0/default/Filter.cpp +++ b/tv/tuner/1.0/default/Filter.cpp @@ -149,7 +149,7 @@ bool Filter::createFilterMQ() { std::unique_ptr tmpFilterMQ = std::unique_ptr(new (std::nothrow) FilterMQ(mBufferSize, true)); if (!tmpFilterMQ->isValid()) { - ALOGW("Failed to create FMQ of filter with id: %d", mFilterId); + ALOGW("[Filter] Failed to create FMQ of filter with id: %d", mFilterId); return false; } @@ -290,13 +290,11 @@ uint16_t Filter::getTpid() { void Filter::updateFilterOutput(vector data) { std::lock_guard lock(mFilterOutputLock); - ALOGD("[Filter] filter output updated"); mFilterOutput.insert(mFilterOutput.end(), data.begin(), data.end()); } void Filter::updateRecordOutput(vector data) { std::lock_guard lock(mRecordFilterOutputLock); - ALOGD("[Filter] record filter output updated"); mRecordFilterOutput.insert(mRecordFilterOutput.end(), data.begin(), data.end()); } @@ -438,7 +436,6 @@ Result Filter::startMediaFilterHandler() { if (mFilterOutput.empty()) { return Result::SUCCESS; } - for (int i = 0; i < mFilterOutput.size(); i += 188) { if (mPesSizeLeft == 0) { uint32_t prefix = (mFilterOutput[i + 4] << 16) | (mFilterOutput[i + 5] << 8) | diff --git a/tv/tuner/1.0/default/Frontend.h b/tv/tuner/1.0/default/Frontend.h index 8a30b91e87..65537d7a23 100644 --- a/tv/tuner/1.0/default/Frontend.h +++ b/tv/tuner/1.0/default/Frontend.h @@ -76,7 +76,7 @@ class Frontend : public IFrontend { FrontendId mId = 0; bool mIsLocked = false; - const string FRONTEND_STREAM_FILE = "/vendor/etc/dumpTs3.ts"; + const string FRONTEND_STREAM_FILE = "/vendor/etc/segment000000.ts"; std::ifstream mFrontendData; }; diff --git a/tv/tuner/1.0/vts/functional/DvrTests.cpp b/tv/tuner/1.0/vts/functional/DvrTests.cpp index 9b24aa7a08..7e7f8e6da8 100644 --- a/tv/tuner/1.0/vts/functional/DvrTests.cpp +++ b/tv/tuner/1.0/vts/functional/DvrTests.cpp @@ -16,17 +16,13 @@ #include "DvrTests.h" -void DvrCallback::startPlaybackInputThread(PlaybackConf playbackConf, +void DvrCallback::startPlaybackInputThread(string& dataInputFile, PlaybackSettings& settings, MQDesc& playbackMQDescriptor) { + mInputDataFile = dataInputFile; + mPlaybackSettings = settings; mPlaybackMQ = std::make_unique(playbackMQDescriptor, true /* resetPointers */); EXPECT_TRUE(mPlaybackMQ); - struct PlaybackThreadArgs* threadArgs = - (struct PlaybackThreadArgs*)malloc(sizeof(struct PlaybackThreadArgs)); - threadArgs->user = this; - threadArgs->playbackConf = &playbackConf; - threadArgs->keepWritingPlaybackFMQ = &mKeepWritingPlaybackFMQ; - - pthread_create(&mPlaybackThread, NULL, __threadLoopPlayback, (void*)threadArgs); + pthread_create(&mPlaybackThread, NULL, __threadLoopPlayback, this); pthread_setname_np(mPlaybackThread, "test_playback_input_loop"); } @@ -37,15 +33,13 @@ void DvrCallback::stopPlaybackThread() { android::Mutex::Autolock autoLock(mPlaybackThreadLock); } -void* DvrCallback::__threadLoopPlayback(void* threadArgs) { - DvrCallback* const self = - static_cast(((struct PlaybackThreadArgs*)threadArgs)->user); - self->playbackThreadLoop(((struct PlaybackThreadArgs*)threadArgs)->playbackConf, - ((struct PlaybackThreadArgs*)threadArgs)->keepWritingPlaybackFMQ); +void* DvrCallback::__threadLoopPlayback(void* user) { + DvrCallback* const self = static_cast(user); + self->playbackThreadLoop(); return 0; } -void DvrCallback::playbackThreadLoop(PlaybackConf* playbackConf, bool* keepWritingPlaybackFMQ) { +void DvrCallback::playbackThreadLoop() { android::Mutex::Autolock autoLock(mPlaybackThreadLock); mPlaybackThreadRunning = true; @@ -56,10 +50,10 @@ void DvrCallback::playbackThreadLoop(PlaybackConf* playbackConf, bool* keepWriti android::OK); // open the stream and get its length - std::ifstream inputData(playbackConf->inputDataFile, std::ifstream::binary); - int writeSize = playbackConf->setting.packetSize * 6; + std::ifstream inputData(mInputDataFile.c_str(), std::ifstream::binary); + int writeSize = mPlaybackSettings.packetSize * 6; char* buffer = new char[writeSize]; - ALOGW("[vts] playback thread loop start %s", playbackConf->inputDataFile.c_str()); + ALOGW("[vts] playback thread loop start %s!", mInputDataFile.c_str()); if (!inputData.is_open()) { mPlaybackThreadRunning = false; ALOGW("[vts] Error %s", strerror(errno)); @@ -67,7 +61,7 @@ void DvrCallback::playbackThreadLoop(PlaybackConf* playbackConf, bool* keepWriti while (mPlaybackThreadRunning) { // move the stream pointer for packet size * 6 every read until the end - while (*keepWritingPlaybackFMQ) { + while (mKeepWritingPlaybackFMQ) { inputData.read(buffer, writeSize); if (!inputData) { int leftSize = inputData.gcount(); @@ -105,6 +99,7 @@ void DvrCallback::testRecordOutput() { while (mDataOutputBuffer.empty()) { if (-ETIMEDOUT == mMsgCondition.waitRelative(mMsgLock, WAIT_TIMEOUT)) { EXPECT_TRUE(false) << "record output matching pid does not output within timeout"; + stopRecordThread(); return; } } @@ -138,6 +133,7 @@ void DvrCallback::recordThreadLoop(RecordSettings* /*recordSettings*/, bool* kee ALOGD("[vts] DvrCallback record threadLoop start."); android::Mutex::Autolock autoLock(mRecordThreadLock); mRecordThreadRunning = true; + mKeepReadingRecordFMQ = true; // Create the EventFlag that is used to signal the HAL impl that data have been // read from the Record FMQ @@ -183,7 +179,6 @@ bool DvrCallback::readRecordFMQ() { void DvrCallback::stopRecordThread() { mKeepReadingRecordFMQ = false; mRecordThreadRunning = false; - android::Mutex::Autolock autoLock(mRecordThreadLock); } AssertionResult DvrTests::openDvrInDemux(DvrType type, uint32_t bufferSize) { @@ -198,6 +193,9 @@ AssertionResult DvrTests::openDvrInDemux(DvrType type, uint32_t bufferSize) { status = result; }); + if (status == Result::SUCCESS) { + mDvrCallback->setDvr(mDvr); + } return AssertionResult(status == Result::SUCCESS); } diff --git a/tv/tuner/1.0/vts/functional/DvrTests.h b/tv/tuner/1.0/vts/functional/DvrTests.h index d60ce2bd9d..dd00c27431 100644 --- a/tv/tuner/1.0/vts/functional/DvrTests.h +++ b/tv/tuner/1.0/vts/functional/DvrTests.h @@ -54,15 +54,10 @@ using android::hardware::tv::tuner::V1_0::Result; #define WAIT_TIMEOUT 3000000000 -struct PlaybackConf { - string inputDataFile; - PlaybackSettings setting; -}; - class DvrCallback : public IDvrCallback { public: virtual Return onRecordStatus(DemuxFilterStatus status) override { - ALOGW("[vts] record status %hhu", status); + ALOGD("[vts] record status %hhu", status); switch (status) { case DemuxFilterStatus::DATA_READY: break; @@ -70,7 +65,12 @@ class DvrCallback : public IDvrCallback { break; case DemuxFilterStatus::HIGH_WATER: case DemuxFilterStatus::OVERFLOW: - ALOGW("[vts] record overflow. Flushing"); + ALOGD("[vts] record overflow. Flushing."); + EXPECT_TRUE(mDvr) << "Dvr callback is not set with an IDvr"; + if (mDvr) { + Result result = mDvr->flush(); + ALOGD("[vts] Flushing result %d.", result); + } break; } return Void(); @@ -78,16 +78,16 @@ class DvrCallback : public IDvrCallback { virtual Return onPlaybackStatus(PlaybackStatus status) override { // android::Mutex::Autolock autoLock(mMsgLock); - ALOGW("[vts] playback status %d", status); + ALOGD("[vts] playback status %d", status); switch (status) { case PlaybackStatus::SPACE_EMPTY: case PlaybackStatus::SPACE_ALMOST_EMPTY: - ALOGW("[vts] keep playback inputing %d", status); + ALOGD("[vts] keep playback inputing %d", status); mKeepWritingPlaybackFMQ = true; break; case PlaybackStatus::SPACE_ALMOST_FULL: case PlaybackStatus::SPACE_FULL: - ALOGW("[vts] stop playback inputing %d", status); + ALOGD("[vts] stop playback inputing %d", status); mKeepWritingPlaybackFMQ = false; break; } @@ -98,21 +98,19 @@ class DvrCallback : public IDvrCallback { void testRecordOutput(); void stopRecordThread(); - void startPlaybackInputThread(PlaybackConf playbackConf, MQDesc& playbackMQDescriptor); + void startPlaybackInputThread(string& dataInputFile, PlaybackSettings& settings, + MQDesc& playbackMQDescriptor); void startRecordOutputThread(RecordSettings recordSettings, MQDesc& recordMQDescriptor); - static void* __threadLoopPlayback(void* threadArgs); + static void* __threadLoopPlayback(void* user); static void* __threadLoopRecord(void* threadArgs); - void playbackThreadLoop(PlaybackConf* playbackConf, bool* keepWritingPlaybackFMQ); + void playbackThreadLoop(); void recordThreadLoop(RecordSettings* recordSetting, bool* keepWritingPlaybackFMQ); bool readRecordFMQ(); + void setDvr(sp dvr) { mDvr = dvr; } + private: - struct PlaybackThreadArgs { - DvrCallback* user; - PlaybackConf* playbackConf; - bool* keepWritingPlaybackFMQ; - }; struct RecordThreadArgs { DvrCallback* user; RecordSettings* recordSettings; @@ -137,6 +135,10 @@ class DvrCallback : public IDvrCallback { bool mRecordThreadRunning; pthread_t mPlaybackThread; pthread_t mRecordThread; + string mInputDataFile; + PlaybackSettings mPlaybackSettings; + + sp mDvr = nullptr; // int mPidFilterOutputCount = 0; }; @@ -147,11 +149,7 @@ class DvrTests { void setDemux(sp demux) { mDemux = demux; } void startPlaybackInputThread(string& dataInputFile, PlaybackSettings& settings) { - PlaybackConf conf{ - .inputDataFile = dataInputFile, - .setting = settings, - }; - mDvrCallback->startPlaybackInputThread(conf, mDvrMQDescriptor); + mDvrCallback->startPlaybackInputThread(dataInputFile, settings, mDvrMQDescriptor); }; void startRecordOutputThread(RecordSettings settings) { diff --git a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp index c5b159f4f3..c44f77d1a1 100644 --- a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp +++ b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp @@ -130,7 +130,6 @@ void TunerPlaybackHidlTest::playbackSingleFilterTest(FilterConfig filterConf, Dv uint32_t demuxId; sp demux; uint32_t filterId; - sp filter; ASSERT_TRUE(mDemuxTests.openDemux(demux, demuxId)); mFilterTests.setDemux(demux); @@ -142,8 +141,6 @@ void TunerPlaybackHidlTest::playbackSingleFilterTest(FilterConfig filterConf, Dv ASSERT_TRUE(mFilterTests.getNewlyOpenedFilterId(filterId)); ASSERT_TRUE(mFilterTests.configFilter(filterConf.settings, filterId)); ASSERT_TRUE(mFilterTests.getFilterMQDescriptor(filterId)); - filter = mFilterTests.getFilterById(filterId); - ASSERT_TRUE(filter != nullptr); mDvrTests.startPlaybackInputThread(dvrConf.playbackInputFile, dvrConf.settings.playback()); ASSERT_TRUE(mDvrTests.startDvr()); ASSERT_TRUE(mFilterTests.startFilter(filterId)); @@ -181,12 +178,14 @@ void TunerRecordHidlTest::recordSingleFilterTest(FilterConfig filterConf, ASSERT_TRUE(mFilterTests.getFilterMQDescriptor(filterId)); filter = mFilterTests.getFilterById(filterId); ASSERT_TRUE(filter != nullptr); - ASSERT_TRUE(mDvrTests.attachFilterToDvr(filter)); mDvrTests.startRecordOutputThread(dvrConf.settings.record()); + ASSERT_TRUE(mDvrTests.attachFilterToDvr(filter)); ASSERT_TRUE(mDvrTests.startDvr()); ASSERT_TRUE(mFilterTests.startFilter(filterId)); + ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf)); mDvrTests.testRecordOutput(); mDvrTests.stopRecordThread(); + ASSERT_TRUE(mFrontendTests.stopTuneFrontend()); ASSERT_TRUE(mFilterTests.stopFilter(filterId)); ASSERT_TRUE(mDvrTests.stopDvr()); ASSERT_TRUE(mDvrTests.detachFilterToDvr(filter)); @@ -280,11 +279,6 @@ TEST_P(TunerBroadcastHidlTest, BroadcastDataFlowAudioFilterTest) { broadcastSingleFilterTest(filterArray[TS_AUDIO0], frontendArray[DVBS]); } -TEST_P(TunerBroadcastHidlTest, BroadcastDataFlowTsFilterTest) { - description("Test TS Filter functionality in Broadcast use case."); - broadcastSingleFilterTest(filterArray[TS_TS0], frontendArray[DVBS]); -} - TEST_P(TunerBroadcastHidlTest, BroadcastDataFlowSectionFilterTest) { description("Test Section Filter functionality in Broadcast use case."); broadcastSingleFilterTest(filterArray[TS_SECTION0], frontendArray[DVBS]); @@ -295,9 +289,9 @@ TEST_P(TunerBroadcastHidlTest, IonBufferTest) { broadcastSingleFilterTest(filterArray[TS_VIDEO0], frontendArray[DVBS]); } -TEST_P(TunerPlaybackHidlTest, PlaybackDataFlowWithTsRecordFilterTest) { - description("Feed ts data from playback and configure Ts filter to get output"); - playbackSingleFilterTest(filterArray[TS_VIDEO1], dvrArray[DVR_PLAYBACK0]); +TEST_P(TunerPlaybackHidlTest, PlaybackDataFlowWithTsSectionFilterTest) { + description("Feed ts data from playback and configure Ts section filter to get output"); + playbackSingleFilterTest(filterArray[TS_SECTION0], dvrArray[DVR_PLAYBACK0]); } TEST_P(TunerRecordHidlTest, AttachFiltersToRecordTest) { diff --git a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h index a9f892262c..b84013b665 100644 --- a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h +++ b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h @@ -153,18 +153,18 @@ inline void initFilterConfig() { filterArray[TS_VIDEO0].type.mainType = DemuxFilterMainType::TS; filterArray[TS_VIDEO0].type.subType.tsFilterType(DemuxTsFilterType::VIDEO); filterArray[TS_VIDEO0].bufferSize = FMQ_SIZE_16M; - filterArray[TS_VIDEO0].settings.ts().tpid = 119; + filterArray[TS_VIDEO0].settings.ts().tpid = 256; filterArray[TS_VIDEO0].settings.ts().filterSettings.av({.isPassthrough = false}); filterArray[TS_VIDEO1].type.mainType = DemuxFilterMainType::TS; filterArray[TS_VIDEO1].type.subType.tsFilterType(DemuxTsFilterType::VIDEO); filterArray[TS_VIDEO1].bufferSize = FMQ_SIZE_16M; - filterArray[TS_VIDEO1].settings.ts().tpid = 81; + filterArray[TS_VIDEO1].settings.ts().tpid = 256; filterArray[TS_VIDEO1].settings.ts().filterSettings.av({.isPassthrough = false}); // TS AUDIO filter setting filterArray[TS_AUDIO0].type.mainType = DemuxFilterMainType::TS; filterArray[TS_AUDIO0].type.subType.tsFilterType(DemuxTsFilterType::AUDIO); filterArray[TS_AUDIO0].bufferSize = FMQ_SIZE_16M; - filterArray[TS_AUDIO0].settings.ts().tpid = 84; + filterArray[TS_AUDIO0].settings.ts().tpid = 256; filterArray[TS_AUDIO0].settings.ts().filterSettings.av({.isPassthrough = false}); // TS PES filter setting filterArray[TS_PES0].type.mainType = DemuxFilterMainType::TS; @@ -179,19 +179,19 @@ inline void initFilterConfig() { filterArray[TS_PCR0].type.mainType = DemuxFilterMainType::TS; filterArray[TS_PCR0].type.subType.tsFilterType(DemuxTsFilterType::PCR); filterArray[TS_PCR0].bufferSize = FMQ_SIZE_16M; - filterArray[TS_PCR0].settings.ts().tpid = 81; + filterArray[TS_PCR0].settings.ts().tpid = 256; filterArray[TS_PCR0].settings.ts().filterSettings.noinit(); // TS filter setting filterArray[TS_TS0].type.mainType = DemuxFilterMainType::TS; filterArray[TS_TS0].type.subType.tsFilterType(DemuxTsFilterType::TS); filterArray[TS_TS0].bufferSize = FMQ_SIZE_16M; - filterArray[TS_TS0].settings.ts().tpid = 18; + filterArray[TS_TS0].settings.ts().tpid = 256; filterArray[TS_TS0].settings.ts().filterSettings.noinit(); // TS SECTION filter setting filterArray[TS_SECTION0].type.mainType = DemuxFilterMainType::TS; filterArray[TS_SECTION0].type.subType.tsFilterType(DemuxTsFilterType::SECTION); filterArray[TS_SECTION0].bufferSize = FMQ_SIZE_16M; - filterArray[TS_SECTION0].settings.ts().tpid = 48; + filterArray[TS_SECTION0].settings.ts().tpid = 256; filterArray[TS_SECTION0].settings.ts().filterSettings.section({ .isRaw = false, }); @@ -224,7 +224,7 @@ inline void initDvrConfig() { .packetSize = 188, }; dvrArray[DVR_PLAYBACK0].type = DvrType::PLAYBACK; - dvrArray[DVR_PLAYBACK0].playbackInputFile = "/vendor/etc/test1.ts"; + dvrArray[DVR_PLAYBACK0].playbackInputFile = "/vendor/etc/segment000000.ts"; dvrArray[DVR_PLAYBACK0].bufferSize = FMQ_SIZE_4M; dvrArray[DVR_PLAYBACK0].settings.playback(playbackSettings); };