2 * Copyright (C) 2018 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.
11 #include "RetroPlayerStreamTypes.h"
18 struct StreamProperties
30 class IRetroPlayerStream
33 virtual ~IRetroPlayerStream() = default;
36 * \brief Open a stream
38 * \return True if the stream was opened, false otherwise
40 virtual bool OpenStream(const StreamProperties
& properties
) = 0;
43 * \brief Get a buffer for zero-copy stream data
45 * \param width The framebuffer width, or 0 for no width specified
46 * \param height The framebuffer height, or 0 for no height specified
47 * \param[out] buffer The buffer, or unmodified if false is returned
49 * \return True if a buffer was returned, false otherwise
51 virtual bool GetStreamBuffer(unsigned int width
, unsigned int height
, StreamBuffer
& buffer
) = 0;
54 * \brief Add a data packet to a stream
56 * \param packet The data packet
58 virtual void AddStreamData(const StreamPacket
& packet
) = 0;
61 * \brief Close the stream
63 virtual void CloseStream() = 0;