MythTV  master
Classes | Macros | Functions | Variables
tv_play.cpp File Reference
#include "tv_play.h"
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <thread>
#include <QApplication>
#include <QDomDocument>
#include <QDomElement>
#include <QDomNode>
#include <QEvent>
#include <QFile>
#include <QKeyEvent>
#include <QRegExp>
#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 "mythscreenstack.h"
#include "mythscreentype.h"
#include "mythuiactions.h"
#include "DVD/dvdringbuffer.h"
#include "Bluray/bdringbuffer.h"
#include "remoteencoder.h"
#include "tvremoteutil.h"
#include "mythplayer.h"
#include "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 "tvbrowsehelper.h"
#include "playercontext.h"
#include "programtypes.h"
#include "ringbuffer.h"
#include "tv_actions.h"
#include "mythcodeccontext.h"
Include dependency graph for tv_play.cpp:

Go to the source code of this file.

Classes

class  MenuNodeTuple
 

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 GetPlayer(X, Y)   GetPlayerHaveLock(X, Y, __FILE__ , __LINE__)
 
#define GetOSDLock(X)   GetOSDL(X, __FILE__, __LINE__)
 
#define SetOSDText(CTX, GROUP, FIELD, TEXT, TIMEOUT)
 
#define SetOSDMessage(CTX, MESSAGE)   SetOSDText(CTX, "osd_message", "message_text", MESSAGE, kOSDTimeout_Med)
 
#define HideOSDWindow(CTX, 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(c, osd, active, result, (action), (text), "", false, "")
 
#define BUTTON2(action, textActive, textInactive)
 
#define BUTTON3(action, textActive, textInactive, isMenu)
 
#define MINUTE   (60*1000)
 

Functions

static void multi_lock (QMutex *mutex0,...)
 
static QString tv_i18n (const QString &msg)
 
static bool has_action (const QString &action, const QStringList &actions)
 
static bool SysEventHandleAction (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 void format_time (int seconds, QString &tMin, QString &tHrsMin)
 
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 81 of file tv_play.cpp.

◆ DEBUG_CHANNEL_PREFIX

#define DEBUG_CHANNEL_PREFIX   0

set to 1 to debug channel prefixing

Definition at line 84 of file tv_play.cpp.

◆ DEBUG_ACTIONS

#define DEBUG_ACTIONS   0

set to 1 to debug actions

Definition at line 85 of file tv_play.cpp.

◆ LOC

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

Definition at line 87 of file tv_play.cpp.

◆ GetPlayer

#define GetPlayer (   X,
 
)    GetPlayerHaveLock(X, Y, __FILE__ , __LINE__)

Definition at line 89 of file tv_play.cpp.

◆ GetOSDLock

#define GetOSDLock (   X)    GetOSDL(X, __FILE__, __LINE__)

Definition at line 90 of file tv_play.cpp.

◆ SetOSDText

#define SetOSDText (   CTX,
  GROUP,
  FIELD,
  TEXT,
  TIMEOUT 
)
Value:
{ \
OSD *osd_m = GetOSDLock(CTX); \
if (osd_m) \
{ \
InfoMap map; \
map.insert(FIELD,TEXT); \
osd_m->SetText(GROUP, map, TIMEOUT); \
} \
ReturnOSDLock(CTX, osd_m); }
#define TIMEOUT
Definition: dvbci.cpp:70
#define GetOSDLock(X)
Definition: tv_play.cpp:90

Definition at line 92 of file tv_play.cpp.

◆ SetOSDMessage

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

Definition at line 102 of file tv_play.cpp.

◆ HideOSDWindow

#define HideOSDWindow (   CTX,
  WINDOW 
)
Value:
{ \
OSD *osd = GetOSDLock(CTX); \
if (osd) \
osd->HideWindow(WINDOW); \
ReturnOSDLock(CTX, osd); }
#define GetOSDLock(X)
Definition: tv_play.cpp:90

Definition at line 105 of file tv_play.cpp.

◆ TRANSITION

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

Definition at line 2102 of file tv_play.cpp.

◆ SET_NEXT

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

Definition at line 2105 of file tv_play.cpp.

◆ SET_LAST

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

Definition at line 2106 of file tv_play.cpp.

◆ BUTTON

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

Definition at line 10999 of file tv_play.cpp.

◆ BUTTON2

#define BUTTON2 (   action,
  textActive,
  textInactive 
)
Value:
addButton(c, osd, active, result, (action), (textActive), \
(textInactive), false, "")
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:10967

Definition at line 11001 of file tv_play.cpp.

◆ BUTTON3

#define BUTTON3 (   action,
  textActive,
  textInactive,
  isMenu 
)
Value:
addButton(c, osd, active, result, (action), (textActive), \
(textInactive), (isMenu), "")
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:10967

Definition at line 11004 of file tv_play.cpp.

◆ MINUTE

#define MINUTE   (60*1000)

Definition at line 12407 of file tv_play.cpp.

Function Documentation

◆ multi_lock()

static void multi_lock ( QMutex *  mutex0,
  ... 
)
static

◆ tv_i18n()

static QString tv_i18n ( const QString &  msg)
static

Definition at line 2108 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 ( QKeyEvent *  e,
const QStringList &  actions 
)
static

Definition at line 3727 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 7399 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 7606 of file tv_play.cpp.

Referenced by TV::ChangeChannel().

◆ format_time()

static void format_time ( int  seconds,
QString &  tMin,
QString &  tHrsMin 
)
static

Definition at line 8315 of file tv_play.cpp.

Referenced by TV::ShowLCDDVDInfo().

◆ toCommaList()

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

Definition at line 8385 of file tv_play.cpp.

Referenced by MythDB::GetError(), and TV::IsTunableOn().

◆ insert_map()

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

Definition at line 10210 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 10959 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 10967 of file tv_play.cpp.

Referenced by TV::MenuItemDisplayCutlist().

Variable Documentation

◆ dummy_menubase

const MenuBase dummy_menubase
static

Definition at line 173 of file tv_play.cpp.