@startuml
autonumber
box "Container" #LightGreen
participant Cobalt
participant Starboard
participant GStreamer_client
participant rialtoClient
end box
box "Platform" #LightBlue
participant rialtoServer
participant GStreamer_server
end box
note over Cobalt, GStreamer_client
The Rialto's client should abort any pending needData() requests before calling setPosition and ignore any
needData() requests received before the FLUSHEDSEEK_DONE event as they will be stale.
** TODO - document this in the API header file **
end note
Cobalt -> Starboard: SbPlayerSeek2(player, position)
Starboard -> GStreamer_client: gst_element_seek(pipeline, position, GST_SEEK_FLAG_FLUSH)
GStreamer_client --> Starboard:
Starboard --> Cobalt:
GStreamer_client -> rialtoClient: setPosition(pipeline_session, position)
rialtoClient -> rialtoClient: clear local cache of any active data requests for pipeline session
rialtoClient -> rialtoServer: setPosition(pipeline_session, position)
rialtoServer -/ rialtoClient: notifyPlaybackState(pipeline_session, PLAYBACK_STATE_SEEKING)
rialtoClient -/ GStreamer_client: notifyPlaybackState(pipeline_session, PLAYBACK_STATE_SEEKING)
rialtoServer -> rialtoServer: store position as "target position" for sample fulfilment algorithm
rialtoServer -> rialtoServer: stop sending new need data requests
rialtoServer -> rialtoServer: clear local cache of any active data requests for pipeline session
rialtoServer -> rialtoServer: clear buffered samples for pipeline session
rialtoServer -> GStreamer_server: gst_element_seek(pipeline, position, GST_SEEK_FLAG_FLUSH)
note left
Use of the FLUSH flag ensures the
pipeline is flushed when call returns
**TODO - is this correct or do we need**
**to wait for ASYNC_DONE**
end note
GStreamer_server --> rialtoServer:
rialtoServer --> rialtoClient:
rialtoClient --> GStreamer_client:
opt Seek initiated successfully
rialtoServer -/ rialtoClient: notifyPlaybackState(pipeline_session, PLAYBACK_STATE_SEEK_FLUSHEDDONE)
rialtoClient -/ GStreamer_client: notifyPlaybackState(pipeline_session, PLAYBACK_STATE_SEEK_FLUSHEDDONE)
else Error initiating seek
rialtoServer -/ rialtoClient: notifyPlaybackState(pipeline_session, PLAYBACK_STATE_FAILURE)
rialtoClient -/ GStreamer_client: notifyPlaybackState(pipeline_session, PLAYBACK_STATE_FAILURE)
end
rialtoServer -> rialtoServer: trigger need data for all attached sources
ref over GStreamer_client, rialtoServer
Start requesting samples as for regular playback
end ref
@enduml |