NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::rtmp::IStream Class Referenceabstract

Representing an RTMP stream. More...

Inheritance diagram for mi::rtmp::IStream:
Inheritance graph
[legend]

Public Member Functions

virtual bool  use_codec (const char *name)=0
  Tells the RTMP server which codec will be used on the stream. More...
 
virtual IVideo_encoder get_video_codec ()=0
  Returns the video codec for this stream. More...
 
virtual void  register_render_event_handler (IRender_event_handler *render_event_handler)=0
  Registers the render event handler. More...
 
virtual void  register_frame_event_handler (IFrame_event_handler *frame_event_handler)=0
  Registers the frame event handler. More...
 
virtual void  register_play_event_handler (IPlay_event_handler *play_event_handler)=0
  Registers the play event handler. More...
 
virtual void  register_pause_event_handler (IPause_event_handler *pause_event_handler)=0
  Registers the pause event handler. More...
 
virtual const char *  get_stream_name () const =0
  Returns the name of the current playing stream. More...
 
virtual Sint32  set_property (const char *key, const char *value)=0
  Sets a property on the stream. More...
 
virtual const char *  get_property (const char *key) const =0
  Returns a property from the stream. More...
 
virtual IConnection get_connection ()=0
  Returns the connection for this stream. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xa6532316, 0x9e4c, 0x4e12, 0x92, 0x63, 0xc6, 0x2a, 0x5c, 0xda, 0xdd, 0x28 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xa6532316, 0x9e4c, 0x4e12, 0x92, 0x63, 0xc6, 0x2a, 0x5c, 0xda, 0xdd, 0x28 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Representing an RTMP stream.

Member Function Documentation

virtual IConnection* mi::rtmp::IStream::get_connection ( )
pure virtual

Returns the connection for this stream.

Useful for registering specific remote call handlers.

Returns
the underlying IConnection on which this stream runs
virtual const char* mi::rtmp::IStream::get_property ( const char *  key) const
pure virtual

Returns a property from the stream.

Parameters
key The key to obtain the value for.
Returns
The value of the property or NULL if it does not exist.
virtual const char* mi::rtmp::IStream::get_stream_name ( ) const
pure virtual

Returns the name of the current playing stream.

This is the name passed in as an argument by the RTMP player in the RTMP protocol play message.

Returns
The name of this stream or NULL if not applicable.
virtual IVideo_encoder* mi::rtmp::IStream::get_video_codec ( )
pure virtual

Returns the video codec for this stream.

The method use_codec() must be called first to set the video code for this stream.

Returns
The video encoder for this stream.
virtual void mi::rtmp::IStream::register_frame_event_handler ( IFrame_event_handler frame_event_handler)
pure virtual

Registers the frame event handler.

Parameters
frame_event_handler The frame event handler to install. The value NULL removes the installed handler.
virtual void mi::rtmp::IStream::register_pause_event_handler ( IPause_event_handler pause_event_handler)
pure virtual

Registers the pause event handler.

Parameters
pause_event_handler The pause event handler to install. The value NULL removes the installed handler.
virtual void mi::rtmp::IStream::register_play_event_handler ( IPlay_event_handler play_event_handler)
pure virtual

Registers the play event handler.

Parameters
play_event_handler The play event handler to install. The value NULL removes the installed handler.
virtual void mi::rtmp::IStream::register_render_event_handler ( IRender_event_handler render_event_handler)
pure virtual

Registers the render event handler.

Parameters
render_event_handler The render event handler to install. The value NULL removes the installed handler.
virtual Sint32 mi::rtmp::IStream::set_property ( const char *  key,
const char *  value 
)
pure virtual

Sets a property on the stream.

Currently, the only reserved system property is "render_rate". It indicates how often the RTMP server will try to call the registered render event handler. Bandwidth throttling and longer render times make this rate a not always reachable target. If this variable is left unset by the user the RTMP server will try to find a suitable default.

Note
It is recommended that user property names begin with the prefix "user_" to avoid future name clashes.
Parameters
key The key to set the value for.
value The value of the property
Returns
  • 0: Success.
  • -1: There is no property with that name.
  • -2: Invalid value.
virtual bool mi::rtmp::IStream::use_codec ( const char *  name)
pure virtual

Tells the RTMP server which codec will be used on the stream.

If no codec is set the data passed via the IFrame_event_handler will be sent out as is without any RTMP encapsulation.

Parameters
name The name of the codec to use, for example "screen video", "sorenson" or "h264".
Returns
true if that codec is supported, i.e., the RTMP server has support for this codec (possibly through a video plugin) and the codec is one of the supported formats within an RTMP stream.