| 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 |
|
| 13 |
struct game_stream_video_properties; |
| 14 |
|
| 15 |
namespace KODI |
| 16 |
{ |
| 17 |
namespace RETRO |
| 18 |
{ |
| 19 |
class IRetroPlayerStream; |
| 20 |
struct VideoStreamProperties; |
| 21 |
} // namespace RETRO |
| 22 |
|
| 23 |
namespace GAME |
| 24 |
{ |
| 25 |
|
| 26 |
/*! |
| 27 |
* \ingroup games |
| 28 |
*/ |
| 29 |
class CGameClientStreamVideo : public IGameClientStream |
| 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 |