blob: 20ea8e2e1b6187f3bbfa86a1c21182f83b566e2e (
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
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef SERVICESTREAMER_H
#define SERVICESTREAMER_H
#include <Ice/Communicator.h>
#include <Ice/ObjectAdapter.h>
#include "siParsers/programAssociation.h"
#include "siParsers/programMap.h"
#include "temporaryIceAdapterObject.h"
#include <p2pvr.h>
#include <set>
class ServiceStreamer {
public:
ServiceStreamer(int sid, P2PVR::RawDataClientPrx, const Ice::CommunicatorPtr & ic, const Ice::ObjectAdapterPtr & a);
ServiceStreamer(int sid, P2PVR::RawDataClientPrx, const P2PVR::DevicesPrx & d, const P2PVR::SIPrx & s, const Ice::ObjectAdapterPtr & a);
~ServiceStreamer();
bool HandlePAT(ProgramAssociationMapPtr pam);
bool HandlePMT(DVBSI::ProgramMapPtr pmp);
void Start();
void Stop();
private:
void stopHandle(int & handle);
const Ice::ObjectAdapterPtr & adapter;
P2PVR::DevicesPrx devs;
P2PVR::SIPrx si;
P2PVR::TunerPrx tuner;
P2PVR::RawDataClientPrx target;
TemporarayIceAdapterObject<SiTableParserBase> patParser;
TemporarayIceAdapterObject<SiTableParserBase> pmtParser;
int serviceId;
int patHandle;
int pmtStream;
int pmtHandle;
typedef std::set<int> Streams;
Streams streams;
int serviceHandle;
};
typedef boost::shared_ptr<ServiceStreamer> ServiceStreamerPtr;
#endif
|