RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | List of all members
ramses::RendererSceneControlEventHandlerEmpty Class Reference

Convenience empty implementation of IRendererSceneControlEventHandler that can be used to derive from when only subset of event handling methods need to be implemented. More...

#include <IRendererSceneControlEventHandler.h>

Inheritance diagram for ramses::RendererSceneControlEventHandlerEmpty:
[legend]
Collaboration diagram for ramses::RendererSceneControlEventHandlerEmpty:
[legend]

Public Member Functions

virtual void sceneStateChanged (sceneId_t sceneId, RendererSceneState state) override
 This method will be called when state of a scene changes. More...
 
virtual void offscreenBufferLinked (displayBufferId_t offscreenBufferId, sceneId_t consumerScene, dataConsumerId_t consumerId, bool success) override
 This method will be called when the data link between offscreen buffer and scene's data slot is established. More...
 
virtual void dataLinked (sceneId_t providerScene, dataProviderId_t providerId, sceneId_t consumerScene, dataConsumerId_t consumerId, bool success) override
 This method will be called when the data link between a data provider and data consumer is established. More...
 
virtual void dataUnlinked (sceneId_t consumerScene, dataConsumerId_t consumerId, bool success) override
 This method will be called when the data link between a data provider and data consumer is destroyed. More...
 
virtual void dataProviderCreated (sceneId_t sceneId, dataProviderId_t dataProviderId) override
 This method will be called whenever a data provider is created. More...
 
virtual void dataProviderDestroyed (sceneId_t sceneId, dataProviderId_t dataProviderId) override
 This method will be called when a data provider is destroyed. More...
 
virtual void dataConsumerCreated (sceneId_t sceneId, dataConsumerId_t dataConsumerId) override
 This method will be called whenever a data consumer is created. More...
 
virtual void dataConsumerDestroyed (sceneId_t sceneId, dataConsumerId_t dataConsumerId) override
 This method will be called when a data consumer is destroyed. More...
 
virtual void sceneFlushed (sceneId_t sceneId, sceneVersionTag_t sceneVersionTag) override
 This method will be called after a flush with version tag (ramses::Scene::flush) has been applied. More...
 
virtual void sceneExpirationMonitoringEnabled (sceneId_t sceneId) override
 This method will be called whenever a 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 scene will be monitored, can expire and recover (sceneExpired, sceneRecoveredFromExpiration) until monitoring disabled again (sceneExpirationMonitoringDisabled). More...
 
virtual void sceneExpirationMonitoringDisabled (sceneId_t sceneId) override
 This method will be called whenever a 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 scene is unsubscribed from the renderer, i.e. drops state to ramses::RendererSceneState::Available from previous ramses::RendererSceneState::Ready (or potentially after canceled transition to ramses::RendererSceneState::Ready). From this point on, the scene will not be monitored anymore, regardless if it previously expired or not, i.e. there will be no expiration events (sceneExpired, sceneRecoveredFromExpiration) until monitoring enabled again (sceneExpirationMonitoringEnabled). More...
 
virtual void sceneExpired (sceneId_t sceneId) override
 This method will be called if a scene which is enabled for expiration monitoring (sceneExpirationMonitoringEnabled) 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 scene expires even if scene stays expired in subsequent frames. When the scene is updated again with a new not anymore expired timestamp, sceneRecoveredFromExpiration is called. More...
 
virtual void sceneRecoveredFromExpiration (sceneId_t sceneId) override
 This method will be called if a scene which previously expired (ramses::Scene::setExpirationTimestamp and sceneExpired) was updated with a new expiration timestamp that is not expired anymore. This callback is called only once when the scene switches state from expired to not expired. This callback is not called when monitoring becomes disabled (sceneExpirationMonitoringDisabled) while scene is expired (sceneExpired). 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 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). More...
 
virtual void objectsPicked (sceneId_t sceneId, const pickableObjectId_t *pickedObjects, uint32_t pickedObjectsCount) override
 This method will be called when there were scene objects picked. A ramses::PickableObject can be 'picked' via a pick input event which is passed to ramses::RendererSceneControl when the scene is rendered (see ramses::RendererSceneControl::handlePickEvent). More...
 
- Public Member Functions inherited from ramses::IRendererSceneControlEventHandler
virtual ~IRendererSceneControlEventHandler ()=default
 Empty destructor. More...
 

Detailed Description

Convenience empty implementation of IRendererSceneControlEventHandler that can be used to derive from when only subset of event handling methods need to be implemented.

Examples
ramses-example-local-datalink/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-pick-handling/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

Member Function Documentation

◆ dataConsumerCreated()

virtual void ramses::RendererSceneControlEventHandlerEmpty::dataConsumerCreated ( sceneId_t  sceneId,
dataConsumerId_t  dataConsumerId 
)
inlineoverridevirtual

