Classes | |
class | mi::neuraylib::ICanvas_base |
Abstract interface for a canvas (base class). More... | |
class | mi::neuraylib::ICanvas |
Abstract interface for a canvas represented by a rectangular array of tiles. More... | |
class | mi::neuraylib::IImage_api |
This interface provides various utilities related to canvases and buffers. More... | |
class | mi::neuraylib::ITile |
Abstract interface for a tile. More... | |
class | mi::rtmp::ICall_event_handler |
Superclass of all handlers of call events. More... | |
class | mi::rtmp::IStream_event_handler |
Superclass of all handlers of create stream events. More... | |
class | mi::rtmp::IConnection |
The connection class represents a connection from a client to the server. More... | |
class | mi::rtmp::IConnect_event_handler |
Superclass of all handlers of connect events. More... | |
class | mi::rtmp::IPlay_event_handler |
Superclass of all handlers of play events. More... | |
class | mi::rtmp::IPause_event_handler |
Superclass of all handlers of pause events. More... | |
class | mi::rtmp::IRender_event_handler |
Superclass of all handlers of render events. More... | |
class | mi::rtmp::IFrame_event_handler |
Superclass of all handlers of frame events. More... | |
class | mi::rtmp::IStream |
Representing an RTMP stream. More... | |
class | mi::rtmp::IServer |
The server builds a framework for the handlers. More... | |
class | mi::rtmp::IFactory |
The factory can be used to instantiate the built-in RTMP server. More... | |
Functions | |
Uint32_2 | mi::neuraylib::get_resolution (const ICanvas_base &canvas) |
Convenience function which returns a canvas' resolution in a struct. More... | |
The RTMP server module implements an RTMP server.
It listens for incoming connections and calls the installed connect handlers to see if an incoming connection should be accepted. If it is accepted an RTMP connection is started and upon incoming RTMP commands the installed command handlers will be called.
The server is multithreaded and will start one thread for each connection.
Any number of connect handler classes may be installed to the RTMP server. Each of those handler classes has to implement a handle() function. This function gets the connection. From the connection the handle() function may get the various parameters of the connect packet and if it wants to claim it, it should return true
. If all return false
, the connection is refused.
To create a server the mi::rtmp::IFactory needs to be obtained from the DiCE API using mi::neuraylib::INeuray::get_api_component(). The factory can then be used to create as many RTMP servers as needed.
The handler classes are the only ones that need to be implemented by a user. And then only the ones where the user actually wants to do something. If not implemented, they will simply not be called. The Frame_event_handler runs in a separate thread to avoid that long rendering times affect the framerate.
An example:
|
inline |
Convenience function which returns a canvas' resolution in a struct.