xbmc
IPlayback.h
1 /*
2  * Copyright (C) 2016-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <string>
12 
13 namespace KODI
14 {
15 namespace RETRO
16 {
17 class IPlayback
18 {
19 public:
20  virtual ~IPlayback() = default;
21 
22  // Lifetime management
23  virtual void Initialize() = 0;
24  virtual void Deinitialize() = 0;
25 
26  // Playback capabilities
27  virtual bool CanPause() const = 0;
28  virtual bool CanSeek() const = 0;
29 
30  // Control playback
31  virtual unsigned int GetTimeMs() const = 0;
32  virtual unsigned int GetTotalTimeMs() const = 0;
33  virtual unsigned int GetCacheTimeMs() const = 0;
34  virtual void SeekTimeMs(unsigned int timeMs) = 0;
35  virtual double GetSpeed() const = 0;
36  virtual void SetSpeed(double speedFactor) = 0;
37  virtual void PauseAsync() = 0; // Pauses after the following frame
38 
39  // Savestates
40  virtual std::string CreateSavestate(
41  bool autosave,
42  const std::string& savestatePath = "") = 0; // Returns the path of savestate on success
43  virtual bool LoadSavestate(const std::string& savestatePath) = 0;
44 };
45 } // namespace RETRO
46 } // namespace KODI
Definition: IPlayback.h:17
Controller configuration window.
Definition: AudioDecoder.h:18