This method will be called whenever a data consumer is created.

The event is emitted also for every data consumer in a newly available scene.

Parameters
sceneIdThe scene id of the scene on which the event occurred
dataConsumerIdThe created data consumer id

Implements ramses::IRendererSceneControlEventHandler.

Reimplemented in SceneStateEventHandler.

◆ dataConsumerDestroyed()

virtual void ramses::RendererSceneControlEventHandlerEmpty::dataConsumerDestroyed ( sceneId_t  sceneId,
dataConsumerId_t  dataConsumerId 
)
inlineoverridevirtual

This method will be called when a data consumer is destroyed.

The event is emitted only when data consumer destroyed, not if scene becomes unavailable as a whole.

Parameters
sceneIdThe scene id of the scene on which the event occurred
dataConsumerIdThe destroyed data consumer id

Implements ramses::IRendererSceneControlEventHandler.

◆ dataLinked()

virtual void ramses::RendererSceneControlEventHandlerEmpty::dataLinked ( sceneId_t  providerScene,
dataProviderId_t  providerId,
sceneId_t  consumerScene,
dataConsumerId_t  consumerId,
bool  success 
)
inlineoverridevirtual

This method will be called when the data link between a data provider and data consumer is established.

This is a result of ramses::RendererSceneControl::linkData call.

Parameters
providerSceneThe ID of scene where the data provider slot is
providerIdThe ID of data provider which was linked
consumerSceneThe ID of scene where the data consumer slot is
consumerIdThe ID of data consumer which was linked
successTrue if succeeded, false otherwise - check renderer logs for concrete error message.

Implements ramses::IRendererSceneControlEventHandler.

◆ dataProviderCreated()

virtual void ramses::RendererSceneControlEventHandlerEmpty::dataProviderCreated ( sceneId_t  sceneId,
dataProviderId_t  dataProviderId 
)
inlineoverridevirtual

This method will be called whenever a data provider is created.

The event is emitted also for every data provider in a newly available scene.

Parameters
sceneIdThe scene id of the scene on which the event occurred
dataProviderIdThe created data provider id

Implements ramses::IRendererSceneControlEventHandler.

Reimplemented in SceneStateEventHandler.

◆ dataProviderDestroyed()

virtual void ramses::RendererSceneControlEventHandlerEmpty::dataProviderDestroyed ( sceneId_t  sceneId,
dataProviderId_t  dataProviderId 
)
inlineoverridevirtual

This method will be called when a data provider is destroyed.

The event is emitted only when data provider destroyed, not if scene becomes unavailable as a whole.

Parameters
sceneIdThe scene id of the scene on which the event occurred
dataProviderIdThe destroyed data provider id

Implements ramses::IRendererSceneControlEventHandler.

◆ dataUnlinked()

virtual void ramses::RendererSceneControlEventHandlerEmpty::dataUnlinked ( sceneId_t  consumerScene,
dataConsumerId_t  consumerId,
bool  success 
)
inlineoverridevirtual

This method will be called when the data link between a data provider and data consumer is destroyed.

This is a result of ramses::RendererSceneControl::unlinkData call.

Parameters
consumerSceneThe ID of scene where the data consumer slot is
consumerIdThe ID of data consumer which was unlinked
successTrue if succeeded, false otherwise - check renderer logs for concrete error message.

Implements ramses::IRendererSceneControlEventHandler.

◆ objectsPicked()

virtual void ramses::RendererSceneControlEventHandlerEmpty::objectsPicked ( sceneId_t  sceneId,
const pickableObjectId_t pickedObjects,
uint32_t  pickedObjectsCount 
)
inlineoverridevirtual

This method will be called when there were scene objects picked. A ramses::PickableObject can be 'picked' via a pick input event which is passed to ramses::RendererSceneControl when the scene is rendered (see ramses::RendererSceneControl::handlePickEvent).

Parameters
[in]sceneIdID of scene to which the picked objects belong.
[in]pickedObjectsPointer to first ID of the picked objects array. This array is valid only for the time of calling this method.
[in]pickedObjectsCountNumber of picked object IDs in the pickedObjects array.

Implements ramses::IRendererSceneControlEventHandler.

Examples
ramses-example-local-pick-handling/src/main.cpp.

◆ offscreenBufferLinked()

virtual void ramses::RendererSceneControlEventHandlerEmpty::offscreenBufferLinked ( displayBufferId_t  offscreenBufferId,
sceneId_t  consumerScene,
dataConsumerId_t  consumerId,
bool  success 
)
inlineoverridevirtual

This method will be called when the data link between offscreen buffer and scene's data slot is established.

This is a result of ramses::RendererSceneControl::linkOffscreenBuffer call.

Parameters
offscreenBufferIdThe ID of offscreen buffer which is linked as data provider
consumerSceneThe ID of scene where the data consumer slot is
consumerIdThe ID of data consumer where the offscreen buffer is linked to
successTrue if succeeded, false otherwise - check renderer logs for concrete error message.

