The Media Kit has a number of message formats. The following table lists the messages (by their 'what' constants) and describes their intents. The subsequent sections list the fields that are contained in the messages.
Declared in: media/MediaDefs.h
Messages with these 'what' are sent by the media server to any
application that's registered to receive notifications by calling
BMediaRoster::StartWatching()
.
Constant | Description |
---|---|
Used to match any notification (used only in calls to
| |
A new node has been created | |
A node has been deleted. (Not sent in R4.5.) | |
Not sent in R4.5. | |
Not sent in R4.5. | |
Not sent in R4.5. | |
Not sent in R4.5. | |
Not sent in R4.5. | |
Indicates that a parameter in a
| |
Indicates that a parameter in a BParameterWeb has changed. Unlike the B_MEDIA_PARAMETER_CHANGED notification, this includes the new value. | |
Indicates that a node's
| |
Indicates that a node has stopped. | |
Indicates that flavors have changed. | |
| Not sent in R4.5. |
| Not sent in R4.5. |
Purpose: | Constant only. |
Source: | Your application. |
Target: | The media server. |
Hook: |
When calling
BMediaRoster::StartWatching()
or
BMediaRoster::StopWatching()
,
you can use this constant to match all
media messages. This message has no actual format.
(No Be-defined fields)
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: |
Sent to indicate that a node has been created or deleted in the media system.
Field | Type code | Description |
---|---|---|
media_node_id | B_INT32_TYPE | The ID of the media_node that was created or deleted. |
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: | – |
Sent to indicate that a connection between media nodes has been made or broken.
The B_MEDIA_CONNECTION_MADE
message has three
data fields:
Field | Type code | Description |
---|---|---|
be:output | B_RAW_TYPE | A media_output structure describing the connection's output. |
be:input | B_RAW_TYPE | A media_input structure describing the connection's input. |
be:format | B_RAW_TYPE | A media_format structure describing the format of the data that flows across the connection. |
And B_MEDIA_CONNECTION_BROKEN
has two.
Field | Type code | Description |
---|---|---|
destination | B_RAW_TYPE | A media_destination structure describing the destination of the connection that's been broken. |
source | B_RAW_TYPE | A media_source structure describing the source of the connection that's been broken. |
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: | – |
Sent to indicate that a media buffer has been created or deleted.
B_MEDIA_BUFFER_CREATED
's message has the following fields:
Field | Type code | Description |
---|---|---|
clone_info | B_RAW_TYPE | An area_info structure describing the buffer's location in memory. This is an array, one entry per buffer created. |
B_MEDIA_BUFFER_DELETED
looks like this:
Field | Type code | Description |
---|---|---|
media_buffer_id | B_INT32_TYPE | The buffer ID number of the buffer being deleted. This is an array, one entry per buffer deleted. |
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: |
Sent by the media server to indicate that the format used on a particular connection has changed.
Field | Type code | Description |
---|---|---|
be:source | B_RAW_TYPE | A media_source structure describing the source of the connection whose format changed. |
be:destination | B_RAW_TYPE | A media_source structure describing the source of the connection whose format changed. |
be:format | B_RAW_TYPE | A media_format structure describing the new format. |
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: |
Sent by the media server to indicate that the value of a parameter has
changed. B_MEDIA_PARAMETER_CHANGED
only tells you which parameter changed
(media_node
and parameter ID). B_MEDIA_NEW_PARAMETER_VALUE
also tells you
which parameter changed, and what the new value is.
The B_MEDIA_PARAMETER_CHANGED
message looks like this:
Field | Type code | Description |
---|---|---|
be:node | B_RAW_TYPE | A media_node structure indicating which node's parameter web has changed. |
be:parameter | B_INT32_TYPE | The ID number of the parameter whose value has changed. |
The B_MEDIA_NEW_PARAMETER_VALUE
message is:
Field | Type code | Description |
---|---|---|
node | B_RAW_TYPE | A media_node structure indicating which node is reporting a changed parameter value. |
parameter | B_INT32_TYPE | The parameter ID of the changed parameter. |
when | B_INT64_TYPE | The performance time at which the change took effect.
value
B_RAW_TYPE The parameter's new value. |
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: |
Sent by the media server to indicate that a particular node's
BParameterWeb
has.
Field | Type code | Description |
---|---|---|
node | B_RAW_TYPE | A media_node structure indicating which node's parameter web has changed. |
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: |
Indicates that a media node has stopped.
Purpose: | Deliverable |
Source: | The media server. |
Target: | Target specified to
BMediaRoster::StartWatching() . |
Hook: | – |
Sent by the media server to indicate that the flavors supported by a particular add-on have changed.
Field | Type code | Description |
---|---|---|
be:addon_id | B_INT32_TYPE | The add-on ID of the add-on whose flavors have changed |
be:new_count | B_INT32_TYPE | How many new flavors have been added. |
be:gone_count | B_INT32_TYPE | How many flavors have been removed. |