Media Controller
A GStreamer implementation using the VideoXpert SDK
MediaController::PausedState Class Reference

Represents a stream that is currently in the paused state. More...

#include <StreamState.h>

Public Member Functions

virtual ~PausedState ()
 Virtual destructor. More...
 
bool Play (StreamBase &stream, float speed, unsigned int unixTime) override
 Perform the Play action based on the stream state. More...
 
void Stop (StreamBase &stream) override
 Perform the Stop action based on the stream state. More...
 
bool GoToLive (StreamBase &stream) override
 Perform the GoToLive action based on the stream state. More...
 
- Public Member Functions inherited from MediaController::StreamState
virtual ~StreamState ()
 Virtual destructor. More...
 
virtual void Pause (StreamBase &stream)
 Perform the Pause action based on the stream state. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MediaController::StreamState
 StreamState ()
 Constructor. More...
 

Detailed Description

Represents a stream that is currently in the paused state.

Definition at line 71 of file StreamState.h.

Inherits MediaController::StreamState.

Constructor & Destructor Documentation

virtual MediaController::PausedState::~PausedState ( )
inlinevirtual

Virtual destructor.

Definition at line 77 of file StreamState.h.

77 {}

Member Function Documentation

bool PausedState::GoToLive ( StreamBase stream)
overridevirtual

Perform the GoToLive action based on the stream state.

Parameters
streamThe stream instance.

Reimplemented from MediaController::StreamState.

Definition at line 61 of file StreamState.cpp.

61  {
62  return stream.Play();
63 }
bool Play(float speed=0, unsigned int unixTime=0) override
Call Play on the stream.
Definition: StreamBase.cpp:22
bool PausedState::Play ( StreamBase stream,
float  speed,
unsigned int  unixTime 
)
overridevirtual

Perform the Play action based on the stream state.

Parameters
streamThe stream instance.
speedThe playback speed.
unixTimeThe start time for playback.

Reimplemented from MediaController::StreamState.

Definition at line 50 of file StreamState.cpp.

50  {
51  if (stream.GetMode() == Controller::kLive)
52  return stream.Play(speed, unixTime == 0 ? stream.GetLastTimestamp() : unixTime);
53 
54  return stream.Resume(speed);
55 }
The stream is playing live video.
Definition: IStream.h:21
unsigned int GetLastTimestamp() const
Gets the current time of the stream.
Definition: StreamBase.cpp:36
Mode GetMode() override
Get the current playback mode.
Definition: StreamBase.cpp:40
bool Play(float speed=0, unsigned int unixTime=0) override
Call Play on the stream.
Definition: StreamBase.cpp:22
virtual bool Resume(float speed=0, unsigned int unixTime=0)
Send PLAY on an existing stream.
Definition: StreamBase.cpp:30
void PausedState::Stop ( StreamBase stream)
overridevirtual

Perform the Stop action based on the stream state.

Parameters
streamThe stream instance.

Reimplemented from MediaController::StreamState.

Definition at line 57 of file StreamState.cpp.

57  {
58  stream.Stop();
59 }
void Stop() override
Call TearDown on the stream.
Definition: StreamBase.cpp:26

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