Iray SDK API nvidia_logo_transpbg.gif Up
rtmp.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_RTMP_H
8#define MI_NEURAYLIB_RTMP_H
9
11
12namespace mi {
13
14class IData;
15class IMap;
16
17namespace neuraylib { class IVideo_encoder; class IVideo_data; }
18
21namespace rtmp {
22
23class IConnection;
24class IStream;
25
151 mi::base::Interface_declare<0x9751dc66,0xb064,0x4ae8,0xaa,0x32,0x54,0x89,0x41,0x86,0xcc,0x1d>
152{
153public:
172 virtual bool handle(
173 IConnection* connection,
174 const char* procedure_name,
175 const IData* command_arguments,
176 const IData* user_arguments,
177 IData** response_arguments) = 0;
178};
179
185 mi::base::Interface_declare<0x103c7914,0xe2be,0x43aa,0xa6,0xc7,0x23,0xdd,0x10,0x5e,0xb5,0x61>
186{
187public:
199 virtual bool handle(
200 bool is_create,
201 IStream* stream,
202 const IData* command_arguments) = 0;
203};
204
210class IConnection : public
211 mi::base::Interface_declare<0x9a4d6604,0x78f3,0x4948,0x98,0x37,0x73,0x80,0x0c,0x57,0xee,0x35>
212{
213public:
222 ICall_event_handler* call_handler,
223 const char* procedure_name = 0) = 0;
224
231 virtual void register_stream_event_handler( IStream_event_handler* stream_event_handler) = 0;
232
241 virtual IMap* get_statistics() const = 0;
242
246 virtual const char* get_peer_address() const = 0;
247
255 virtual Sint32 set_property( const char* key, const char* value) = 0;
256
261 virtual const char* get_property( const char* key) const = 0;
262};
263
270 mi::base::Interface_declare<0x57b2f74b,0x3964,0x45cf,0x85,0xcd,0xb3,0xd3,0x37,0xbf,0x09,0xc2>
271{
272public:
296 virtual bool handle(
297 bool is_create,
298 IConnection* connection,
299 const IData* command_arguments,
300 const IData* user_arguments) = 0;
301};
302
308 mi::base::Interface_declare<0x59798950,0x9a12,0x48b3,0x87,0x14,0x23,0xb7,0x2d,0xd9,0xaf,0x71>
309{
310public:
334 virtual bool handle( bool is_start, IStream* stream, neuraylib::IVideo_data** out) = 0;
335};
336
342 mi::base::Interface_declare<0x5e4f3910,0x3f00,0x4e80,0xa9,0x77,0x98,0x15,0x6d,0xa0,0x92,0x8b>
343{
344public:
362 virtual bool handle( bool is_pause, IStream* stream) = 0;
363};
364
372 mi::base::Interface_declare<0xe3f21dfb,0xe285,0x4733,0xab,0x10,0x3f,0x0c,0x5c,0x3d,0xdd,0x7a>
373{
374public:
383 virtual bool handle( IStream* stream) = 0;
384};
385
395 mi::base::Interface_declare<0x0dacca64,0x41ae,0x407f,0xbf,0x9b,0x97,0xaf,0xe7,0x92,0x12,0xbd>
396{
397public:
413 virtual bool handle( IStream* stream, neuraylib::IVideo_data** out, bool outqueue_is_full) = 0;
414};
415
417class IStream : public
418 mi::base::Interface_declare<0xa6532316,0x9e4c,0x4e12,0x92,0x63,0xc6,0x2a,0x5c,0xda,0xdd,0x28>
419{
420public:
431 virtual bool use_codec( const char* name) = 0;
432
439
444 virtual void register_render_event_handler( IRender_event_handler* render_event_handler) = 0;
445
450 virtual void register_frame_event_handler( IFrame_event_handler* frame_event_handler) = 0;
451
456 virtual void register_play_event_handler( IPlay_event_handler* play_event_handler) = 0;
457
462 virtual void register_pause_event_handler( IPause_event_handler* pause_event_handler) = 0;
463
470 virtual const char* get_stream_name() const = 0;
471
488 virtual Sint32 set_property( const char* key, const char* value) = 0;
489
494 virtual const char* get_property( const char* key) const = 0;
495
502};
503
505class IServer : public
506 mi::base::Interface_declare<0xe0a7301d,0xb555,0x4fc6,0xb5,0x1d,0x26,0x1c,0xbe,0x73,0xea,0x47>
507{
508public:
518 virtual Sint32 start( const char* listen_address) = 0;
519
526 virtual void shutdown() = 0;
527
533 virtual void install( IConnect_event_handler* handler) = 0;
534
538 virtual void remove( IConnect_event_handler* handler) = 0;
539
541 virtual const char* get_listen_address() const = 0;
542};
543
545class IFactory : public
546 mi::base::Interface_declare<0x2e6055f1,0xf94d,0x4a2c,0xb2,0x0a,0x30,0xde,0xb6,0xde,0xc8,0x8c>
547{
548public:
551 virtual IServer* create_server() = 0;
552};
553 // end group mi_neuray_rtmp
555
556} // namespace rtmp
557
558} // namespace mi
559
560#endif // MI_NEURAYLIB_RTMP_H
This interface is the base interface of all types.
Definition: idata.h:297
This interface represents maps, i.e., a key-value based data structure.
Definition: imap.h:41
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
A buffer for video data representing a frame.
Definition: ivideo_plugin.h:33
Abstract interface for video encoders.
Definition: ivideo_plugin.h:56
Superclass of all handlers of call events.
Definition: rtmp.h:152
virtual bool handle(IConnection *connection, const char *procedure_name, const IData *command_arguments, const IData *user_arguments, IData **response_arguments)=0
Called on a remote call event.
Superclass of all handlers of connect events.
Definition: rtmp.h:271
virtual bool handle(bool is_create, IConnection *connection, const IData *command_arguments, const IData *user_arguments)=0
Called on a connect event.
The connection class represents a connection from a client to the server.
Definition: rtmp.h:212
virtual const char * get_peer_address() const =0
Get the IP and port of the remote client.
virtual void register_stream_event_handler(IStream_event_handler *stream_event_handler)=0
Registers a stream event handler.
virtual void register_remote_call_handler(ICall_event_handler *call_handler, const char *procedure_name=0)=0
Registers a call event handler for the passed procedure name.
virtual Sint32 set_property(const char *key, const char *value)=0
Sets a property on the connection.
virtual IMap * get_statistics() const =0
Returns statistics for the connection.
virtual const char * get_property(const char *key) const =0
Returns a property from the connection.
The factory can be used to instantiate the built-in RTMP server.
Definition: rtmp.h:547
virtual IServer * create_server()=0
Creates a new RTMP server.
Superclass of all handlers of frame events.
Definition: rtmp.h:396
virtual bool handle(IStream *stream, neuraylib::IVideo_data **out, bool outqueue_is_full)=0
Called on a frame event.
Superclass of all handlers of pause events.
Definition: rtmp.h:343
virtual bool handle(bool is_pause, IStream *stream)=0
Called on a pause or resume event.
Superclass of all handlers of play events.
Definition: rtmp.h:309
virtual bool handle(bool is_start, IStream *stream, neuraylib::IVideo_data **out)=0
Called on a play or stop event.
Superclass of all handlers of render events.
Definition: rtmp.h:373
virtual bool handle(IStream *stream)=0
Called on a render event.
The server builds a framework for the handlers.
Definition: rtmp.h:507
virtual void remove(IConnect_event_handler *handler)=0
Removes a previously installed connect event handler from the server.
virtual void install(IConnect_event_handler *handler)=0
Adds a new connect event handler to the server.
virtual void shutdown()=0
Shuts down a server that has been previously started.
virtual Sint32 start(const char *listen_address)=0
Starts the server listening on the given address.
virtual const char * get_listen_address() const =0
Returns the listen address of the server.
Superclass of all handlers of create stream events.
Definition: rtmp.h:186
virtual bool handle(bool is_create, IStream *stream, const IData *command_arguments)=0
Called on a stream event.
Representing an RTMP stream.
Definition: rtmp.h:419
virtual IConnection * get_connection()=0
Returns the connection for this stream.
virtual Sint32 set_property(const char *key, const char *value)=0
Sets a property on the stream.
virtual const char * get_stream_name() const =0
Returns the name of the current playing stream.
virtual bool use_codec(const char *name)=0
Tells the RTMP server which codec will be used on the stream.
virtual void register_render_event_handler(IRender_event_handler *render_event_handler)=0
Registers the render event handler.
virtual const char * get_property(const char *key) const =0
Returns a property from the stream.
virtual void register_play_event_handler(IPlay_event_handler *play_event_handler)=0
Registers the play event handler.
virtual void register_frame_event_handler(IFrame_event_handler *frame_event_handler)=0
Registers the frame event handler.
virtual void register_pause_event_handler(IPause_event_handler *pause_event_handler)=0
Registers the pause event handler.
virtual neuraylib::IVideo_encoder * get_video_codec()=0
Returns the video codec for this stream.
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179