xbmc
GameClientStreamVideo.h
1 /*
2  * Copyright (C) 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 "IGameClientStream.h"
12 
14 
15 namespace KODI
16 {
17 namespace RETRO
18 {
19 class IRetroPlayerStream;
20 struct VideoStreamProperties;
21 } // namespace RETRO
22 
23 namespace GAME
24 {
25 
27 {
28 public:
29  CGameClientStreamVideo() = default;
30  ~CGameClientStreamVideo() override { CloseStream(); }
31 
32  // Implementation of IGameClientStream
33  bool OpenStream(RETRO::IRetroPlayerStream* stream,
34  const game_stream_properties& properties) override;
35  void CloseStream() override;
36  void AddData(const game_stream_packet& packet) override;
37 
38 protected:
39  // Stream parameters
40  RETRO::IRetroPlayerStream* m_stream = nullptr;
41 
42 private:
43  // Utility functions
44  static RETRO::VideoStreamProperties* TranslateProperties(
45  const game_stream_video_properties& properties);
46 };
47 
48 } // namespace GAME
49 } // namespace KODI
Definition: IGameClientStream.h:25
Game video stream properties
Definition: game.h:242
Stream packet and ephemeral metadata
Definition: game.h:528
Controller configuration window.
Definition: AudioDecoder.h:18
Definition: RetroPlayerVideo.h:26
Immutable stream metadata
Definition: game.h:482
Definition: GameClientStreamVideo.h:26
Definition: IRetroPlayerStream.h:30