Loading tv/tuner/1.0/default/Demux.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -124,12 +124,12 @@ Return<void> Demux::getAvSyncHwId(const sp<IFilter>& filter, getAvSyncHwId_cb _h } if (!mPcrFilterIds.empty()) { ALOGE("[Demux] No PCR filter opened."); // Return the lowest pcr filter id in the default implementation as the av sync id _hidl_cb(Result::SUCCESS, *mPcrFilterIds.begin()); return Void(); } ALOGE("[Demux] No PCR filter opened."); _hidl_cb(Result::INVALID_STATE, avSyncHwId); return Void(); } Loading tv/tuner/1.0/default/Frontend.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,9 @@ Return<Result> Frontend::setLna(bool /* bEnable */) { Return<Result> Frontend::setLnb(uint32_t /* lnb */) { ALOGV("%s", __FUNCTION__); if (!supportsSatellite()) { return Result::INVALID_STATE; } return Result::SUCCESS; } Loading @@ -270,6 +272,10 @@ string Frontend::getSourceFile() { return FRONTEND_STREAM_FILE; } bool Frontend::supportsSatellite() { return mType == FrontendType::DVBS || mType == FrontendType::ISDBS || mType == FrontendType::ISDBS3; } } // namespace implementation } // namespace V1_0 } // namespace tuner Loading tv/tuner/1.0/default/Frontend.h +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ class Frontend : public IFrontend { private: virtual ~Frontend(); bool supportsSatellite(); sp<IFrontendCallback> mCallback; sp<Tuner> mTunerService; FrontendType mType = FrontendType::UNDEFINED; Loading tv/tuner/1.0/vts/functional/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ cc_test { "FilterTests.cpp", "DvrTests.cpp", "DescramblerTests.cpp", "LnbTests.cpp", ], static_libs: [ "android.hardware.cas@1.0", Loading tv/tuner/1.0/vts/functional/DemuxTests.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -53,23 +53,23 @@ AssertionResult DemuxTests::closeDemux() { return AssertionResult(status.isOk()); } void DemuxTests::getAvSyncId(sp<IFilter> filter, uint32_t& avSyncHwId) { ASSERT_TRUE(mDemux) << "Demux is not opened yet."; AssertionResult DemuxTests::getAvSyncId(sp<IFilter> filter, uint32_t& avSyncHwId) { EXPECT_TRUE(mDemux) << "Demux is not opened yet."; Result status; mDemux->getAvSyncHwId(filter, [&](Result result, uint32_t id) { status = result; avSyncHwId = id; }); ASSERT_TRUE(status == Result::SUCCESS) << "Fail to get avSyncHwId."; return AssertionResult(status == Result::SUCCESS); } void DemuxTests::getAvSyncTime(uint32_t avSyncId) { ASSERT_TRUE(mDemux) << "Demux is not opened yet."; AssertionResult DemuxTests::getAvSyncTime(uint32_t avSyncId) { EXPECT_TRUE(mDemux) << "Demux is not opened yet."; Result status; uint64_t syncTime; mDemux->getAvSyncTime(avSyncId, [&](Result result, uint64_t time) { status = result; syncTime = time; }); ASSERT_TRUE(status == Result::SUCCESS) << "Fail to get avSyncTime."; return AssertionResult(status == Result::SUCCESS); } No newline at end of file Loading
tv/tuner/1.0/default/Demux.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -124,12 +124,12 @@ Return<void> Demux::getAvSyncHwId(const sp<IFilter>& filter, getAvSyncHwId_cb _h } if (!mPcrFilterIds.empty()) { ALOGE("[Demux] No PCR filter opened."); // Return the lowest pcr filter id in the default implementation as the av sync id _hidl_cb(Result::SUCCESS, *mPcrFilterIds.begin()); return Void(); } ALOGE("[Demux] No PCR filter opened."); _hidl_cb(Result::INVALID_STATE, avSyncHwId); return Void(); } Loading
tv/tuner/1.0/default/Frontend.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,9 @@ Return<Result> Frontend::setLna(bool /* bEnable */) { Return<Result> Frontend::setLnb(uint32_t /* lnb */) { ALOGV("%s", __FUNCTION__); if (!supportsSatellite()) { return Result::INVALID_STATE; } return Result::SUCCESS; } Loading @@ -270,6 +272,10 @@ string Frontend::getSourceFile() { return FRONTEND_STREAM_FILE; } bool Frontend::supportsSatellite() { return mType == FrontendType::DVBS || mType == FrontendType::ISDBS || mType == FrontendType::ISDBS3; } } // namespace implementation } // namespace V1_0 } // namespace tuner Loading
tv/tuner/1.0/default/Frontend.h +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ class Frontend : public IFrontend { private: virtual ~Frontend(); bool supportsSatellite(); sp<IFrontendCallback> mCallback; sp<Tuner> mTunerService; FrontendType mType = FrontendType::UNDEFINED; Loading
tv/tuner/1.0/vts/functional/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ cc_test { "FilterTests.cpp", "DvrTests.cpp", "DescramblerTests.cpp", "LnbTests.cpp", ], static_libs: [ "android.hardware.cas@1.0", Loading
tv/tuner/1.0/vts/functional/DemuxTests.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -53,23 +53,23 @@ AssertionResult DemuxTests::closeDemux() { return AssertionResult(status.isOk()); } void DemuxTests::getAvSyncId(sp<IFilter> filter, uint32_t& avSyncHwId) { ASSERT_TRUE(mDemux) << "Demux is not opened yet."; AssertionResult DemuxTests::getAvSyncId(sp<IFilter> filter, uint32_t& avSyncHwId) { EXPECT_TRUE(mDemux) << "Demux is not opened yet."; Result status; mDemux->getAvSyncHwId(filter, [&](Result result, uint32_t id) { status = result; avSyncHwId = id; }); ASSERT_TRUE(status == Result::SUCCESS) << "Fail to get avSyncHwId."; return AssertionResult(status == Result::SUCCESS); } void DemuxTests::getAvSyncTime(uint32_t avSyncId) { ASSERT_TRUE(mDemux) << "Demux is not opened yet."; AssertionResult DemuxTests::getAvSyncTime(uint32_t avSyncId) { EXPECT_TRUE(mDemux) << "Demux is not opened yet."; Result status; uint64_t syncTime; mDemux->getAvSyncTime(avSyncId, [&](Result result, uint64_t time) { status = result; syncTime = time; }); ASSERT_TRUE(status == Result::SUCCESS) << "Fail to get avSyncTime."; return AssertionResult(status == Result::SUCCESS); } No newline at end of file