Constructor
(abstract) new ServerManager()
Fires:
Extends
Members
(static) constructorParams
(static) events
Methods
(static) getCpuCount(callbackopt) → {external:Promise}
Linux processes can be configured to use only a subset of the cores that are available in the system, via the process affinity settings (sched_setaffinity(2)). With this method it is possible to know the number of cores that the media server can use in the machine where is running.
For example, it's possible to limit the core affinity inside a Docker container by running with a command such as docker run --cpuset-cpus='0,1'.
Note that the return value represents the number of logical processing units available, i.e. CPU cores including Hyper-Threading.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.ServerManager~getCpuCountCallback |
<optional> |
Returns:
- Type
- external:Promise
(static) getKmd(moduleName, callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
moduleName |
external:String | Name of the module to get its kmd file | |
callback |
module:core/abstracts.ServerManager~getKmdCallback |
<optional> |
Returns:
- Type
- external:Promise
(static) getUsedCpu(interval, callbackopt) → {external:Promise}
This method measures the average CPU usage of the media server during the requested interval. Normally you will want to choose an interval between 1000 and 10000 ms.
The returned value represents the global system CPU usage of the media server, as an average across all processing units (CPU cores).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
interval |
external:Integer | Time to measure the average CPU usage, in milliseconds. | |
callback |
module:core/abstracts.ServerManager~getUsedCpuCallback |
<optional> |
Returns:
- Type
- external:Promise
(static) getUsedMemory(callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.ServerManager~getUsedMemoryCallback |
<optional> |
Returns:
- Type
- external:Promise
getChildren(callbackopt) → {external:Promise}
MediaObject
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.MediaObject~getChildrenCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
getCreationTime(callbackopt) → {external:Promise}
MediaObject
creation time in seconds since Epoch.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.MediaObject~getCreationTimeCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
getInfo(callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.ServerManager~getInfoCallback |
<optional> |
Returns:
- Type
- external:Promise
getMediaPipeline(callbackopt) → {external:Promise}
MediaObject
belongs. It
returns itself when invoked for a pipeline object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.MediaObject~getMediaPipelineCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
getMetadata(callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.ServerManager~getMetadataCallback |
<optional> |
Returns:
- Type
- external:Promise
getName(callbackopt) → {external:Promise}
MediaObject
's name.
This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.MediaObject~getNameCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
getParent(callbackopt) → {external:Promise}
MediaObject
.
The parent of a Hub or a MediaElement is its MediaPipeline. A MediaPipeline has no parent, so this property will be null.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.MediaObject~getParentCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
getPipelines(callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.ServerManager~getPipelinesCallback |
<optional> |
Returns:
- Type
- external:Promise
getSendTagsInEvents(callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.MediaObject~getSendTagsInEventsCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
getSessions(callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
module:core/abstracts.ServerManager~getSessionsCallback |
<optional> |
Returns:
- Type
- external:Promise
setName(name, callbackopt) → {external:Promise}
MediaObject
's name.
This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
external:String | ||
callback |
module:core/abstracts.MediaObject~setNameCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
setSendTagsInEvents(sendTagsInEvents, callbackopt) → {external:Promise}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
sendTagsInEvents |
external:Boolean | ||
callback |
module:core/abstracts.MediaObject~setSendTagsInEventsCallback |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- external:Promise
Type Definitions
getCpuCountCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
external:Integer | Number of CPU cores available for the media server. |
getInfoCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
module:core/complexTypes.ServerInfo |
getKmdCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
external:String | The kmd file. |
getMetadataCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
external:String |
getPipelinesCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
module:core.MediaPipeline |
getSessionsCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
external:String |
getUsedCpuCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
external:Number | CPU usage %. |
getUsedMemoryCallback(error, result)
Parameters:
Name | Type | Description |
---|---|---|
error |
external:Error | |
result |
external:int64 | Used memory, in KiB. |