Consumer-owned combined video, audio and subtitle presentation sink.
More...
#include <StormByte/multimedia/display.hxx>
|
| | Display ()=default |
| | Construct a sink.
|
| | Display (const Display &)=delete |
| | Display (Display &&)=delete |
| virtual | ~Display () noexcept=default |
| | Release this sink, not managed by player Close.
|
| Display & | operator= (const Display &)=delete |
| Display & | operator= (Display &&)=delete |
| virtual void | Invalidate (std::uint64_t epoch, bool active_video)=0 |
| | Flush presentation and synchronously invalidate old deliveries.
|
| virtual bool | InvalidateAudio (std::uint64_t epoch) |
| | Flush only audio while retaining video, cues and the delivery epoch.
|
| virtual void | Pause (bool paused, std::uint64_t epoch)=0 |
| | Freeze or resume device audio and subtitle timers; invalidate an old pause timer.
|
| virtual void | Video (Safe::Shared< const PreviewVideo > image)=0 |
| | Present an owned image after its scheduled time.
|
| virtual void | Audio (Safe::Shared< const PreviewAudio > audio)=0 |
| | Queue a PCM block without blocking for playback.
|
| virtual void | Subtitle (Safe::Shared< const PreviewSubtitle > subtitle)=0 |
| | Present a cue; expire it at m_end on the supplied media clock.
|
| virtual AudioPresentation | AudioClock (std::uint64_t epoch)=0 |
| | Read current epoch's audio device cursor and latency.
|
| virtual void | Position (double position, std::uint64_t epoch)=0 |
| | Advance subtitle timing, including when audio is disabled.
|
| virtual bool | Drained (std::uint64_t epoch)=0 |
| | Whether all queued audio and GUI deliveries have completed.
|
Consumer-owned combined video, audio and subtitle presentation sink.
Callbacks run on worker or control-caller threads and must be bounded and thread-safe. Do not reenter any player method. Throw on device or delivery failure. Maintain bounded audio and GUI queues; audio starts at most the player's PreviewBuffering::AudioAhead (500 ms by default) ahead, plus the duration of the submitted block. Invalidate synchronously publishes a new epoch, flushes audio and cues, and clears the old image even when video remains active. Queued GUI deliveries must check that epoch at execution, not merely enqueue time. The consumer implements its Qt/SDL/native integration; destruction of a player never closes this shared widget or its application.
◆ Display() [1/3]
| StormByte::Multimedia::Display::Display |
( |
| ) |
|
|
default |
◆ Display() [2/3]
| StormByte::Multimedia::Display::Display |
( |
const Display & | | ) |
|
|
delete |
◆ Display() [3/3]
| StormByte::Multimedia::Display::Display |
( |
Display && | | ) |
|
|
delete |
◆ ~Display()
| virtual StormByte::Multimedia::Display::~Display |
( |
| ) |
|
|
virtualdefaultnoexcept |
Release this sink, not managed by player Close.
◆ Audio()
Queue a PCM block without blocking for playback.
- Parameters
-
| audio | Owned samples with timeline position. |
◆ AudioClock()
| virtual AudioPresentation StormByte::Multimedia::Display::AudioClock |
( |
std::uint64_t | epoch | ) |
|
|
pure virtual |
Read current epoch's audio device cursor and latency.
- Parameters
-
- Returns
- Device clock feedback.
◆ Drained()
| virtual bool StormByte::Multimedia::Display::Drained |
( |
std::uint64_t | epoch | ) |
|
|
pure virtual |
Whether all queued audio and GUI deliveries have completed.
- Parameters
-
- Returns
- True only after presentation has drained.
◆ Invalidate()
| virtual void StormByte::Multimedia::Display::Invalidate |
( |
std::uint64_t | epoch, |
|
|
bool | active_video ) |
|
pure virtual |
Flush presentation and synchronously invalidate old deliveries.
- Parameters
-
| epoch | New generation. |
| active_video | Whether an ordinary video track is selected. |
◆ InvalidateAudio()
| virtual bool StormByte::Multimedia::Display::InvalidateAudio |
( |
std::uint64_t | epoch | ) |
|
|
inlinevirtual |
Flush only audio while retaining video, cues and the delivery epoch.
- Parameters
-
- Returns
- True when audio was flushed; false without changing presentation if unsupported, in which case track selection uses the legacy global seek.
Serialized with all sink callbacks. Reset device clock validity and pending PCM synchronously. The player reapplies Pause before sending new audio.
◆ operator=() [1/2]
| Display & StormByte::Multimedia::Display::operator= |
( |
const Display & | | ) |
|
|
delete |
◆ operator=() [2/2]
◆ Pause()
| virtual void StormByte::Multimedia::Display::Pause |
( |
bool | paused, |
|
|
std::uint64_t | epoch ) |
|
pure virtual |
Freeze or resume device audio and subtitle timers; invalidate an old pause timer.
- Parameters
-
| paused | Whether presentation is paused. |
| epoch | Current generation. |
◆ Position()
| virtual void StormByte::Multimedia::Display::Position |
( |
double | position, |
|
|
std::uint64_t | epoch ) |
|
pure virtual |
Advance subtitle timing, including when audio is disabled.
- Parameters
-
| position | Media seconds; frozen during pause. |
| epoch | Current generation. |
◆ Subtitle()
Present a cue; expire it at m_end on the supplied media clock.
- Parameters
-
| subtitle | Owned cue. Preserve overlapping cue identities. |
Empty m_regions clears m_id, or all cues when m_id is zero. Infinite m_end remains active until such a clear; Position expires finite cues.
◆ Video()
Present an owned image after its scheduled time.
- Parameters
-
| image | Image; reject stale epochs at GUI execution. |
The documentation for this class was generated from the following file: