MythTV master
playbackbox.h
Go to the documentation of this file.
1// -*- Mode: c++ -*-
2// vim:set sw=4 ts=4 expandtab:
3#ifndef PLAYBACKBOX_H_
4#define PLAYBACKBOX_H_
5
6// C++ headers
7#include <cstdint> // for [u]int[32,64]_t
8#include <deque>
9#include <utility>
10#include <vector>
11
12// Qt
13#include <QStringList>
14#include <QDateTime>
15#include <QMultiMap>
16#include <QObject>
17#include <QMutex>
18#include <QMap>
19#include <QSet>
20
21// MythTV
23#include "libmythtv/jobqueue.h"
24#include "libmythtv/tv_play.h"
26
27// mythfrontend
28#include "schedulecommon.h"
29#include "programinfocache.h"
30#include "playbackboxhelper.h"
31
32class QKeyEvent;
33class QEvent;
34class QTimer;
35
36class MythPlayer;
37class MythMediaBuffer;
38class ProgramInfo;
39
42class MythUIImage;
43class MythUIText;
44class MythUITextEdit;
45class MythUIButton;
46class MythDialogBox;
47class MythMenu;
49class PlaybackBox;
50
51using ProgramMap = QMap<QString,ProgramList>;
52using Str2StrMap = QMap<QString,QString>;
53using PlaybackBoxCb = void (PlaybackBox::*)();
54
55static constexpr size_t kMaxJobs {7};
56
57static constexpr uint16_t kArtworkFanTimeout { 300 };
58static constexpr uint8_t kArtworkBannerTimeout { 50 };
59static constexpr uint8_t kArtworkCoverTimeout { 50 };
60
62{
63 Q_OBJECT
64 friend class PlaybackBoxListItem;
65 friend class ChangeView;
66
67 public:
68 // ViewType values cannot change; they are stored in the database.
69 enum ViewType : std::uint8_t {
77 ViewTypes = 7, // placeholder value, not in database
78 };
79
80 // Sort function when TitlesOnly. Values are stored in database.
81 enum ViewTitleSort : std::uint8_t {
84 TitleSortMethods = 2, // placeholder value, not in database
85 };
86
88 VIEW_NONE = 0x0000,
89 VIEW_TITLES = 0x0001,
93 VIEW_SEARCHES = 0x0010,
95 // insert new entries above here
96 VIEW_WATCHED = 0x8000
97 };
98
99 enum DeletePopupType : std::uint8_t
100 {
104 };
105
106 enum DeleteFlags : std::uint8_t
107 {
110 kForce = 0x02,
111 kIgnore = 0x04,
113 };
114
115 enum killStateType : std::uint8_t
116 {
119 kDone
120 };
121
122 static std::array<PlaybackBoxCb,kMaxJobs*2> kMySlots;
123
124 PlaybackBox(MythScreenStack *parent, const QString& name,
125 TV *player = nullptr, bool showTV = false);
126 ~PlaybackBox(void) override;
127
128 bool Create(void) override; // MythScreenType
129 void Load(void) override; // MythScreenType
130 void Init(void) override; // MythScreenType
131 bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
132 void customEvent(QEvent *event) override; // ScheduleCommon
133
134 void setInitialRecGroup(const QString& initialGroup) { m_recGroup = initialGroup; }
135 static void * RunPlaybackBox(void *player, bool showTV);
136
137 public slots:
138 void displayRecGroup(const QString &newRecGroup = "");
139 void groupSelectorClosed(void);
140
141 protected slots:
142 void updateRecList(MythUIButtonListItem *sel_item);
145 { UpdateUIListItem(item, true); }
148 void selected(MythUIButtonListItem *item);
149 void updateRecGroup(MythUIButtonListItem *sel_item);
151 void PlayFromAnyMark() { PlayFromAnyMark(nullptr); }
159 void ClearBookmark();
160 void ClearLastPlayPos();
161 void SwitchList(void);
162
163 void ShowGroupPopup(void);
164 void StopSelected(void);
165 void showMetadataEditor();
166 void showGroupFilter();
173 {static_cast<void>(createTranscodingProfilesMenu());}
178 void changeProfileAndTranscode(int id);
179 void showIconHelp();
184 void ShowRecGroupChanger(bool use_playlist = false);
185 void ShowPlayGroupChanger(bool use_playlist = false);
186
187 void popupClosed(const QString& which, int result);
188
189 void doPlayListRandom();
190
191 void askStop();
192
193 void doAllowRerecord();
194
195 void askDelete();
196 void Undelete(void);
200 void DeleteForce(void) { Delete(kForce); }
201 void DeleteIgnore(void) { Delete(kIgnore); }
203 { Delete((DeleteFlags)((int)kForce |(int)kAllRemaining)); }
205 { Delete((DeleteFlags)((int)kIgnore|(int)kAllRemaining)); }
206
208 void ShowAllRecordings();
209
210 void toggleWatched();
211 void toggleAutoExpire();
213
214 void toggleView(PlaybackBox::ViewMask itemMask, bool setOn);
215 void toggleTitleView(bool setOn) { toggleView(VIEW_TITLES, setOn); }
216 void toggleCategoryView(bool setOn) { toggleView(VIEW_CATEGORIES, setOn); }
217 void toggleRecGroupView(bool setOn) { toggleView(VIEW_RECGROUPS, setOn); }
218 void toggleWatchListView(bool setOn) { toggleView(VIEW_WATCHLIST, setOn); }
219 void toggleSearchView(bool setOn) { toggleView(VIEW_SEARCHES, setOn); }
220 void toggleLiveTVView(bool setOn) { toggleView(VIEW_LIVETVGRP, setOn); }
221 void toggleWatchedView(bool setOn) { toggleView(VIEW_WATCHED, setOn); }
222
223 void setGroupFilter(const QString &newRecGroup);
224 void setRecGroup(QString newRecGroup);
225 void setPlayGroup(QString newPlayGroup);
226
227 void saveRecMetadata(const QString &newTitle, const QString &newSubtitle,
228 const QString &newDescription, const QString &newInetref,
229 uint season, uint episode);
230
231 void SetRecGroupPassword(const QString &newPassword);
232
233 void doJobQueueJob(int jobType, int jobFlags = 0);
234 void doPlaylistJobQueueJob(int jobType, int jobFlags = 0);
235 void stopPlaylistJobQueueJob(int jobType);
236 void doBeginFlagging();
237 void doBeginLookup();
259 void doClearPlaylist();
262 void PlaylistDelete(bool forgetHistory = false);
263 void doPlaylistExpireSetting(bool turnOn);
266 void doPlaylistWatchedSetting(bool turnOn);
270 void togglePlayListTitle(void);
271 void togglePlayListItem(void);
272 void playSelectedPlaylist(bool Random);
273 void doPlayList(void);
274 void showViewChanger(void);
275 void saveViewChanges(void);
276
277 void checkPassword(const QString &password);
278 void passwordClosed(void);
279
280 void fanartLoad(void);
281 void bannerLoad(void);
282 void coverartLoad(void);
283
284 private:
285 bool UpdateUILists(void);
286 void UpdateUIGroupList(const QStringList &groupPreferences);
287 void UpdateUIRecGroupList(void);
288 void SelectNextRecGroup(void);
289
291
292 void PlayX(const ProgramInfo &pginfo,
293 bool ignoreBookmark,
294 bool ignoreProgStart,
295 bool ignoreLastPlayPos,
296 bool underNetworkControl);
297
298 bool Play(const ProgramInfo &rec,
299 bool inPlaylist,
300 bool ignoreBookmark,
301 bool ignoreProgStart,
302 bool ignoreLastPlayPos,
303 bool underNetworkControl);
304
305 ProgramInfo *GetCurrentProgram(void) const override; // ScheduleCommon
306
307 void togglePlayListItem(ProgramInfo *pginfo);
309
311 void processNetworkControlCommand(const QString &command);
312
315 const QString& recgroup = "NotLiveTV");
316
317 void RemoveProgram(uint recordingID,
318 bool forgetHistory, bool forceMetadataDelete);
320 static void ShowAvailabilityPopup(const ProgramInfo &pginfo);
321 void ShowActionPopup(const ProgramInfo &pginfo);
322
323 QString getRecGroupPassword(const QString &recGroup);
324 void fillRecGroupPasswordCache(void);
325
326 bool IsUsageUIVisible(void) const;
327
328 void updateIcons(const ProgramInfo *pginfo = nullptr);
329 void UpdateUsageUI(void);
330 void updateGroupInfo(const QString &groupname, const QString &grouplabel);
331
332 void SetItemIcons(MythUIButtonListItem *item, ProgramInfo* pginfo);
333 void UpdateUIListItem(
334 ProgramInfo *pginfo,
335 bool force_preview_reload);
336 void UpdateUIListItem(MythUIButtonListItem *item, bool is_sel,
337 bool force_preview_reload = true);
338
339 void HandlePreviewEvent(const QStringList &list);
340 void HandleRecordingRemoveEvent(uint recordingID);
341 void HandleRecordingAddEvent(const ProgramInfo &evinfo);
342 void HandleUpdateItemEvent(uint recordingId, uint flags);
343
344 void ScheduleUpdateUIList(void);
345 void ShowMenu(void) override; // MythScreenType
346 bool CreatePopupMenu(const QString &title);
347 void DisplayPopupMenu(void);
348 //bool CreatePopupMenu(const QString &title, const ProgramInfo &pginfo)
349 // { return CreatePopupMenu(title + CreateProgramInfoString(pginfo)); }
351
352 static QString CreateProgramInfoString(const ProgramInfo &pginfo) ;
353
354 QString extract_job_state(const ProgramInfo &pginfo);
355 QString extract_commflag_state(const ProgramInfo &pginfo);
356
357
362
364
366
369
371 constexpr static int kNumArtImages = 3;
372 std::array<MythUIImage*,kNumArtImages> m_artImage {};
373 std::array<QTimer*,kNumArtImages> m_artTimer {};
374
376
377 // Settings ///////////////////////////////////////////////////////////////
379 bool m_titleView {false};
381 bool m_useCategories {false};
383 bool m_useRecGroups {false};
385 bool m_watchListStart {false};
391 std::chrono::hours m_watchListBlackOut {std::chrono::days(2)};
395 int m_listOrder {1};
396
397 // Group alphabet support
399 QMap<QString, QString> m_groupAlphabet;
400
401 // Recording Group settings
403 QString m_recGroup;
409
410 // Popup support //////////////////////////////////////////////////////////
411 // General popup support
415
416 bool m_doToggleMenu {true};
417
418 // Recording Group popup support
419 using RecGroup = QPair<QString, QString>;
420 QMap<QString,QString> m_recGroupType;
421 QMap<QString,QString> m_recGroupPwCache;
422
423 // State Variables ////////////////////////////////////////////////////////
424 // Main Recording List support
425 QStringList m_titleList;
427 int m_progsInDB {0};
428 bool m_isFilling {false};
429
430 QStringList m_recGroups;
431 mutable QMutex m_recGroupsLock;
433
434 // Other state
436 QStringList m_delList;
439
440 // Play List support
441 QList<uint> m_playList;
442 bool m_opOnPlaylist {false};
443 QList<uint> m_playListPlay;
444
446
448 bool m_playingSomething {false};
449
451 bool m_needUpdate {false};
452
453 // Selection state variables
454 bool m_haveGroupInfoSet {false};
455
456 // Network Control Variables //////////////////////////////////////////////
457 mutable QMutex m_ncLock;
458 std::deque<QString> m_networkControlCommands;
459
460 // Other
461 TV *m_player {nullptr};
466 QSet<QString> m_previewTokens;
467
468 bool m_firstGroup {true};
470 bool m_groupSelected {false};
471 bool m_passwordEntered {false};
472
474 // This class caches the contents of the jobqueue table to avoid excessive
475 // DB queries each time the PBB selection changes (currently 4 queries per
476 // displayed item). The cache remains valid for 15 seconds
477 // (kInvalidateTimeMs).
479 {
480 public:
482 bool IsJobQueued(int jobType, uint chanid,
483 const QDateTime &recstartts);
484 bool IsJobRunning(int jobType, uint chanid,
485 const QDateTime &recstartts);
486 bool IsJobQueuedOrRunning(int jobType, uint chanid,
487 const QDateTime &recstartts);
488 private:
489 static constexpr std::chrono::milliseconds kInvalidateTimeMs { 15s };
490 void Update();
491 QDateTime m_lastUpdated;
492 // Maps <chanid, recstartts> to a set of JobQueueEntry values.
493 using MapType = QMultiMap<QPair<uint, QDateTime>, JobQueueEntry>;
496};
497
499{
500 Q_OBJECT
501
502 public:
503 GroupSelector(MythScreenStack *lparent, QString label,
504 QStringList list, QStringList data,
505 QString selected)
506 : MythScreenType(lparent, "groupselector"), m_label(std::move(label)),
507 m_list(std::move(list)), m_data(std::move(data)),
508 m_selected(std::move(selected)) {}
509
510 bool Create(void) override; // MythScreenType
511
512 signals:
513 void result(QString);
514
515 protected slots:
517
518 private:
519 void loadGroups(void);
520
521 QString m_label;
522 QStringList m_list;
523 QStringList m_data;
524 QString m_selected;
525};
526
528{
529 Q_OBJECT
530
531 public:
532 ChangeView(MythScreenStack *lparent, PlaybackBox *parentScreen,
533 int viewMask)
534 : MythScreenType(lparent, "changeview"),
535 m_parentScreen(parentScreen), m_viewMask(viewMask) {}
536
537 bool Create(void) override; // MythScreenType
538
539 signals:
540 void save();
541
542 protected slots:
543 void SaveChanges(void);
544
545 private:
548};
549
551{
552 Q_OBJECT
553
554 public:
555 PasswordChange(MythScreenStack *lparent, QString oldpassword)
556 : MythScreenType(lparent, "passwordchanger"),
557 m_oldPassword(std::move(oldpassword)){}
558
559 bool Create(void) override; // MythScreenType
560
561 signals:
562 void result(const QString &);
563
564 protected slots:
565 void OldPasswordChanged(void);
566 void SendResult(void);
567
568 private:
572
574};
575
577{
578 Q_OBJECT
579
580 public:
582
583 bool Create(void) override; // MythScreenType
584
585 signals:
586 void result(const QString &, const QString &, const QString &,
587 const QString &, uint, uint);
588
589 protected slots:
590 void SaveChanges(void);
591 void ClearInetref();
592 void PerformQuery(void);
594
595 private:
596 void customEvent(QEvent *event) override; // MythUIType
597 void QueryComplete(MetadataLookup *lookup);
598
607
611};
612
614{
615 Q_OBJECT
616
617 public:
618 explicit HelpPopup(MythScreenStack *lparent)
619 : MythScreenType(lparent, "helppopup") {}
620
621 bool Create(void) override; // MythScreenType
622
623 private:
624 void addItem(const QString &state, const QString &text);
625
627};
628
629#endif
630/* vim: set expandtab tabstop=4 shiftwidth=4: */
bool Create(void) override
PlaybackBox * m_parentScreen
Definition: playbackbox.h:546
int m_viewMask
Definition: playbackbox.h:547
void save()
void SaveChanges(void)
ChangeView(MythScreenStack *lparent, PlaybackBox *parentScreen, int viewMask)
Definition: playbackbox.h:532
void loadGroups(void)
GroupSelector(MythScreenStack *lparent, QString label, QStringList list, QStringList data, QString selected)
Definition: playbackbox.h:503
QStringList m_data
Definition: playbackbox.h:523
QString m_selected
Definition: playbackbox.h:524
bool Create(void) override
QString m_label
Definition: playbackbox.h:521
void AcceptItem(MythUIButtonListItem *item)
QStringList m_list
Definition: playbackbox.h:522
void result(QString)
HelpPopup(MythScreenStack *lparent)
Definition: playbackbox.h:618
bool Create(void) override
MythUIButtonList * m_iconList
Definition: playbackbox.h:626
void addItem(const QString &state, const QString &text)
Basic menu dialog, message and a list of options.
Screen in which all other widgets are contained and rendered.
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
A single button widget.
Definition: mythuibutton.h:22
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
Progress bar widget.
A widget for offering a range of numerical values where only the the bounding values and interval are...
Definition: mythuispinbox.h:23
A text entry and edit widget.
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
void SendResult(void)
MythUIButton * m_okButton
Definition: playbackbox.h:571
MythUITextEdit * m_newPasswordEdit
Definition: playbackbox.h:570
bool Create(void) override
MythUITextEdit * m_oldPasswordEdit
Definition: playbackbox.h:569
void OldPasswordChanged(void)
void result(const QString &)
PasswordChange(MythScreenStack *lparent, QString oldpassword)
Definition: playbackbox.h:555
QString m_oldPassword
Definition: playbackbox.h:573
bool IsJobQueued(int jobType, uint chanid, const QDateTime &recstartts)
static constexpr std::chrono::milliseconds kInvalidateTimeMs
Definition: playbackbox.h:489
bool IsJobRunning(int jobType, uint chanid, const QDateTime &recstartts)
bool IsJobQueuedOrRunning(int jobType, uint chanid, const QDateTime &recstartts)
QMultiMap< QPair< uint, QDateTime >, JobQueueEntry > MapType
Definition: playbackbox.h:493
void stopPlaylistUserJob2()
Definition: playbackbox.h:254
bool m_opOnPlaylist
Definition: playbackbox.h:442
bool CreatePopupMenuPlaylist(void)
MythUIImage * m_previewImage
Definition: playbackbox.h:365
void UpdateUIGroupList(const QStringList &groupPreferences)
~PlaybackBox(void) override
void setRecGroup(QString newRecGroup)
void stopPlaylistUserJob4()
Definition: playbackbox.h:258
QList< uint > m_playList
list of selected items "play list"
Definition: playbackbox.h:441
void changeProfileAndTranscode(int id)
QString extract_commflag_state(const ProgramInfo &pginfo)
void showGroupFilter()
void doPlaylistBeginUserJob4()
Definition: playbackbox.h:257
void toggleLiveTVView(bool setOn)
Definition: playbackbox.h:220
bool CreatePopupMenu(const QString &title)
std::array< QTimer *, kNumArtImages > m_artTimer
Definition: playbackbox.h:373
QString extract_job_state(const ProgramInfo &pginfo)
void ClearBookmark()
void doPlaylistBeginUserJob3()
Definition: playbackbox.h:255
static std::array< PlaybackBoxCb, kMaxJobs *2 > kMySlots
Definition: playbackbox.h:122
QPair< QString, QString > RecGroup
Definition: playbackbox.h:419
bool Create(void) override
void doPlaylistBeginUserJob2()
Definition: playbackbox.h:253
void toggleWatched()
void ShowActionPopup(const ProgramInfo &pginfo)
void saveViewChanges(void)
bool m_playingSomething
playingSomething is set to true iff a full screen recording is playing
Definition: playbackbox.h:448
void toggleAutoExpire()
void toggleTitleView(bool setOn)
Definition: playbackbox.h:215
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
bool IsUsageUIVisible(void) const
void updateRecGroup(MythUIButtonListItem *sel_item)
void stopPlaylistFlagging()
Definition: playbackbox.h:248
ViewMask m_viewMask
Definition: playbackbox.h:408
bool m_isFilling
Definition: playbackbox.h:428
void SelectNextRecGroup(void)
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
QString m_watchGroupLabel
Definition: playbackbox.h:407
bool m_firstGroup
Definition: playbackbox.h:468
int m_allOrder
allOrder controls the ordering of the "All Programs" list
Definition: playbackbox.h:393
void ShowRecordedEpisodes()
void HandleRecordingAddEvent(const ProgramInfo &evinfo)
void ScheduleUpdateUIList(void)
void toggleWatchedView(bool setOn)
Definition: playbackbox.h:221
void ItemLoaded(MythUIButtonListItem *item)
void randomizePlayList(void)
void customEvent(QEvent *event) override
void PlaylistDelete(bool forgetHistory=false)
void doPlaylistWatchedSetOff()
Definition: playbackbox.h:268
void doPlaylistJobQueueJob(int jobType, int jobFlags=0)
void doBeginUserJob2()
Definition: playbackbox.h:241
void ItemVisible(MythUIButtonListItem *item)
void UpdateUIRecGroupList(void)
void saveRecMetadata(const QString &newTitle, const QString &newSubtitle, const QString &newDescription, const QString &newInetref, uint season, uint episode)
void PlayFromBeginning()
Definition: playbackbox.h:155
void ItemSelected(MythUIButtonListItem *item)
Definition: playbackbox.h:144
MythMenu * m_popupMenu
Definition: playbackbox.h:413
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
void DeleteIgnoreAllRemaining(void)
Definition: playbackbox.h:204
void toggleCategoryView(bool setOn)
Definition: playbackbox.h:216
void ShowDeletePopup(DeletePopupType type)
void Delete()
Definition: playbackbox.h:198
bool m_titleView
titleView controls showing titles in group list
Definition: playbackbox.h:379
bool m_passwordEntered
Definition: playbackbox.h:471
void ShowGroupPopup(void)
@ TitlesCategoriesRecGroups
Definition: playbackbox.h:72
@ CategoriesRecGroups
Definition: playbackbox.h:75
@ TitlesCategories
Definition: playbackbox.h:71
QString m_newRecGroup
Definition: playbackbox.h:405
void stopPlaylistLookup()
Definition: playbackbox.h:250
QStringList m_playerSelectedNewShow
Definition: playbackbox.h:462
void doBeginUserJob3()
Definition: playbackbox.h:242
std::chrono::hours m_watchListBlackOut
adjust exclusion of a title from the Watch List after a delete
Definition: playbackbox.h:391
void doPlaylistExpireSetOn()
Definition: playbackbox.h:264
MythMenu * createStorageMenu()
QStringList m_delList
Recording[s] currently selected for deletion.
Definition: playbackbox.h:436
void ShowRecGroupChanger(bool use_playlist=false)
Used to change the recording group of a program or playlist.
ProgramInfo * FindProgramInUILists(const ProgramInfo &pginfo)
InfoMap m_currentMap
Definition: playbackbox.h:375
void showViewChanger(void)
void stopPlaylistUserJob3()
Definition: playbackbox.h:256
void togglePlayListItem(void)
MythUIProgressBar * m_watchedProgress
Definition: playbackbox.h:368
void askDelete()
static QString CreateProgramInfoString(const ProgramInfo &pginfo)
QSet< QString > m_previewTokens
Outstanding preview image requests.
Definition: playbackbox.h:466
bool m_needUpdate
Does the recording list need to be refilled.
Definition: playbackbox.h:451
MythUIProgressBar * m_recordedProgress
Definition: playbackbox.h:367
void selected(MythUIButtonListItem *item)
void DeleteForceAllRemaining(void)
Definition: playbackbox.h:202
void doPlayListRandom()
void processNetworkControlCommand(const QString &command)
MythMenu * createTranscodingProfilesMenu()
class PlaybackBox::PbbJobQueue m_jobQueue
void doBeginTranscoding()
Definition: playbackbox.h:238
QString m_currentLetter
Definition: playbackbox.h:398
void stopPlaylistUserJob1()
Definition: playbackbox.h:252
void SwitchList(void)
bool m_haveGroupInfoSet
Definition: playbackbox.h:454
void stopPlaylistJobQueueJob(int jobType)
int m_progsInDB
total number of recordings in DB
Definition: playbackbox.h:427
void doPlaylistBeginUserJob1()
Definition: playbackbox.h:251
void doBeginFlagging()
ProgramMap m_progLists
lists of programs by page
Definition: playbackbox.h:426
QStringList m_titleList
list of pages
Definition: playbackbox.h:425
void updateRecList(MythUIButtonListItem *sel_item)
void doBeginUserJob4()
Definition: playbackbox.h:243
MythMenu * createRecordingMenu()
static void * RunPlaybackBox(void *player, bool showTV)
MythUIText * m_noRecordingsText
Definition: playbackbox.h:363
MythScreenStack * m_popupStack
Definition: playbackbox.h:414
MythMenu * createPlaylistJobMenu()
QString m_watchGroupName
Definition: playbackbox.h:406
void displayRecGroup(const QString &newRecGroup="")
static constexpr int kNumArtImages
Definition: playbackbox.h:371
QList< uint > m_playListPlay
list of items being played.
Definition: playbackbox.h:443
QStringList m_recGroups
Definition: playbackbox.h:430
void toggleRecGroupView(bool setOn)
Definition: playbackbox.h:217
void showRecGroupPasswordChanger()
void PlayFromAnyMark()
Definition: playbackbox.h:151
int m_watchListMaxAge
add 1 to the Watch List scord up to this many days
Definition: playbackbox.h:389
void Undelete(void)
void PlayFromBookmark()
Definition: playbackbox.h:153
void doPlaylistExpireSetting(bool turnOn)
void setGroupFilter(const QString &newRecGroup)
void PlaylistDeleteForgetHistory(void)
Definition: playbackbox.h:260
void doAllowRerecord()
Callback function when Allow Re-record is pressed in Watch Recordings.
void StopSelected(void)
void doPlaylistWatchedSetOn()
Definition: playbackbox.h:267
bool m_doToggleMenu
Definition: playbackbox.h:416
std::deque< QString > m_networkControlCommands
Definition: playbackbox.h:458
void RemoveProgram(uint recordingID, bool forgetHistory, bool forceMetadataDelete)
void showMetadataEditor()
void deleteSelected(MythUIButtonListItem *item)
void ClearLastPlayPos()
MythDialogBox * m_menuDialog
Definition: playbackbox.h:412
void popupClosed(const QString &which, int result)
void UpdateProgressBar(void)
void showIconHelp()
void toggleWatchListView(bool setOn)
Definition: playbackbox.h:218
void groupSelectorClosed(void)
void togglePreserveEpisode()
void DeleteForce(void)
Definition: playbackbox.h:200
void PlayFromLastPlayPos()
Definition: playbackbox.h:157
void fanartLoad(void)
QString m_currentGroup
Group currently selected.
Definition: playbackbox.h:438
void doJobQueueJob(int jobType, int jobFlags=0)
void togglePlayListTitle(void)
void ShowAllRecordings()
void doPlaylistBeginLookup()
Definition: playbackbox.h:249
bool m_groupSelected
Definition: playbackbox.h:470
QString m_recGroup
Definition: playbackbox.h:403
MythMenu * createPlaylistStorageMenu()
void ShowPlayGroupChanger(bool use_playlist=false)
Used to change the play group of a program or playlist.
bool m_watchListStart
use the Watch List as the initial view
Definition: playbackbox.h:385
PlaybackBox(MythScreenStack *parent, const QString &name, TV *player=nullptr, bool showTV=false)
MythMenu * createPlayFromMenu()
std::array< MythUIImage *, kNumArtImages > m_artImage
Definition: playbackbox.h:372
void DeleteIgnore(void)
Definition: playbackbox.h:201
QString m_curGroupPassword
Definition: playbackbox.h:404
MythUIButtonList * m_recordingList
Definition: playbackbox.h:361
void HandleRecordingRemoveEvent(uint recordingID)
void ShowPlayGroupChangerNoPlaylist(void)
Definition: playbackbox.h:183
ProgramInfoCache m_programInfoCache
Definition: playbackbox.h:445
void doClearPlaylist()
MythUIButtonList * m_groupList
Definition: playbackbox.h:360
void ShowRecGroupChangerNoPlaylist(void)
Definition: playbackbox.h:181
QMap< QString, QString > m_recGroupPwCache
Definition: playbackbox.h:421
MythMenu * createPlaylistMenu()
void doBeginUserJob1()
Definition: playbackbox.h:240
void checkPassword(const QString &password)
bool m_watchListAutoExpire
exclude recording not marked for auto-expire from the Watch List
Definition: playbackbox.h:387
QString getRecGroupPassword(const QString &recGroup)
@ TitleSortAlphabetical
Definition: playbackbox.h:82
@ TitleSortMethods
Definition: playbackbox.h:84
@ TitleSortRecPriority
Definition: playbackbox.h:83
void SetItemIcons(MythUIButtonListItem *item, ProgramInfo *pginfo)
void toggleSearchView(bool setOn)
Definition: playbackbox.h:219
bool Play(const ProgramInfo &rec, bool inPlaylist, bool ignoreBookmark, bool ignoreProgStart, bool ignoreLastPlayPos, bool underNetworkControl)
void playSelectedPlaylist(bool Random)
void PlayX(const ProgramInfo &pginfo, bool ignoreBookmark, bool ignoreProgStart, bool ignoreLastPlayPos, bool underNetworkControl)
void stopPlaylistTranscoding()
Definition: playbackbox.h:246
MythUIButtonList * m_groupAlphaList
Definition: playbackbox.h:359
void doPlaylistBeginFlagging()
Definition: playbackbox.h:247
void ShowRecGroupChangerUsePlaylist(void)
Definition: playbackbox.h:180
void processNetworkControlCommands(void)
void fillRecGroupPasswordCache(void)
void UpdateUIListItem(ProgramInfo *pginfo, bool force_preview_reload)
bool UpdateUILists(void)
bool m_useCategories
useCategories controls showing categories in group list
Definition: playbackbox.h:381
MythUIButtonList * m_recgroupList
Definition: playbackbox.h:358
void selectUIGroupsAlphabet(MythUIButtonListItem *item)
void doPlaylistBeginTranscoding()
Definition: playbackbox.h:244
void passwordClosed(void)
QMap< QString, QString > m_recGroupType
Definition: playbackbox.h:420
QMutex m_ncLock
Definition: playbackbox.h:457
void UpdateUsageUI(void)
void coverartLoad(void)
void ShowPlayGroupChangerUsePlaylist(void)
Definition: playbackbox.h:182
bool m_alwaysShowWatchedProgress
Definition: playbackbox.h:473
void updateGroupInfo(const QString &groupname, const QString &grouplabel)
QMutex m_recGroupsLock
Definition: playbackbox.h:431
void setInitialRecGroup(const QString &initialGroup)
Definition: playbackbox.h:134
void DeleteForgetHistory(void)
Definition: playbackbox.h:199
PlaybackBoxHelper m_helper
Main helper thread.
Definition: playbackbox.h:464
bool m_useRecGroups
useRecGroups controls showing of recording groups in group list
Definition: playbackbox.h:383
ProgramInfo * GetCurrentProgram(void) const override
void doPlaylistAllowRerecord()
void HandlePreviewEvent(const QStringList &list)
Updates the UI properties for a new preview file.
static void ShowAvailabilityPopup(const ProgramInfo &pginfo)
void doPlayList(void)
void ShowMenu(void) override
void doPlaylistWatchedSetting(bool turnOn)
void doPlaylistExpireSetOff()
Definition: playbackbox.h:265
void doCreateTranscodingProfilesMenu()
Definition: playbackbox.h:172
QString m_artHostOverride
Definition: playbackbox.h:370
bool m_usingGroupSelector
Definition: playbackbox.h:469
void toggleView(PlaybackBox::ViewMask itemMask, bool setOn)
void setPlayGroup(QString newPlayGroup)
void updateIcons(const ProgramInfo *pginfo=nullptr)
void DisplayPopupMenu(void)
@ kForceDeleteRecording
Definition: playbackbox.h:103
int m_recGroupIdx
Definition: playbackbox.h:432
QString m_groupDisplayName
Definition: playbackbox.h:402
void doBeginLookup()
void bannerLoad(void)
void PlaylistDeleteKeepHistory(void)
Definition: playbackbox.h:261
QMap< QString, QString > m_groupAlphabet
Definition: playbackbox.h:399
MythMenu * createJobMenu()
int m_listOrder
listOrder controls the ordering of the recordings in the list
Definition: playbackbox.h:395
void HandleUpdateItemEvent(uint recordingId, uint flags)
void SetRecGroupPassword(const QString &newPassword)
Holds information on recordings and videos.
Definition: programinfo.h:68
MythUITextEdit * m_titleEdit
Definition: playbackbox.h:599
void result(const QString &, const QString &, const QString &, const QString &, uint, uint)
void OnSearchListSelection(const RefCountHandler< MetadataLookup > &lookup)
RecMetadataEdit(MythScreenStack *lparent, ProgramInfo *pginfo)
MetadataFactory * m_metadataFactory
Definition: playbackbox.h:610
MythUIButton * m_queryButton
Definition: playbackbox.h:606
void SaveChanges(void)
void QueryComplete(MetadataLookup *lookup)
ProgramInfo * m_progInfo
Definition: playbackbox.h:608
MythUISpinBox * m_seasonSpin
Definition: playbackbox.h:603
bool Create(void) override
void customEvent(QEvent *event) override
void PerformQuery(void)
MythScreenStack * m_popupStack
Definition: playbackbox.h:609
MythUITextEdit * m_descriptionEdit
Definition: playbackbox.h:601
MythUITextEdit * m_subtitleEdit
Definition: playbackbox.h:600
MythUIBusyDialog * m_busyPopup
Definition: playbackbox.h:605
MythUITextEdit * m_inetrefEdit
Definition: playbackbox.h:602
MythUISpinBox * m_episodeSpin
Definition: playbackbox.h:604
Control TV playback.
Definition: tv_play.h:156
unsigned int uint
Definition: freesurround.h:24
unsigned short uint16_t
Definition: iso6937tables.h:3
@ JOB_USERJOB3
Definition: jobqueue.h:86
@ JOB_METADATA
Definition: jobqueue.h:80
@ JOB_USERJOB1
Definition: jobqueue.h:84
@ JOB_USERJOB2
Definition: jobqueue.h:85
@ JOB_COMMFLAG
Definition: jobqueue.h:79
@ JOB_USERJOB4
Definition: jobqueue.h:87
@ JOB_TRANSCODE
Definition: jobqueue.h:78
@ JOB_USE_CUTLIST
Definition: jobqueue.h:60
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
duration< CHRONO_TYPE, ratio< 86400 > > days
Definition: mythchrono.h:25
STL namespace.
QMap< QString, ProgramList > ProgramMap
Definition: playbackbox.h:51
void(PlaybackBox::*)() PlaybackBoxCb
Definition: playbackbox.h:53
static constexpr uint8_t kArtworkCoverTimeout
Definition: playbackbox.h:59
QMap< QString, QString > Str2StrMap
Definition: playbackbox.h:52
static constexpr uint8_t kArtworkBannerTimeout
Definition: playbackbox.h:58
static constexpr size_t kMaxJobs
Definition: playbackbox.h:55
static constexpr uint16_t kArtworkFanTimeout
Definition: playbackbox.h:57