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 
30 {
31 public:
32  CGameClientStreamVideo() = default;
33  ~CGameClientStreamVideo() override { CloseStream(); }
34 
35  // Implementation of IGameClientStream
36  bool OpenStream(RETRO::IRetroPlayerStream* stream,
37  const game_stream_properties& properties) override;
38  void CloseStream() override;
39  void AddData(const game_stream_packet& packet) override;
40 
41 protected:
42  // Stream parameters
43  RETRO::IRetroPlayerStream* m_stream = nullptr;
44 
45 private:
46  // Utility functions
47  static RETRO::VideoStreamProperties* TranslateProperties(
48  const game_stream_video_properties& properties);
49 };
50 
51 } // namespace GAME
52 } // namespace KODI
Definition: IGameClientStream.h:28
Game video stream properties
Definition: game.h:242
Stream packet and ephemeral metadata
Definition: game.h:528
Definition: AudioDecoder.h:18
Definition: RetroPlayerVideo.h:26
Immutable stream metadata
Definition: game.h:482
Definition: GameClientStreamVideo.h:29
Definition: IRetroPlayerStream.h:30