MythTV  master
Classes | Macros | Functions | Variables
tv_play.cpp File Reference
#include <QApplication>
#include <QDomDocument>
#include <QDomElement>
#include <QDomNode>
#include <QEvent>
#include <QFile>
#include <QKeyEvent>
#include <QRegExp>
#include <QRegularExpression>
#include <QRunnable>
#include <QTimerEvent>
#include <utility>
#include "mythconfig.h"
#include "mthreadpool.h"
#include "signalhandling.h"
#include "mythdb.h"
#include "mythcorecontext.h"
#include "mythlogging.h"
#include "lcddevice.h"
#include "compat.h"
#include "mythdirs.h"
#include "mythmedia.h"
#include "programinfo.h"
#include "remoteutil.h"
#include "mythuistatetracker.h"
#include "mythuihelper.h"
#include "mythdialogbox.h"
#include "mythmainwindow.h"
#include "mythmiscutil.h"
#include "mythscreenstack.h"
#include "mythscreentype.h"
#include "mythuiactions.h"
#include "DVD/mythdvdplayer.h"
#include "Bluray/mythbdplayer.h"
#include "DVD/mythdvdbuffer.h"
#include "Bluray/mythbdbuffer.h"
#include "remoteencoder.h"
#include "tvremoteutil.h"
#include "mythplayerui.h"
#include "captions/subtitlescreen.h"
#include "DetectLetterbox.h"
#include "jobqueue.h"
#include "livetvchain.h"
#include "playgroup.h"
#include "sourceutil.h"
#include "cardutil.h"
#include "channelutil.h"
#include "tv_play_win.h"
#include "recordinginfo.h"
#include "signalmonitorvalue.h"
#include "recordingrule.h"
#include "mythsystemevent.h"
#include "videometadatautil.h"
#include "playercontext.h"
#include "programtypes.h"
#include "io/mythmediabuffer.h"
#include "tv_actions.h"
#include "mythcodeccontext.h"
#include "tv_play.h"
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <thread>
Include dependency graph for tv_play.cpp:

Go to the source code of this file.

Classes

class  MenuNodeTuple
 
class  TV::SleepTimerInfo
 

Macros

#define round(x)   ((int) ((x) + 0.5))
 
#define DEBUG_CHANNEL_PREFIX   0
 set to 1 to debug channel prefixing More...
 
#define DEBUG_ACTIONS   0
 set to 1 to debug actions
More...
 
#define LOC   QString("TV::%1(): ").arg(__func__)
 
#define SetOSDText(GROUP, FIELD, TEXT, TIMEOUT)
 
#define SetOSDMessage(MESSAGE)    SetOSDText("osd_message", "message_text", MESSAGE, kOSDTimeout_Med)
 
#define HideOSDWindow(WINDOW)
 
#define TRANSITION(ASTATE, BSTATE)   ((ctxState == (ASTATE)) && (desiredNextState == (BSTATE)))
 
#define SET_NEXT()   do { nextState = desiredNextState; changed = true; } while(false)
 
#define SET_LAST()   do { nextState = ctxState; changed = true; } while(false)
 
#define BUTTON(action, text)    addButton(Context, osd, active, result, (action), (text), "", false, "")
 
#define BUTTON2(action, textActive, textInactive)
 
#define BUTTON3(action, textActive, textInactive, isMenu)
 
#define MINUTE   (60*1000)
 

Functions

static QString tv_i18n (const QString &msg)
 
static bool has_action (const QString &action, const QStringList &actions)
 
static bool SysEventHandleAction (MythMainWindow *MainWindow, QKeyEvent *e, const QStringList &actions)
 
static QString add_spacer (const QString &chan, const QString &spacer)
 
static uint get_chanid (const PlayerContext *ctx, uint cardid, const QString &channum)
 
static QString toCommaList (const QSet< uint > &list)
 
static void insert_map (InfoMap &infoMap, const InfoMap &newMap)
 
static bool matchesGroup (const QString &name, const QString &inPrefix, MenuCategory category, QString &outPrefix)
 
static void addButton (const MenuItemContext &c, OSD *osd, bool active, bool &result, const QString &action, const QString &defaultTextActive, const QString &defaultTextInactive, bool isMenu, const QString &textArg)
 

Variables

static const MenuBase dummy_menubase
 

Macro Definition Documentation

◆ round

#define round (   x)    ((int) ((x) + 0.5))

Definition at line 82 of file tv_play.cpp.

◆ DEBUG_CHANNEL_PREFIX

#define DEBUG_CHANNEL_PREFIX   0

set to 1 to debug channel prefixing

Definition at line 85 of file tv_play.cpp.

◆ DEBUG_ACTIONS

#define DEBUG_ACTIONS   0

set to 1 to debug actions

Definition at line 86 of file tv_play.cpp.

◆ LOC

#define LOC   QString("TV::%1(): ").arg(__func__)

Definition at line 88 of file tv_play.cpp.

◆ SetOSDText

