![]() |
RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
Convenience empty implementation of IDcsmContentControlEventHandler that can be used to derive from when only subset of event handling methods need to be implemented. More...
#include <IDcsmContentControlEventHandler.h>
Public Member Functions | |
virtual void | contentAvailable (ContentID contentID, Category categoryID) override |
New content is available. This is a result of Dcsm content offer that requested category registered in the ramses::DcsmContentControl. This can also mean that content is released (its scene is not rendered anymore and resources are unloaded), as result of ramses::DcsmContentControl::releaseContent at finish time of animation if any provided, or if content state drops to available as result of its scene state change. More... | |
virtual void | contentReady (ContentID contentID, DcsmContentControlEventResult result) override |
Content became ready or timed out to get ready. See ramses::DcsmContentControl::requestContentReady for details. This can also mean content has become hidden (its scene is not rendered anymore), as result of ramses::DcsmContentControl::hideContent at finish time of animation if any provided. More... | |
virtual void | contentShown (ContentID contentID) override |
Content is shown (its scene is rendered on corresponding display). This callback comes at start time of animation if any provided, see ramses::DcsmContentControl::showContent for details. More... | |
virtual void | contentStopOfferRequested (ContentID contentID) override |
Called when Dcsm provider requests that its content is not used anymore and it would like to stop offering it. This is a purely Dcsm related message forwarded via ramses::DcsmContentControl event mechanism. Application logic should react by calling ramses::ramses::DcsmContentControl::acceptStopOffer (optionally with timing information), when it decides that the content is indeed no longer needed. More... | |
virtual void | contentNotAvailable (ContentID contentID) override |
Content became unavailable unexpectedly. Application logic should react as fast as possible if this affects currently rendered content(s). More... | |
virtual void | contentMetadataUpdated (ContentID contentID, const DcsmMetadataUpdate &metadataUpdate) override |
Update metadata for given content. This callback provides metadata given to by DcsmProvider::offerContentWithMetadata() and DcsmProvider::updateContentMetadata(). A consumer will get the combined state of all past metadata updates from the whole lifecycle of the content as first event after it successfully acquired control over content (state Assigned). Later events only contain delta updates. When the provider never attached metadata to this content, this callback will never be called. More... | |
virtual void | offscreenBufferLinked (displayBufferId_t offscreenBufferId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override |
Offscreen buffer and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentControl::linkOffscreenBuffer. More... | |
void | contentLinkedToTextureConsumer (ContentID providerContent, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override |
Content and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentControl::linkContentToTextureConsumer. More... | |
virtual void | dataLinked (ContentID providerContent, dataProviderId_t providerId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override |
Data provider and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentControl::linkData. More... | |
virtual void | dataUnlinked (ContentID consumerContent, dataConsumerId_t consumerId, bool success) override |
Data consumer was unlinked from provider (or failed to be linked) as result of calling ramses::DcsmContentControl::unlinkData. More... | |
virtual void | objectsPicked (ContentID content, const pickableObjectId_t *pickedObjects, uint32_t pickedObjectsCount) override |
This method will be called when there were scene objects picked as a result of ramses::DcsmContentControl::handlePickEvent. A ramses::PickableObject can be 'picked' via a pick input event which is passed to ramses::DcsmContentControl when the scene is rendered. More... | |
virtual void | dataProviderCreated (ContentID contentID, dataProviderId_t dataProviderId) override |
This method will be called whenever a data provider is created in content's scene. More... | |
virtual void | dataProviderDestroyed (ContentID contentID, dataProviderId_t dataProviderId) override |
This method will be called when a data provider is removed from content's scene. More... | |
virtual void | dataConsumerCreated (ContentID contentID, dataConsumerId_t dataConsumerId) override |
This method will be called whenever a data consumer is created in content's scene. More... | |
virtual void | dataConsumerDestroyed (ContentID contentID, dataConsumerId_t dataConsumerId) override |
This method will be called when a data consumer is removed from content's scene. More... | |
virtual void | contentFlushed (ContentID contentID, sceneVersionTag_t version) override |
Scene associated with content was flushed with a version tag. More... | |
virtual void | contentExpirationMonitoringEnabled (ContentID contentID) override |
This method will be called whenever a content's scene which was not previously monitored for expiration has requested expiration monitoring by sending a scene flush with valid expiration timestamp (ramses::Scene::setExpirationTimestamp) and that flush was applied on renderer side. From this point on, the content's scene will be monitored, can expire and recover (contentExpired, contentRecoveredFromExpiration) until monitoring disabled again (contentExpirationMonitoringDisabled). If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents. More... | |
virtual void | contentExpirationMonitoringDisabled (ContentID contentID) override |
This method will be called whenever a content's scene which was previously monitored for expiration has requested to stop being monitored by sending a scene flush with invalid expiration timestamp (ramses::Scene::setExpirationTimestamp) and that flush was applied on renderer side. This method will also be called if a previously monitored content is unsubscribed from the renderer, i.e. drops state to available from previous ready (or potentially after canceled transition to ready). From this point on, the content's scene will not be monitored anymore, regardless if it previously expired or not, i.e. there will be no expiration events (contentExpired, contentRecoveredFromExpiration) until monitoring enabled again (contentExpirationMonitoringEnabled). If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents. More... | |
virtual void | contentExpired (ContentID contentID) override |
This method will be called if a content's scene which is enabled for expiration monitoring (contentExpirationMonitoringEnabled) is on renderer (not necessarily rendered) at a state that expired, i.e. current time is after the expiration timestamp set via ramses::Scene::setExpirationTimestamp. This callback is called only once when the content's scene expires even if the scene stays expired in subsequent frames. When the scene is updated again with a new not anymore expired timestamp, contentRecoveredFromExpiration is called. If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents. More... | |
virtual void | contentRecoveredFromExpiration (ContentID contentID) override |
This method will be called if a content's scene which previously expired (ramses::Scene::setExpirationTimestamp and contentExpired) was updated with a new expiration timestamp that is not expired anymore. This callback is called only once when the content's scene switches state from expired to not expired. This callback is not called when monitoring becomes disabled (contentExpirationMonitoringDisabled) while content's scene is expired (contentExpired). If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents. More... | |
virtual void | streamAvailabilityChanged (waylandIviSurfaceId_t streamId, bool available) override |
This method will be called when a new IVI video stream becomes available, or when an existing stream disappears. More... | |
void | contentEnableFocusRequest (ramses::ContentID contentID, int32_t focusRequest) override |
Provider requested to switch to/focus this content within the category. Consumer may or may not follow this request. This is a purely Dcsm related message forwarded via ramses::DcsmContentControl event mechanism, see ramses::DcsmProvider::enableFocusRequest for more details. Application logic should react accordingly if it decides to accept the request, typically this means requesting the content to be ready and show afterwards using ramses::DcsmContentControl::requestContentReady and ramses::DcsmContentControl::showContent. More... | |
void | contentDisableFocusRequest (ramses::ContentID contentID, int32_t focusRequest) override |
Provider requested to no longer focus this content within the category. Consumer may or may not follow this request. More... | |
![]() | |
virtual | ~IDcsmContentControlEventHandler ()=default |
Destructor. More... | |
Convenience empty implementation of IDcsmContentControlEventHandler that can be used to derive from when only subset of event handling methods need to be implemented.
|
inlineoverridevirtual |
New content is available. This is a result of Dcsm content offer that requested category registered in the ramses::DcsmContentControl. This can also mean that content is released (its scene is not rendered anymore and resources are unloaded), as result of ramses::DcsmContentControl::releaseContent at finish time of animation if any provided, or if content state drops to available as result of its scene state change.
contentID | Content that became available. |
categoryID | Category that the content was assigned to. |
Implements ramses::IDcsmContentControlEventHandler.
Reimplemented in LocalDCSMExample.
|
inlineoverridevirtual |
Provider requested to no longer focus this content within the category. Consumer may or may not follow this request.
contentID | content that provider should no longer focus |
focusRequest | identifier of the focus request |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Provider requested to switch to/focus this content within the category. Consumer may or may not follow this request. This is a purely Dcsm related message forwarded via ramses::DcsmContentControl event mechanism, see ramses::DcsmProvider::enableFocusRequest for more details. Application logic should react accordingly if it decides to accept the request, typically this means requesting the content to be ready and show afterwards using ramses::DcsmContentControl::requestContentReady and ramses::DcsmContentControl::showContent.
contentID | content that provider wants to switch focus to |
focusRequest | identifier of the focus request |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called whenever a content's scene which was previously monitored for expiration has requested to stop being monitored by sending a scene flush with invalid expiration timestamp (ramses::Scene::setExpirationTimestamp) and that flush was applied on renderer side. This method will also be called if a previously monitored content is unsubscribed from the renderer, i.e. drops state to available from previous ready (or potentially after canceled transition to ready). From this point on, the content's scene will not be monitored anymore, regardless if it previously expired or not, i.e. there will be no expiration events (contentExpired, contentRecoveredFromExpiration) until monitoring enabled again (contentExpirationMonitoringEnabled). If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has associated the scene, which will not be monitored for expiration anymore |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called whenever a content's scene which was not previously monitored for expiration has requested expiration monitoring by sending a scene flush with valid expiration timestamp (ramses::Scene::setExpirationTimestamp) and that flush was applied on renderer side. From this point on, the content's scene will be monitored, can expire and recover (contentExpired, contentRecoveredFromExpiration) until monitoring disabled again (contentExpirationMonitoringDisabled). If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has associated the scene, which will be monitored for expiration |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called if a content's scene which is enabled for expiration monitoring (contentExpirationMonitoringEnabled) is on renderer (not necessarily rendered) at a state that expired, i.e. current time is after the expiration timestamp set via ramses::Scene::setExpirationTimestamp. This callback is called only once when the content's scene expires even if the scene stays expired in subsequent frames. When the scene is updated again with a new not anymore expired timestamp, contentRecoveredFromExpiration is called. If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has the expired scene associated. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Scene associated with content was flushed with a version tag.
Every DCSM content has a ramses::Scene associated with it, whenever that scene is flushed by content provider (ramses::Scene::flush) with a version tag this callback will be triggered. If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has the flushed scene associated. |
version | User version tag given when flushing the scene. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Content and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentControl::linkContentToTextureConsumer.
Note that there is a possibility that given consumerContent ID is different from the one passed when calling ramses::DcsmContentControl::linkContentToTextureConsumer. This can happen if the underlying type involved in this data linking is used by multiple contents, in that case an event is generated for each of the contents. Same applies for multiple provider content IDs mapping to the same internal object. Also note that given consumerContent ID will be invalid if the consumer content or its scene became unavailable before this callback is emitted.
providerContent | ID of content which is providing texture (scene on offscreenbuffer or wayland surface). |
consumerContent | ID of content using scene that consumes the linked content. |
consumerId | ID of data consumer in the consumer scene. |
success | True if content successfully linked, false otherwise. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Update metadata for given content. This callback provides metadata given to by DcsmProvider::offerContentWithMetadata() and DcsmProvider::updateContentMetadata(). A consumer will get the combined state of all past metadata updates from the whole lifecycle of the content as first event after it successfully acquired control over content (state Assigned). Later events only contain delta updates. When the provider never attached metadata to this content, this callback will never be called.
contentID | which content is affected |
metadataUpdate | object to get metadata update from. valid for the lifetime of the callback. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Content became unavailable unexpectedly. Application logic should react as fast as possible if this affects currently rendered content(s).
contentID | Unique ID of content that became unavailable. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Content became ready or timed out to get ready. See ramses::DcsmContentControl::requestContentReady for details. This can also mean content has become hidden (its scene is not rendered anymore), as result of ramses::DcsmContentControl::hideContent at finish time of animation if any provided.
contentID | Content that became ready or timed out. |
result | OK if content became ready, TimedOut otherwise. |
Implements ramses::IDcsmContentControlEventHandler.
Reimplemented in LocalDCSMExample.
|
inlineoverridevirtual |
This method will be called if a content's scene which previously expired (ramses::Scene::setExpirationTimestamp and contentExpired) was updated with a new expiration timestamp that is not expired anymore. This callback is called only once when the content's scene switches state from expired to not expired. This callback is not called when monitoring becomes disabled (contentExpirationMonitoringDisabled) while content's scene is expired (contentExpired). If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has the recovered scene associated. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Content is shown (its scene is rendered on corresponding display). This callback comes at start time of animation if any provided, see ramses::DcsmContentControl::showContent for details.
contentID | Content that is shown. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Called when Dcsm provider requests that its content is not used anymore and it would like to stop offering it. This is a purely Dcsm related message forwarded via ramses::DcsmContentControl event mechanism. Application logic should react by calling ramses::ramses::DcsmContentControl::acceptStopOffer (optionally with timing information), when it decides that the content is indeed no longer needed.
contentID | Unique ID of content for which the request was made. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called whenever a data consumer is created in content's scene.
The event is emitted also for every data consumer in a newly available content. If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has the data slot change associated. |
dataConsumerId | The created data consumer id |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called when a data consumer is removed from content's scene.
The event is emitted only when data consumer explicitly destroyed, not if scene becomes unavailable as a whole. If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has the data slot change associated. |
dataConsumerId | The destroyed data consumer id |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Data provider and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentControl::linkData.
Note that there is a possibility that given consumerContent ID or providerContent ID is different from the one passed when calling ramses::DcsmContentControl::linkData. This can happen if the Ramses scene involved in this data linking is used by multiple contents, in that case simply one of the contents using the scene will be given here. Also note that given consumerContent/providerContent ID will be invalid if the consumer/provider content or its scene became unavailable before this callback is emitted.
providerContent | ID of content using scene that provides the linked data. |
providerId | ID of data provider in the provider scene. |
consumerContent | ID of content using scene that consumes the linked data. |
consumerId | ID of data consumer in the consumer scene. |
success | True if data successfully linked, false otherwise. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called whenever a data provider is created in content's scene.
The event is emitted also for every data provider in a newly available content. If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has the data slot change associated. |
dataProviderId | The created data provider id |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called when a data provider is removed from content's scene.
The event is emitted only when data provider explicitly destroyed, not if content becomes unavailable as a whole. If the scene is associated with multiple contents (at the time of receiving this event) this callback will be triggered for all those contents.
contentID | ID of content that has the data slot change associated. |
dataProviderId | The destroyed data provider id |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Data consumer was unlinked from provider (or failed to be linked) as result of calling ramses::DcsmContentControl::unlinkData.
Note that there is a possibility that given consumerContent ID is different from the one passed when calling ramses::DcsmContentControl::unlinkData. This can happen if the Ramses scene involved in this data linking is used by multiple contents, in that case simply one of the contents using the scene will be given here. Also note that given consumerContent ID will be invalid if the consumer content or its scene became unavailable before this callback is emitted.
consumerContent | ID of content using scene with data that was unlinked. |
consumerId | ID of data consumer in the consumer scene. |
success | True if data successfully unlinked, false otherwise. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called when there were scene objects picked as a result of ramses::DcsmContentControl::handlePickEvent. A ramses::PickableObject can be 'picked' via a pick input event which is passed to ramses::DcsmContentControl when the scene is rendered.
content | Content using scene to which the picked objects belong. |
pickedObjects | Pointer to first ID of the picked objects array. This array is valid only for the time of calling this method. |
pickedObjectsCount | Number of picked object IDs in the pickedObjects array. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
Offscreen buffer and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentControl::linkOffscreenBuffer.
Note that there is a possibility that given consumerContent ID is different from the one passed when calling ramses::DcsmContentControl::linkOffscreenBuffer. This can happen if the Ramses scene involved in this data linking is used by multiple contents, in that case simply one of the contents using the scene will be given here. Also note that given consumerContent ID will be invalid if the consumer content or its scene became unavailable before this callback is emitted.
offscreenBufferId | ID of offscreen buffer which was linked to consumer. |
consumerContent | ID of content using scene that consumes the linked offscreen buffer. |
consumerId | ID of data consumer in the consumer scene. |
success | True if offscreen buffer successfully linked, false otherwise. |
Implements ramses::IDcsmContentControlEventHandler.
|
inlineoverridevirtual |
This method will be called when a new IVI video stream becomes available, or when an existing stream disappears.
In terms of Wayland protocol, a stream is available if an "ivi_application" exists which has created a Wayland surface (wl_surface) with ivi_id=streamId, and the surface has at least one attached non-nullptr buffer (i.e. renderable content).
It is possible that the ivi_application does not update its surface (by providing new buffers/frames), but RAMSES has no way of knowing that, hence a stream is not reported unavailable in that case.
A surface becomes unavailable whenever either the ivi_application is closed or when it attached a nullptr buffer to the stream surface with id=streamId (i.e. actively told Wayland that it should not render contents to this IVI surface).
streamId | The IVI stream id |
available | True if the stream became available, and false if it disappeared |
Implements ramses::IDcsmContentControlEventHandler.