neuray API Programmer's Manual

rtmp.h File Reference

Description

An RTMP server.

Code Example

rtmp.h

‎/***************************************************************************************************
 * Copyright 2023 NVIDIA Corporation. All rights reserved.
 **************************************************************************************************/

#ifndef MI_NEURAYLIB_RTMP_H
#define MI_NEURAYLIB_RTMP_H

#include <mi/base/interface_declare.h>

namespace mi {

class IData;
class IMap;

namespace neuraylib { class IVideo_encoder; class IVideo_data; }

namespace rtmp {

class IConnection;
class IStream;





class ICall_event_handler : public
    mi::base::Interface_declare<0x9751dc66,0xb064,0x4ae8,0xaa,0x32,0x54,0x89,0x41,0x86,0xcc,0x1d>
{
public:
    virtual bool handle(
        IConnection* connection,
        const char* procedure_name,
        const IData* command_arguments,
        const IData* user_arguments,
        IData** response_arguments) = 0;
};

class IStream_event_handler : public
    mi::base::Interface_declare<0x103c7914,0xe2be,0x43aa,0xa6,0xc7,0x23,0xdd,0x10,0x5e,0xb5,0x61>
{
public:
    virtual bool handle(
        bool is_create,
        IStream* stream,
        const IData* command_arguments) = 0;
};

class IConnection : public
    mi::base::Interface_declare<0x9a4d6604,0x78f3,0x4948,0x98,0x37,0x73,0x80,0x0c,0x57,0xee,0x35>
{
public:
    virtual void register_remote_call_handler(
        ICall_event_handler* call_handler,
        const char* procedure_name = 0) = 0;

    virtual void register_stream_event_handler( IStream_event_handler* stream_event_handler) = 0;

    virtual IMap* get_statistics() const = 0;

    virtual const char* get_peer_address() const = 0;

    virtual Sint32 
               set_property( const char* key, const char* value) = 0;

    virtual const char* get_property( const char* key) const = 0;
};

class IConnect_event_handler : public
    mi::base::Interface_declare<0x57b2f74b,0x3964,0x45cf,0x85,0xcd,0xb3,0xd3,0x37,0xbf,0x09,0xc2>
{
public:
    virtual bool handle(
        bool is_create,
        IConnection* connection,
        const IData* command_arguments,
        const IData* user_arguments) = 0;
};

class IPlay_event_handler : public
    mi::base::Interface_declare<0x59798950,0x9a12,0x48b3,0x87,0x14,0x23,0xb7,0x2d,0xd9,0xaf,0x71>
{
public:
    virtual bool handle( bool is_start, IStream* stream, neuraylib::IVideo_data** out) = 0;
};

class IPause_event_handler : public
    mi::base::Interface_declare<0x5e4f3910,0x3f00,0x4e80,0xa9,0x77,0x98,0x15,0x6d,0xa0,0x92,0x8b>
{
public:
    virtual bool handle( bool is_pause, IStream* stream) = 0;
};

class IRender_event_handler : public
    mi::base::Interface_declare<0xe3f21dfb,0xe285,0x4733,0xab,0x10,0x3f,0x0c,0x5c,0x3d,0xdd,0x7a>
{
public:
    virtual bool handle( IStream* stream) = 0;
};

class IFrame_event_handler : public
    mi::base::Interface_declare<0x0dacca64,0x41ae,0x407f,0xbf,0x9b,0x97,0xaf,0xe7,0x92,0x12,0xbd>
{
public:
    virtual bool handle( IStream* stream, neuraylib::IVideo_data** out, bool outqueue_is_full) = 0;
};

class IStream : public
    mi::base::Interface_declare<0xa6532316,0x9e4c,0x4e12,0x92,0x63,0xc6,0x2a,0x5c,0xda,0xdd,0x28>
{
public:
    virtual bool use_codec( const char* name) = 0;

    virtual neuraylib::IVideo_encoder* get_video_codec() = 0;

    virtual void register_render_event_handler( IRender_event_handler* render_event_handler) = 0;

    virtual void register_frame_event_handler( IFrame_event_handler* frame_event_handler) = 0;

    virtual void register_play_event_handler( IPlay_event_handler* play_event_handler) = 0;

    virtual void register_pause_event_handler( IPause_event_handler* pause_event_handler) = 0;

    virtual const char* get_stream_name() const = 0;

    virtual Sint32 
               set_property( const char* key, const char* value) = 0;

    virtual const char* get_property( const char* key) const = 0;

    virtual IConnection* get_connection() = 0;
};

class IServer : public
    mi::base::Interface_declare<0xe0a7301d,0xb555,0x4fc6,0xb5,0x1d,0x26,0x1c,0xbe,0x73,0xea,0x47>
{
public:
    virtual Sint32 
               start( const char* listen_address) = 0;

    virtual void shutdown() = 0;

    virtual void install( IConnect_event_handler* handler) = 0;

    virtual void remove( IConnect_event_handler* handler) = 0;

    virtual const char* get_listen_address() const = 0;
};

class IFactory : public
    mi::base::Interface_declare<0x2e6055f1,0xf94d,0x4a2c,0xb2,0x0a,0x30,0xde,0xb6,0xde,0xc8,0x8c>
{
public:
    virtual IServer* create_server() = 0;
};
 // end group mi_neuray_rtmp

} // namespace rtmp

} // namespace mi

#endif // MI_NEURAYLIB_RTMP_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...
namespace 
Namespace for the RTMP server of the neuray API. More...

Classes

class 
Superclass of all handlers of call events. More...
class 
Superclass of all handlers of connect events. More...
class 
The connection class represents a connection from a client to the server. More...
class 
The factory can be used to instantiate the built-in RTMP server. More...
class 
Superclass of all handlers of frame events. More...
class 
Superclass of all handlers of pause events. More...
class 
Superclass of all handlers of play events. More...
class 
Superclass of all handlers of render events. More...
class 
The server builds a framework for the handlers. More...
class 
Representing an RTMP stream. More...
class 
Superclass of all handlers of create stream events. More...