#define SetOSDText (   GROUP,
  FIELD,
  TEXT,
  TIMEOUT 
)
Value:
{ \
OSD *osd_m = GetOSDL(); \
if (osd_m) \
{ \
InfoMap map; \
map.insert(FIELD,TEXT); \
osd_m->SetText(GROUP, map, TIMEOUT); \
} \
ReturnOSDLock(); }

Definition at line 90 of file tv_play.cpp.

◆ SetOSDMessage

#define SetOSDMessage (   MESSAGE)     SetOSDText("osd_message", "message_text", MESSAGE, kOSDTimeout_Med)

Definition at line 100 of file tv_play.cpp.

◆ HideOSDWindow

#define HideOSDWindow (   WINDOW)
Value:
{ \
OSD *osd = GetOSDL(); \
if (osd) \
osd->HideWindow(WINDOW); \
ReturnOSDLock(); }

Definition at line 103 of file tv_play.cpp.

◆ TRANSITION

#define TRANSITION (   ASTATE,
  BSTATE 
)    ((ctxState == (ASTATE)) && (desiredNextState == (BSTATE)))

Definition at line 1993 of file tv_play.cpp.

◆ SET_NEXT

#define SET_NEXT ( )    do { nextState = desiredNextState; changed = true; } while(false)

Definition at line 1995 of file tv_play.cpp.

◆ SET_LAST

#define SET_LAST ( )    do { nextState = ctxState; changed = true; } while(false)

Definition at line 1996 of file tv_play.cpp.

◆ BUTTON

#define BUTTON (   action,
  text 
)     addButton(Context, osd, active, result, (action), (text), "", false, "")

Definition at line 9378 of file tv_play.cpp.

◆ BUTTON2

#define BUTTON2 (   action,
  textActive,
  textInactive 
)
Value:
addButton(Context, osd, active, result, (action), (textActive), \
(textInactive), false, "")

Definition at line 9380 of file tv_play.cpp.

◆ BUTTON3

#define BUTTON3 (   action,
  textActive,
  textInactive,
  isMenu 
)
Value:
addButton(Context, osd, active, result, (action), (textActive), \
(textInactive), (isMenu), "")

Definition at line 9383 of file tv_play.cpp.

◆ MINUTE

#define MINUTE   (60*1000)

Definition at line 10598 of file tv_play.cpp.

Function Documentation

◆ tv_i18n()

static QString tv_i18n ( const QString &  msg)
static

Definition at line 1998 of file tv_play.cpp.

Referenced by TV::HandleStateChange().

◆ has_action()

static bool has_action ( const QString &  action,
const QStringList &  actions 
)
static

◆ SysEventHandleAction()

static bool SysEventHandleAction ( MythMainWindow MainWindow,
QKeyEvent *  e,
const QStringList &  actions 
)
static

Definition at line 3304 of file tv_play.cpp.

Referenced by TV::ProcessKeypressOrGesture().

◆ add_spacer()

static QString add_spacer ( const QString &  chan,
const QString &  spacer 
)
static

Definition at line 6073 of file tv_play.cpp.

Referenced by TV::ChangeChannel(), and TV::ProcessSmartChannel().

◆ get_chanid()

static uint get_chanid ( const PlayerContext ctx,
uint  cardid,
const QString &  channum 
)
static

Definition at line 6274 of file tv_play.cpp.

Referenced by TV::ChangeChannel().

◆ toCommaList()

static QString toCommaList ( const QSet< uint > &  list)
static

Definition at line 7033 of file tv_play.cpp.

Referenced by TV::IsTunableOn().

◆ insert_map()

static void insert_map ( InfoMap infoMap,
const InfoMap newMap 
)
static

Definition at line 8611 of file tv_play.cpp.

Referenced by TV::HandleOSDChannelEdit().

◆ matchesGroup()

static bool matchesGroup ( const QString &  name,
const QString &  inPrefix,
MenuCategory  category,
QString &  outPrefix 
)
static

Definition at line 9338 of file tv_play.cpp.

Referenced by TV::MenuItemDisplayPlayback().

◆ addButton()

static void addButton ( const MenuItemContext c,
OSD osd,
bool  active,
bool result,
const QString &  action,
const QString &  defaultTextActive,
const QString &  defaultTextInactive,
bool  isMenu,
const QString &  textArg 
)
static

Definition at line 9346 of file tv_play.cpp.

Referenced by TV::MenuItemDisplayCutlist().

Variable Documentation

◆ dummy_menubase

const MenuBase dummy_menubase
static

Definition at line 166 of file tv_play.cpp.

Context
QHash< QString, Action * > Context
Definition: action.h:77
addButton
static void addButton(const MenuItemContext &c, OSD *osd, bool active, bool &result, const QString &action, const QString &defaultTextActive, const QString &defaultTextInactive, bool isMenu, const QString &textArg)
Definition: tv_play.cpp:9346
build_compdb.action
action
Definition: build_compdb.py:9
TIMEOUT
#define TIMEOUT
Definition: dvbci.cpp:70