Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PlantUML Macro
formatSVG
titleSet Position
@startuml

autonumber

box "Container" #LightGreen
participant GStreamer_clientApplication
participant rialtoClient
end box

box "Platform" #LightBlue
participant rialtoServer
participant GStreamer_server
end box

note over Cobalt, GStreamer_clientApplication
The Rialto's client should abort any pending needData() requests before calling setPosition and ignore any
needData() requests received before the SEEK_DONE event as they will be stale.
** TODO - document this in the API header file **
end note

GStreamer_clientApplication        ->  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_clientApplication:  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_clientApplication:

opt Seek initiated successfully
rialtoServer       -/  rialtoClient:      notifyPlaybackState(pipeline_session, PLAYBACK_STATE_SEEK_DONE)
rialtoClient       -/  GStreamer_clientApplication:       notifyPlaybackState(pipeline_session, PLAYBACK_STATE_SEEK_DONE)
else Error initiating seek
rialtoServer       -/  rialtoClient:      notifyPlaybackState(pipeline_session, PLAYBACK_STATE_FAILURE)
rialtoClient       -/  GStreamer_client:Application:       notifyPlaybackState(pipeline_session, PLAYBACK_STATE_FAILURE)
end

rialtoServer       ->  rialtoServer:      trigger need data for all attached sources

ref over GStreamer_clientApplication, rialtoServer
Start requesting samples as for regular playback
end ref

@enduml

...