[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / pvr / guilib / PVRGUIRecordingsPlayActionProcessor.h
blobeb1839b48362dd87e3ad10c433239a1180607f60
1 /*
2 * Copyright (C) 2023 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "FileItem.h"
12 #include "ServiceBroker.h"
13 #include "pvr/PVRManager.h"
14 #include "pvr/guilib/PVRGUIActionsPlayback.h"
15 #include "video/guilib/VideoPlayActionProcessor.h"
17 namespace PVR
19 class CGUIPVRRecordingsPlayActionProcessor
20 : public KODI::VIDEO::GUILIB::CVideoPlayActionProcessorBase
22 public:
23 explicit CGUIPVRRecordingsPlayActionProcessor(const std::shared_ptr<CFileItem>& item)
24 : CVideoPlayActionProcessorBase(item)
28 protected:
29 bool OnResumeSelected() override
31 m_item->SetStartOffset(STARTOFFSET_RESUME);
32 Play();
33 return true;
36 bool OnPlaySelected() override
38 Play();
39 return true;
42 private:
43 void Play()
45 CServiceBroker::GetPVRManager().Get<PVR::GUI::Playback>().PlayRecording(
46 *m_item, false /* no resume check */);
49 } // namespace PVR