Implements ramses::IRendererSceneControlEventHandler.

Examples
ramses-example-local-dma-offscreenbuffer/src/main.cpp, and ramses-example-local-offscreenbuffer/src/main.cpp.

◆ sceneExpirationMonitoringDisabled()

virtual void ramses::RendererSceneControlEventHandlerEmpty::sceneExpirationMonitoringDisabled ( sceneId_t  sceneId)
inlineoverridevirtual

This method will be called whenever a 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 scene is unsubscribed from the renderer, i.e. drops state to ramses::RendererSceneState::Available from previous ramses::RendererSceneState::Ready (or potentially after canceled transition to ramses::RendererSceneState::Ready). From this point on, the scene will not be monitored anymore, regardless if it previously expired or not, i.e. there will be no expiration events (sceneExpired, sceneRecoveredFromExpiration) until monitoring enabled again (sceneExpirationMonitoringEnabled).

Parameters
sceneIdThe scene id of the scene that will not be monitored for expiration anymore

Implements ramses::IRendererSceneControlEventHandler.

◆ sceneExpirationMonitoringEnabled()

virtual void ramses::RendererSceneControlEventHandlerEmpty::sceneExpirationMonitoringEnabled ( sceneId_t  sceneId)
inlineoverridevirtual

This method will be called whenever a 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 scene will be monitored, can expire and recover (sceneExpired, sceneRecoveredFromExpiration) until monitoring disabled again (sceneExpirationMonitoringDisabled).

Parameters
sceneIdThe scene id of the scene that will be monitored for expiration

Implements ramses::IRendererSceneControlEventHandler.

◆ sceneExpired()

virtual void ramses::RendererSceneControlEventHandlerEmpty::sceneExpired ( sceneId_t  sceneId)
inlineoverridevirtual

This method will be called if a scene which is enabled for expiration monitoring (sceneExpirationMonitoringEnabled) 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 scene expires even if scene stays expired in subsequent frames. When the scene is updated again with a new not anymore expired timestamp, sceneRecoveredFromExpiration is called.

Parameters
sceneIdThe scene id of the scene on which the event occurred

Implements ramses::IRendererSceneControlEventHandler.

◆ sceneFlushed()

virtual void ramses::RendererSceneControlEventHandlerEmpty::sceneFlushed ( sceneId_t  sceneId,
sceneVersionTag_t  sceneVersionTag 
)
inlineoverridevirtual

This method will be called after a flush with version tag (ramses::Scene::flush) has been applied.

Parameters
sceneIdThe scene id of the scene which the versioned flush belongs to
sceneVersionTagThe version tag of the scene flush

Implements ramses::IRendererSceneControlEventHandler.

Examples
ramses-example-local-offscreenbuffer/src/main.cpp.

◆ sceneRecoveredFromExpiration()

virtual void ramses::RendererSceneControlEventHandlerEmpty::sceneRecoveredFromExpiration ( sceneId_t  sceneId)
inlineoverridevirtual

This method will be called if a scene which previously expired (ramses::Scene::setExpirationTimestamp and sceneExpired) was updated with a new expiration timestamp that is not expired anymore. This callback is called only once when the scene switches state from expired to not expired. This callback is not called when monitoring becomes disabled (sceneExpirationMonitoringDisabled) while scene is expired (sceneExpired).

Parameters
sceneIdThe scene id of the scene on which the event occurred

Implements ramses::IRendererSceneControlEventHandler.

◆ sceneStateChanged()

virtual void ramses::RendererSceneControlEventHandlerEmpty::sceneStateChanged ( sceneId_t  sceneId,
RendererSceneState  state 
)
inlineoverridevirtual

This method will be called when state of a scene changes.

Typically this is a result of ramses::RendererSceneControl::setSceneState call but can be also triggered externally (e.g. scene was unpublished by client). Note that there can be multiple state change callbacks in a row depending on number of state transitions needed between the previous state and target state when calling ramses::RendererSceneControl::setSceneState.

Limitation: This callback will not be executed if there is no display created and running. All published scenes (Available state) will be announced only after a display is created and running. Also all published scenes will be announced again if display is destroyed and created again and it is the only display on renderer.

Parameters
sceneIdThe ID of scene with changed state
stateNew state of the scene

Implements ramses::IRendererSceneControlEventHandler.

Examples
ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ streamAvailabilityChanged()

virtual void ramses::RendererSceneControlEventHandlerEmpty::streamAvailabilityChanged ( waylandIviSurfaceId_t  streamId,
bool  available 
)
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).

Parameters
streamIdThe IVI stream id
availableTrue if the stream became available, and false if it disappeared

Implements ramses::IRendererSceneControlEventHandler.


The documentation for this class was generated from the following file: