summaryrefslogtreecommitdiff
path: root/p2pvr/lib/muxer.h
blob: cd82e34dc3b35792a7d89d603adbf103b95569b8 (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
28
29
30
31
32
33
#ifndef MUXER_H
#define MUXER_H

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

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

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

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

		static IceTray::Logging::LoggerPtr log;
};
}

#endif