Inherits G3D::ReferenceCountedObject.
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
◆ VideoStreamClient()
G3D::VideoStreamClient::VideoStreamClient |
( |
const shared_ptr< NetConnection > & |
server | ) |
|
|
protected |
◆ create() [1/2]
◆ create() [2/2]
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ receive()
shared_ptr<Texture> G3D::VideoStreamClient::receive |
( |
| ) |
|
Returns null if there is no next frame available in the queue yet.
Threadsafe. Must be called on the OpenGL thread. May block for a short period of time. Output format is always SRGB8().
Calling this may re-use the texture from the previous call for efficiency, so do not invoke it until the previous texture is no longer in use by the application.
Invoke in a while loop until receive() returns nullptr to avoid frames backlogging.
Will return nullptr if the next message is not on the VIDEO_NET_CHANNEL, at which point the application must clear the non-video messages from the message iterator.
◆ serverConnection()
const shared_ptr<NetConnection>& G3D::VideoStreamClient::serverConnection |
( |
| ) |
|
|
inline |
◆ m_server
◆ m_texture
shared_ptr<Texture> G3D::VideoStreamClient::m_texture |
|
protected |
◆ VIDEO_NET_CHANNEL
const NetChannel G3D::VideoStreamClient::VIDEO_NET_CHANNEL |
|
static |