Add IPTV default implementation
Frontend::tune(): create a streamer using plugin interface to
read a byte and return LOCKED event if byte is read
Demux::setFrontendDataSource():open a new stream to read data
from the socket and push the data read to DVR FMQ.
Test: atest VtsHalTvTunerTargetTest
Bug: 288170590
Change-Id: Iaf2eae7b4dc9e7d69b1f7b3a367d24f6acdd68be
diff --git a/tv/tuner/aidl/default/Frontend.h b/tv/tuner/aidl/default/Frontend.h
index 85bd636..17a1aee 100644
--- a/tv/tuner/aidl/default/Frontend.h
+++ b/tv/tuner/aidl/default/Frontend.h
@@ -21,6 +21,7 @@
#include <iostream>
#include <thread>
#include "Tuner.h"
+#include "dtv_plugin.h"
using namespace std;
@@ -60,6 +61,10 @@
FrontendType getFrontendType();
int32_t getFrontendId();
string getSourceFile();
+ dtv_plugin* getIptvPluginInterface();
+ string getIptvTransportDescription();
+ dtv_streamer* getIptvPluginStreamer();
+ void readTuneByte(dtv_streamer* streamer, void* buf, size_t size, int timeout_ms);
bool isLocked();
void getFrontendInfo(FrontendInfo* _aidl_return);
void setTunerService(std::shared_ptr<Tuner> tuner);
@@ -81,6 +86,10 @@
std::ifstream mFrontendData;
FrontendCapabilities mFrontendCaps;
vector<FrontendStatusType> mFrontendStatusCaps;
+ dtv_plugin* mIptvPluginInterface;
+ string mIptvTransportDescription;
+ dtv_streamer* mIptvPluginStreamer;
+ std::thread mIptvFrontendTuneThread;
};
} // namespace tuner