vdr 2.8.4
transfer.h
Go to the documentation of this file.
1/*
2 * transfer.h: Transfer mode
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * $Id: transfer.h 5.2 2026/09/02 09:20:35 kls Exp $
8 */
9
10#ifndef __TRANSFER_H
11#define __TRANSFER_H
12
13#include "player.h"
14#include "receiver.h"
15#include "remux.h"
16
17class cTransfer : public cReceiver, public cPlayer {
18private:
23protected:
24 virtual void Activate(bool On) override;
25 virtual void Receive(const uchar *Data, int Length) override;
26public:
27 cTransfer(const cChannel *Channel);
28 virtual ~cTransfer() override;
29 };
30
31class cTransferControl : public cControl {
32private:
34 static std::atomic<cDevice *> receiverDevice; // set and cleared by the switching thread, read by any
35public:
38 virtual void Hide(void) override {}
39 static cDevice *ReceiverDevice(void) { return receiverDevice; }
40 };
41
42#endif //__TRANSFER_H
cControl(cPlayer *Player, bool Hidden=false)
Definition player.c:45
cPlayer(ePlayMode PlayMode=pmAudioVideo)
Definition player.c:15
cReceiver(const cChannel *Channel=NULL, int Priority=MINPRIORITY)
Creates a new receiver for the given Channel with the given Priority.
Definition receiver.c:14
static cDevice * ReceiverDevice(void)
Definition transfer.h:39
cTransfer * transfer
Definition transfer.h:33
cTransferControl(cDevice *ReceiverDevice, const cChannel *Channel)
Definition transfer.c:80
static std::atomic< cDevice * > receiverDevice
Definition transfer.h:34
virtual void Hide(void) override
Definition transfer.h:38
time_t lastErrorReport
Definition transfer.h:20
virtual void Receive(const uchar *Data, int Length) override
This function is called from the cDevice we are attached to, and delivers one TS packet from the set ...
Definition transfer.c:53
cTransfer(const cChannel *Channel)
Definition transfer.c:16
bool activated
Definition transfer.h:19
virtual void Activate(bool On) override
This function is called just before the cReceiver gets attached to (On == true) and right after it ge...
Definition transfer.c:31
int numLostPackets
Definition transfer.h:21
cPatPmtGenerator patPmtGenerator
Definition transfer.h:22
unsigned char uchar
Definition tools.h:31