summaryrefslogtreecommitdiff
path: root/p2pvr/lib/tuner.h
diff options
context:
space:
mode:
Diffstat (limited to 'p2pvr/lib/tuner.h')
-rw-r--r--p2pvr/lib/tuner.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/p2pvr/lib/tuner.h b/p2pvr/lib/tuner.h
index 08701eb..e6cfa80 100644
--- a/p2pvr/lib/tuner.h
+++ b/p2pvr/lib/tuner.h
@@ -8,6 +8,8 @@
#include <thread>
#include <mutex>
#include <boost/bind.hpp>
+#include <boost/function.hpp>
+#include <boost/tuple/tuple.hpp>
class Tuner : public P2PVR::PrivateTuner {
public:
@@ -27,7 +29,8 @@ class Tuner : public P2PVR::PrivateTuner {
void SendEventInformation(const P2PVR::RawDataClientPrx & client, const Ice::Current&);
int StartSendingTS(const P2PVR::PacketIds & pids, const P2PVR::RawDataClientPrx & client, const Ice::Current &);
- void StopSendingTS(int handle, const Ice::Current &);
+ int StartSendingSection(Ice::Int pid, const P2PVR::RawDataClientPrx & client, const Ice::Current &);
+ void StopSending(int handle, const Ice::Current &);
Ice::Long GetLastUsedTime(const Ice::Current&);
@@ -35,14 +38,18 @@ class Tuner : public P2PVR::PrivateTuner {
static bool crc32(const P2PVR::Data &);
int OpenDemux() const;
uint64_t SendPID(int pid, const P2PVR::RawDataClientPrx & client, const Ice::Current &) const;
+ static void RequestPID(int pid, int fd);
uint64_t ReadDemuxAndSend(int fd, const P2PVR::RawDataClientPrx & client) const;
+ static bool IsValidSection(const P2PVR::Data &);
void startSenderThread();
void senderThread();
const boost::filesystem::path deviceFrontend;
const boost::filesystem::path deviceRoot;
const int timeout;
- typedef std::map<int, P2PVR::RawDataClientPrx> BackgroundClients;
+ typedef boost::function<bool(const P2PVR::Data &)> PacketCheckFunction;
+ typedef boost::tuple<P2PVR::RawDataClientPrx, PacketCheckFunction> BackgroundClient;
+ typedef std::map<int, BackgroundClient> BackgroundClients;
BackgroundClients backgroundClients;
std::thread * backgroundThread;
std::mutex lock;