Linden Lab Official:Media Plugin System Internal Messages

From Second Life Wiki
Jump to: navigation, search
Ll color vert 100.gif
Official Linden Lab® Information: You may access and link to this page, but you may not copy, distribute, modify, adapt, or translate any content on this page. This content is subject to the Terms of Service and is not available under the Creative Commons or any other license.

Have a suggestion to improve this page? Contact us.

The Viewer and each plugin loader shell (PLS) exchange internal system messages. Plugins do not need to handle these messages. This documentation is provided here for Viewer developers and for general reference purposes.


Messages plugin loader shell sends

hello

This is the first message the plugin loader shell sends to the Viewer when it initializes.

load_plugin_response

This message indicates the plugin is loaded and initialized.

Parameters

Key Type Description
versions Map Lists version corresponding to each plugin class.
  • Key: message class name
  • Value: version string. All versions start at "1.0".
plugin_version String Free-form version string for the plugin. This is expected to contain the versions of libraries the plugin uses (for example, quicktime, webkit, and so on) and may end up in the Viewer's about box.

heartbeat

Plugin loader shell sends these once per second to indicate that the plugin isn't locked up.

Parameters

Key Type Description
cpu_usage Float Approximate fraction of a single CPU the plugin has used for the interval since the last heartbeat message (0.0 means no usage, 1.0 means the plugin kept one CPU completely busy for the entire interval). This number may go above 1.0 on multi-core machines.

shm_add_response

This message indicates shared memory has been mapped into the child.

Parameters

Key Type Description
name String  ?

shm_remove_response

Plugin is done with the shared memory segment, safe to delete.

Parameters

Key Type Description
name String  ?

Messages plugin loader shell receives

load_plugin

Tells the loader to load a plugin and send the base init message.

Parameters

Key Type Description
file String Full path to the plugin DLL/dylib/so file.

shm_add

shared memory segment has been set up in the parent

Parameters

Key Type Description
name string ?
size S32  ?

shm_remove

Shared memory segment will be removed once you respond

Parameters

Key Type Description
name String Name of shared memory segment to remove.

sleep_time

Set the interval between idle messages to the plugin.

Parameters

Key Type Description
time Float Time in seconds (default is 1/100)