mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Modified handling of audio packets in cDvbPlayer for better sync with external AC3 replay (thanks to Werner Fink). - Fixed a memory leak in cNonBlockingFileReader (thanks to Stefan Huelswitt). - Completed the French OSD texts (thanks to Gregoire Favre). - Completed the Finnish OSD texts (thanks to Niko Tarnanen and Rolf Ahrenberg). - Fixed I/O handling in case an explicit controlling terminal is given (thanks to Oliver Endriss). - Fixed resume file handling in case the resume.vdr file can't be written (thanks to Gerhard Steiner). - Fixed cutting a recording if there is only a single editing mark (thanks to Ralf Klueber for reporting this one). - Fixed volume display in case a plugin has its own OSD open (thanks to Marcel Wiesweg). - Fixed channel switching in the EPG scanner on single device systems. - Completed the Swedish OSD texts (thanks to Tomas Prybil). - Now switching to the channel used by the most recently started timer in case the original current channel becomes unavailable due to a recording on a different transponder. If this fails, a channel up/down switch is attempted as a fallback solution (thanks to Lauri Tischler for reporting this one, and to Hermann Gausterer for suggesting to switch to the recording channel). - Fixed cReplayControl::Show() to avoid a compiler warning in g++ 3.2.3 (thanks to Jan Ekholm for reporting this one). - Completed the Slovenian OSD texts (thanks to Matjaz Thaler). - Changed the DEFAULTPRIORITY in device.c to -1, so that the primary device will be used for FTA recordings in case the CAM is connected to a non-primary device (thanks to Reinhard Walter Buchner for reporting this one). - The cCiHandler now closes its file handle when it gets destroyed. - Checking for duplicate recordings with the same file name and disabling the second timer (thanks to Peter Bieringer for reporting this one). - Fixed handling newly created timers in case they are not confirmed with "Ok" (thanks to Gerhard Steiner for reporting this one). - It is now possible to directly delete a timer that is currently recording (thanks to Alexander Damhuis for reporting this one).
113 lines
2.8 KiB
C++
113 lines
2.8 KiB
C++
/*
|
|
* ci.h: Common Interface
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: ci.h 1.8 2003/05/25 11:44:47 kls Exp $
|
|
*/
|
|
|
|
#ifndef __CI_H
|
|
#define __CI_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include "thread.h"
|
|
|
|
class cCiMMI;
|
|
|
|
class cCiMenu {
|
|
friend class cCiMMI;
|
|
private:
|
|
enum { MAX_CIMENU_ENTRIES = 64 }; ///< XXX is there a specified maximum?
|
|
cCiMMI *mmi;
|
|
bool selectable;
|
|
char *titleText;
|
|
char *subTitleText;
|
|
char *bottomText;
|
|
char *entries[MAX_CIMENU_ENTRIES];
|
|
int numEntries;
|
|
bool AddEntry(char *s);
|
|
cCiMenu(cCiMMI *MMI, bool Selectable);
|
|
public:
|
|
~cCiMenu();
|
|
const char *TitleText(void) { return titleText; }
|
|
const char *SubTitleText(void) { return subTitleText; }
|
|
const char *BottomText(void) { return bottomText; }
|
|
const char *Entry(int n) { return n < numEntries ? entries[n] : NULL; }
|
|
int NumEntries(void) { return numEntries; }
|
|
bool Selectable(void) { return selectable; }
|
|
bool Select(int Index);
|
|
bool Cancel(void);
|
|
};
|
|
|
|
class cCiEnquiry {
|
|
friend class cCiMMI;
|
|
private:
|
|
cCiMMI *mmi;
|
|
char *text;
|
|
bool blind;
|
|
int expectedLength;
|
|
cCiEnquiry(cCiMMI *MMI);
|
|
public:
|
|
~cCiEnquiry();
|
|
const char *Text(void) { return text; }
|
|
bool Blind(void) { return blind; }
|
|
int ExpectedLength(void) { return expectedLength; }
|
|
bool Reply(const char *s);
|
|
bool Cancel(void);
|
|
};
|
|
|
|
class cCiCaPmt {
|
|
friend class cCiConditionalAccessSupport;
|
|
private:
|
|
int length;
|
|
int esInfoLengthPos;
|
|
uint8_t capmt[2048]; ///< XXX is there a specified maximum?
|
|
public:
|
|
cCiCaPmt(int ProgramNumber);
|
|
void AddPid(int Pid);
|
|
void AddCaDescriptor(int Length, uint8_t *Data);
|
|
};
|
|
|
|
#define MAX_CI_SESSION 16 //XXX
|
|
|
|
class cCiSession;
|
|
class cCiTransportLayer;
|
|
class cCiTransportConnection;
|
|
|
|
class cCiHandler {
|
|
private:
|
|
cMutex mutex;
|
|
int fd;
|
|
int numSlots;
|
|
bool newCaSupport;
|
|
bool hasUserIO;
|
|
cCiSession *sessions[MAX_CI_SESSION];
|
|
cCiTransportLayer *tpl;
|
|
cCiTransportConnection *tc;
|
|
int ResourceIdToInt(const uint8_t *Data);
|
|
bool Send(uint8_t Tag, int SessionId, int ResourceId = 0, int Status = -1);
|
|
cCiSession *GetSessionBySessionId(int SessionId);
|
|
cCiSession *GetSessionByResourceId(int ResourceId, int Slot);
|
|
cCiSession *CreateSession(int ResourceId);
|
|
bool OpenSession(int Length, const uint8_t *Data);
|
|
bool CloseSession(int SessionId);
|
|
int CloseAllSessions(int Slot);
|
|
cCiHandler(int Fd, int NumSlots);
|
|
public:
|
|
~cCiHandler();
|
|
static cCiHandler *CreateCiHandler(const char *FileName);
|
|
int NumSlots(void) { return numSlots; }
|
|
bool Process(void);
|
|
bool HasUserIO(void) { return hasUserIO; }
|
|
bool EnterMenu(int Slot);
|
|
cCiMenu *GetMenu(void);
|
|
cCiEnquiry *GetEnquiry(void);
|
|
const unsigned short *GetCaSystemIds(int Slot);
|
|
bool SetCaPmt(cCiCaPmt &CaPmt, int Slot);
|
|
bool Reset(int Slot);
|
|
};
|
|
|
|
#endif //__CI_H
|