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/dtv_plugin.h b/tv/tuner/aidl/default/dtv_plugin.h
new file mode 100644
index 0000000..0ee5489
--- /dev/null
+++ b/tv/tuner/aidl/default/dtv_plugin.h
@@ -0,0 +1,31 @@
+#ifndef LIVE_DTV_PLUGIN_H_
+#define LIVE_DTV_PLUGIN_H_
+
+#include <fstream>
+#include "dtv_plugin_api.h"
+
+class DtvPlugin {
+ public:
+ DtvPlugin(const char* plugin_path);
+ ~DtvPlugin();
+
+ bool load();
+ int getStreamerCount();
+ bool validate(const char* transport_desc);
+ bool isTransportTypeSupported(const char* transport_type);
+ // /* plugin-wide properties */
+ bool getProperty(const char* key, void* value, int* size);
+ bool setProperty(const char* key, const void* value, int size);
+
+ struct dtv_plugin* interface();
+ const char* pluginBasename();
+
+ protected:
+ const char* path_;
+ char* basename_;
+ void* module_;
+ struct dtv_plugin* interface_;
+ bool loaded_;
+};
+
+#endif // LIVE_DTV_PLUGIN_H_