summaryrefslogtreecommitdiff
path: root/p2pvr/lib/muxer.h
blob: cf0db1ce7900e2b95386cd98157e30f83fa332d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef MUXER_H
#define MUXER_H

#include <dvb.h>
#include <mutex>
#include <boost/shared_ptr.hpp>
#include <processPipes.h>

class Muxer : public P2PVR::RawDataClient {
	public:
		Muxer(const P2PVR::RawDataClientPrx & target, const std::string & cmd);
		~Muxer();

		bool NewData(const P2PVR::Data &, const Ice::Current &);

	private:
		bool ReadWaiting() const;
		bool ReadAvailable() const;
		bool ReadMuxerAndSend(int wait) const;
		const P2PVR::RawDataClientPrx target;
		typedef boost::shared_ptr<AdHoc::System::ProcessPipes> ProcessPipesPtr;
		ProcessPipesPtr fds;
		mutable std::mutex lock;
};

#endif