Class StreamScrubber

Class Documentation

class StreamScrubber

Helper class for playing back a stream to a given point.

This class acts as a layer on top of the keyframe applying and other logic needed to play to a range.

Public Functions

StreamScrubber(StreamData *streamData, Player *player, PlaybackPreprocessor *playbackPreprocessor = nullptr)
Parameters
  • streamData -- The stream to play back.

  • player -- The player that will be used to play back calls.

  • playbackPreprocessor -- playbackPreprocessor The object that will perform stream analysis required for range repeat

~StreamScrubber()
bool PlayToBookmark(StreamDataBookmark const &bookmark, bool trackState = false, PlaybackMonitor *monitor = nullptr)

Plays to a given point in the stream.

Note

If monitor pointer is provided, caller can expect callbacks for all methods on PlaybackMonitor

Parameters
  • bookmark -- The point to play to in the stream

  • trackState -- true if state should be collected throughout the playing of the stream, which is necessary for range repeat and some data collection to work.

  • monitor -- Optional pointer to a PlaybackMonitor implementation, through which the scrubber can provide status updates to the caller

uint64_t PlayToNearestKeyframe(double percentage, bool trackState = false, PlaybackMonitor *monitor = nullptr)

Plays to the nearest keyframe in the stream to the given percentage.

Note

If monitor pointer is provided, caller should expect callbacks only for methods PlaybackMonitor::OnKeyframeBegin() and PlaybackMonitor::OnKeyframeEnd()

Parameters
  • percentage -- The starting percentage. If valid, the stream will apply the keyframe nearest to (but not after) this percentage.

  • trackState -- true if state should be collected throughout the playing of the stream, which is necessary for range repeat and some data collection to work.

  • monitor -- Optional pointer to a PlaybackMonitor implementation, through which the scrubber can provide status updates to the caller