Loading tv/tuner/1.0/IDemux.hal +26 −1 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,6 @@ import ITimeFilter; /** /** * Demultiplexer(Demux) takes a single multiplexed input and splits it into * Demultiplexer(Demux) takes a single multiplexed input and splits it into * one or more output. * one or more output. * */ */ interface IDemux { interface IDemux { /** /** Loading Loading @@ -134,4 +133,30 @@ interface IDemux { */ */ openDvr(DvrType type, uint32_t bufferSize, IDvrCallback cb) openDvr(DvrType type, uint32_t bufferSize, IDvrCallback cb) generates (Result result, IDvr dvr); generates (Result result, IDvr dvr); /** * Connect Conditional Access Modules (CAM) through Common Interface (CI) * * It is used by the client to connect CI-CAM. The demux uses the output * from the frontend as the input by default, and must change to use the * output from CI-CAM as the input after this call take place. * * @param ciCamId specify CI-CAM Id to connect. * @return result Result status of the operation. * SUCCESS if successful, * UNKNOWN_ERROR if failed for other reasons. */ connectCiCam(uint32_t ciCamId) generates (Result result); /** * Disconnect Conditional Access Modules (CAM) * * It is used by the client to disconnect CI-CAM. The demux will use the * output from the frontend as the input after this call take place. * * @return result Result status of the operation. * SUCCESS if successful, * UNKNOWN_ERROR if failed for other reasons. */ disconnectCiCam() generates (Result result); }; }; tv/tuner/1.0/IFilter.hal +15 −0 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,21 @@ interface IFilter { */ */ getId() generates (Result result, uint32_t filterId); getId() generates (Result result, uint32_t filterId); /** * Release the handle reported by the HAL for AV memory. * * It is used by the client to notify the HAL that the AV handle won't be * used any more in client side, so that the HAL can mark the memory * presented by file descripor in the handle as released. * * @param avMemory A handle associated to the memory for audio or video. * @return result Result status of the operation. * SUCCESS if successful, * INVALID_ARGUMENT if failed for wrong parameter. * UNKNOWN_ERROR if failed for other reasons. */ releaseAvHandle(handle avMemory) generates (Result result); /** /** * Set the filter's data source. * Set the filter's data source. * * Loading tv/tuner/1.0/default/Demux.cpp +14 −0 Original line number Original line Diff line number Diff line Loading @@ -147,6 +147,20 @@ Return<void> Demux::openDvr(DvrType type, uint32_t bufferSize, const sp<IDvrCall return Void(); return Void(); } } Return<Result> Demux::connectCiCam(uint32_t ciCamId) { ALOGV("%s", __FUNCTION__); mCiCamId = ciCamId; return Result::SUCCESS; } Return<Result> Demux::disconnectCiCam() { ALOGV("%s", __FUNCTION__); return Result::SUCCESS; } Result Demux::removeFilter(uint32_t filterId) { Result Demux::removeFilter(uint32_t filterId) { ALOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__); Loading tv/tuner/1.0/default/Demux.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -76,6 +76,10 @@ class Demux : public IDemux { virtual Return<void> openDvr(DvrType type, uint32_t bufferSize, const sp<IDvrCallback>& cb, virtual Return<void> openDvr(DvrType type, uint32_t bufferSize, const sp<IDvrCallback>& cb, openDvr_cb _hidl_cb) override; openDvr_cb _hidl_cb) override; virtual Return<Result> connectCiCam(uint32_t ciCamId) override; virtual Return<Result> disconnectCiCam() override; // Functions interacts with Tuner Service // Functions interacts with Tuner Service void stopBroadcastInput(); void stopBroadcastInput(); Result removeFilter(uint32_t filterId); Result removeFilter(uint32_t filterId); Loading Loading @@ -118,6 +122,7 @@ class Demux : public IDemux { void startTsFilter(vector<uint8_t> data); void startTsFilter(vector<uint8_t> data); uint32_t mDemuxId; uint32_t mDemuxId; uint32_t mCiCamId; /** /** * Record the last used filter id. Initial value is -1. * Record the last used filter id. Initial value is -1. * Filter Id starts with 0. * Filter Id starts with 0. Loading tv/tuner/1.0/default/Filter.cpp +15 −1 Original line number Original line Diff line number Diff line Loading @@ -120,6 +120,12 @@ Return<Result> Filter::flush() { return Result::SUCCESS; return Result::SUCCESS; } } Return<Result> Filter::releaseAvHandle(const hidl_handle& /*avMemory*/) { ALOGV("%s", __FUNCTION__); return Result::SUCCESS; } Return<Result> Filter::close() { Return<Result> Filter::close() { ALOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__); Loading Loading @@ -289,6 +295,9 @@ Result Filter::startFilterHandler() { case DemuxTsFilterType::RECORD: case DemuxTsFilterType::RECORD: startRecordFilterHandler(); startRecordFilterHandler(); break; break; case DemuxTsFilterType::TEMI: startTemiFilterHandler(); break; } } break; break; case DemuxFilterMainType::MMTP: case DemuxFilterMainType::MMTP: Loading Loading @@ -419,6 +428,11 @@ Result Filter::startPcrFilterHandler() { return Result::SUCCESS; return Result::SUCCESS; } } Result Filter::startTemiFilterHandler() { // TODO handle starting TEMI filter return Result::SUCCESS; } bool Filter::writeSectionsAndCreateEvent(vector<uint8_t> data) { bool Filter::writeSectionsAndCreateEvent(vector<uint8_t> data) { // TODO check how many sections has been read // TODO check how many sections has been read ALOGD("[Filter] section hander"); ALOGD("[Filter] section hander"); Loading Loading
tv/tuner/1.0/IDemux.hal +26 −1 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,6 @@ import ITimeFilter; /** /** * Demultiplexer(Demux) takes a single multiplexed input and splits it into * Demultiplexer(Demux) takes a single multiplexed input and splits it into * one or more output. * one or more output. * */ */ interface IDemux { interface IDemux { /** /** Loading Loading @@ -134,4 +133,30 @@ interface IDemux { */ */ openDvr(DvrType type, uint32_t bufferSize, IDvrCallback cb) openDvr(DvrType type, uint32_t bufferSize, IDvrCallback cb) generates (Result result, IDvr dvr); generates (Result result, IDvr dvr); /** * Connect Conditional Access Modules (CAM) through Common Interface (CI) * * It is used by the client to connect CI-CAM. The demux uses the output * from the frontend as the input by default, and must change to use the * output from CI-CAM as the input after this call take place. * * @param ciCamId specify CI-CAM Id to connect. * @return result Result status of the operation. * SUCCESS if successful, * UNKNOWN_ERROR if failed for other reasons. */ connectCiCam(uint32_t ciCamId) generates (Result result); /** * Disconnect Conditional Access Modules (CAM) * * It is used by the client to disconnect CI-CAM. The demux will use the * output from the frontend as the input after this call take place. * * @return result Result status of the operation. * SUCCESS if successful, * UNKNOWN_ERROR if failed for other reasons. */ disconnectCiCam() generates (Result result); }; };
tv/tuner/1.0/IFilter.hal +15 −0 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,21 @@ interface IFilter { */ */ getId() generates (Result result, uint32_t filterId); getId() generates (Result result, uint32_t filterId); /** * Release the handle reported by the HAL for AV memory. * * It is used by the client to notify the HAL that the AV handle won't be * used any more in client side, so that the HAL can mark the memory * presented by file descripor in the handle as released. * * @param avMemory A handle associated to the memory for audio or video. * @return result Result status of the operation. * SUCCESS if successful, * INVALID_ARGUMENT if failed for wrong parameter. * UNKNOWN_ERROR if failed for other reasons. */ releaseAvHandle(handle avMemory) generates (Result result); /** /** * Set the filter's data source. * Set the filter's data source. * * Loading
tv/tuner/1.0/default/Demux.cpp +14 −0 Original line number Original line Diff line number Diff line Loading @@ -147,6 +147,20 @@ Return<void> Demux::openDvr(DvrType type, uint32_t bufferSize, const sp<IDvrCall return Void(); return Void(); } } Return<Result> Demux::connectCiCam(uint32_t ciCamId) { ALOGV("%s", __FUNCTION__); mCiCamId = ciCamId; return Result::SUCCESS; } Return<Result> Demux::disconnectCiCam() { ALOGV("%s", __FUNCTION__); return Result::SUCCESS; } Result Demux::removeFilter(uint32_t filterId) { Result Demux::removeFilter(uint32_t filterId) { ALOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__); Loading
tv/tuner/1.0/default/Demux.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -76,6 +76,10 @@ class Demux : public IDemux { virtual Return<void> openDvr(DvrType type, uint32_t bufferSize, const sp<IDvrCallback>& cb, virtual Return<void> openDvr(DvrType type, uint32_t bufferSize, const sp<IDvrCallback>& cb, openDvr_cb _hidl_cb) override; openDvr_cb _hidl_cb) override; virtual Return<Result> connectCiCam(uint32_t ciCamId) override; virtual Return<Result> disconnectCiCam() override; // Functions interacts with Tuner Service // Functions interacts with Tuner Service void stopBroadcastInput(); void stopBroadcastInput(); Result removeFilter(uint32_t filterId); Result removeFilter(uint32_t filterId); Loading Loading @@ -118,6 +122,7 @@ class Demux : public IDemux { void startTsFilter(vector<uint8_t> data); void startTsFilter(vector<uint8_t> data); uint32_t mDemuxId; uint32_t mDemuxId; uint32_t mCiCamId; /** /** * Record the last used filter id. Initial value is -1. * Record the last used filter id. Initial value is -1. * Filter Id starts with 0. * Filter Id starts with 0. Loading
tv/tuner/1.0/default/Filter.cpp +15 −1 Original line number Original line Diff line number Diff line Loading @@ -120,6 +120,12 @@ Return<Result> Filter::flush() { return Result::SUCCESS; return Result::SUCCESS; } } Return<Result> Filter::releaseAvHandle(const hidl_handle& /*avMemory*/) { ALOGV("%s", __FUNCTION__); return Result::SUCCESS; } Return<Result> Filter::close() { Return<Result> Filter::close() { ALOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__); Loading Loading @@ -289,6 +295,9 @@ Result Filter::startFilterHandler() { case DemuxTsFilterType::RECORD: case DemuxTsFilterType::RECORD: startRecordFilterHandler(); startRecordFilterHandler(); break; break; case DemuxTsFilterType::TEMI: startTemiFilterHandler(); break; } } break; break; case DemuxFilterMainType::MMTP: case DemuxFilterMainType::MMTP: Loading Loading @@ -419,6 +428,11 @@ Result Filter::startPcrFilterHandler() { return Result::SUCCESS; return Result::SUCCESS; } } Result Filter::startTemiFilterHandler() { // TODO handle starting TEMI filter return Result::SUCCESS; } bool Filter::writeSectionsAndCreateEvent(vector<uint8_t> data) { bool Filter::writeSectionsAndCreateEvent(vector<uint8_t> data) { // TODO check how many sections has been read // TODO check how many sections has been read ALOGD("[Filter] section hander"); ALOGD("[Filter] section hander"); Loading